? ? Error

User tests: Successful: Unsuccessful:

avatar javigomez
javigomez
16 Mar 2015

What is this pull

This pull contains a first set of System tests based in Codeception Framework

They automate a Firefox browser and execute a set of tasks to ensure that all works as expected.

This first set of tests includes:

  • basic joomla installation
  • Administrator login
  • set up Error reporting as "development" in Joomla administrator

See it in action

If you want to see this tests being executed you can check the following video: https://www.youtube.com/watch?v=-GYou8kWpYI

Running the tests in your machine

This pull request includes a Markdown file called README.md at tests/codeception/ with step by step instructions for running the tests:

The first step to execute the System tests at Joomla-CMS a Joomla website. To do it automatically you can execute the following commands:

cd tests/codeception
composer install
# The following comand uses a Joomla Framework App that downloads the latests Joomla
php cli/getjoomlacli.php

note: to execute the previous commands you will need Composer in your system. See https://docs.joomla.org/Testing_Joomla_Extensions_with_Codeception#Testing_with_Codeception.

Rename tests/acceptance.suite.dist.yml to tests/acceptance.suite.yml

Modify the configuration at tests/acceptance.suite.yml to fit your server details. Find the instructions in the same file: https://github.com/joomla/joomla-cms/tests/codeception/acceptance.suite.dist.yml#L3

Run Selenium server (is the software that drives your Firefox browser):

# Download Selenium Server
curl -O http://selenium-release.storage.googleapis.com/2.41/selenium-server-standalone-2.41.0.jar

# Go to the folder were you have downloaded the file and start the Selenium Server
java -Xms40m -Xmx256m -jar ./selenium-server-standalone-2.41.0.jar

Execute the tests:

cd tests/codeception
php vendor/bin/codecept build
php vendor/bin/codecept run tests/acceptance/installation/ --steps 
php vendor/bin/codecept run tests/acceptance/administrator/ --steps 

You can also execute the tests using runsystemtests.sh file

What is this pull about?

This pull is not intended to replace the current set of Webdriver-Nearsoft Selenium tests (see https://docs.joomla.org/Running_Automated_Tests_for_the_Joomla_CMS). Is just proposing a new base for System Testing.

The main idea is to create a set of tests that can be reused by external Extensions for example https://github.com/joomla-extensions/weblinks. So Weblinks can have it's own tests but when it needs to install joomla or set Error Reporting in Joomla as "Development" it can reuse the current tests. See: http://codeception.com/docs/07-AdvancedUsage#Running-from-different-folders

acknowledgment

This test are result of the work of the Automated Testing Working Group https://docs.joomla.org/Automated_Tests_Working_Group

Specially thanks to @puneet0191, the present work is based on his http://mustached.org/ project. Also thanks to @ronnikc for his support.

avatar javigomez javigomez - open - 16 Mar 2015
avatar joomla-cms-bot joomla-cms-bot - change - 16 Mar 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 16 Mar 2015
Category Unit Tests
avatar javigomez javigomez - change - 16 Mar 2015
Labels Added: ?
avatar puneet0191
puneet0191 - comment - 25 Mar 2015

@javigomez Overall PR looks awesome! thanks for the Great work, I haven't tested on my local but I had a brief look at it and seems fine to me, I have a question I can't see any changes to Travis are you planning to do it later?

PS: Please send a PR to Mustached with the new changes it would be great to have this setup for installation, and replace the current one!

avatar javigomez
javigomez - comment - 25 Mar 2015

There is no plan to use Travis for Joomla-cms for running the tests due to the 50 minutes limit:

E.................E.........
I'm sorry but your test run exceeded 50.0 minutes. 
One possible solution is to split up your test run.

Instead we will use Jenkins and several Docker Containers to run the tests in parallel.

I plan to test Travis with Weblinks extension (https://github.com/joomla-extensions/weblinks/). Because tests in Weblinks will be less than 50 minutes without the need of making them in parallel. And also the idea is in Weblinks to reuse the current pull request. Doing something like:

php vendor/bin/codecept run joomla/tests/acceptance/installation/ --steps
php vendor/bin/codecept run weblinks/tests/acceptance/administrator/ --steps

avatar javigomez javigomez - change - 10 Apr 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-04-10 15:21:14
avatar javigomez javigomez - close - 10 Apr 2015
avatar javigomez javigomez - reference | - 10 Apr 15
avatar javigomez javigomez - merge - 10 Apr 2015
avatar javigomez javigomez - close - 10 Apr 2015

Add a Comment

Login with GitHub to post a comment