Actions

Testing Area/Behat Testing/Running test: Difference between revisions

From Mahara Wiki

< Testing Area‎ | Behat Testing
mNo edit summary
No edit summary
Line 16: Line 16:
   Crtl+c
   Crtl+c


To see a list of all tests, cd to your Mahara directory and run:
grep -RiPoh 'Scenario:(\s+)\K(.*)$' test/


<h2>Test failing</h2>
<h2>Test failing</h2>

Revision as of 10:11, 10 Haziran 2015

Running the test

Go to the terminal and cd into:

 /var/www/html/mahara

Type:

./test/behat/mahara_behat.sh rundebug @youtagthatyouwanttorun


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

Selenium is running
Start the PHP server
Enable test site

If you want to stop the tests at any point click inside the terminal not the browser

 Crtl+c

To see a list of all tests, cd to your Mahara directory and run:

grep -RiPoh 'Scenario:(\s+)\K(.*)$' test/

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.