Actions

Difference between revisions of "Testing Area/Behat Testing/Running test"

From Mahara Wiki

< Testing Area‎ | Behat Testing
Line 1: Line 1:
 
<h2>Running the test</h2>
 
<h2>Running the test</h2>
  
 +
Go to the terminal and cd into:
 +
  /var/www/html/mahara
  
 +
Type:
 +
  ./test/behat/mahara_behat.sh @youtagthatyouwanttorun
  
Type this into the terminal from '''any directory''' to run the tests:
 
mahara_behat run @tag
 
 
The tag is whatever you have tagged your test to be. For example:
 
mahara_behat run @core_page
 
 
For help change directory into your mahara code directory, then run:
 
test/behat/mahara-behat.sh help
 
  
 
When you run the command it will start up the following:
 
When you run the command it will start up the following:

Revision as of 09:14, 7 January 2015

Running the test

Go to the terminal and cd into:

 /var/www/html/mahara

Type:

 ./test/behat/mahara_behat.sh @youtagthatyouwanttorun


When you run the command it will start up the following:

Selenium is running
Start the PHP server
Enable test site

Test failing

  • 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.