Testing Area/Behat Testing/Running test: Difference between revisions
From Mahara Wiki
< Testing Area | Behat Testing
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<h2>Running the test</h2> | <h2>Running the test</h2> | ||
Type this into the terminal from '''any directory''': | Type this into the terminal from '''any directory''': | ||
Line 9: | Line 7: | ||
The tag is whatever you have tagged your test to be. For example: | The tag is whatever you have tagged your test to be. For example: | ||
mahara_behat run @core_page | mahara_behat run @core_page | ||
When you run the command it will start up the following: | When you run the command it will start up the following: | ||
Line 16: | Line 13: | ||
Enable test site | Enable test site | ||
* If another test runs instead, it's because you have more than one test tagged with the tag you are trying to run. | |||
* The step that the test is failing on will show red or orange. | |||
* When it fails, go to the text editor and fix the step that it broke on and run it again. | |||
[[Category:Behat]] | [[Category:Behat]] |
Revision as of 16:49, 16 December 2014
Running the test
Type this into the terminal from any directory:
mahara_behat run @tag
The tag is whatever you have tagged your test to be. For example:
mahara_behat run @core_page
When you run the command it will start up the following:
Selenium is running Start the PHP server Enable test site
- If another test runs instead, it's because you have more than one test tagged with the tag you are trying to run.
- The step that the test is failing on will show red or orange.
- When it fails, go to the text editor and fix the step that it broke on and run it again.