User tests: Successful: Unsuccessful:
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:
If you want to see this tests being executed you can check the following video: https://www.youtube.com/watch?v=-GYou8kWpYI
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
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
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.
Labels |
Added:
?
|
Category | ⇒ | Unit Tests |
Labels |
Added:
?
|
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
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-04-10 15:21:14 |
@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!