Actions

Difference between revisions of "Testing Area/Behat Testing"

From Mahara Wiki

< Testing Area
(Replaced content with "Things to do next: # Setting up your Mahara with Behat # Running tests Category: Behat")
(22 intermediate revisions by one other user not shown)
Line 1: Line 1:
Things to do next:
+
==Welcome to Behat testing with Mahara==
 +
Behat testing is writing an automated test that tests the developers code by automatically, clicking around Mahara to check the devs submitted code doesn't break anything. This wiki section will teach you step by step how to write and submit your first Behat test.
 +
 
 +
Follow the steps below:
  
 
# [[Testing/Behat_Testing/Setup | Setting up your Mahara with Behat]]
 
# [[Testing/Behat_Testing/Setup | Setting up your Mahara with Behat]]
 
# [[Testing/Behat_Testing/Running test |Running tests]]
 
# [[Testing/Behat_Testing/Running test |Running tests]]
 +
# [[Testing/Behat_Testing/Writing tests |Writing tests]]
 +
# [[Testing/Behat_Testing/Steps |Steps]]
 +
# [[Testing/Behat_Testing/Error & Solutions |Errors & Solutions]]
 +
# [[Testing/Behat_Testing/Submitting tests |Submitting tests]]
 +
#[[Testing/Behat_Testing/Jenkins Maintenance |Jenkins Maintenance]]
 +
 +
==Behat code snippets==
 +
 +
If you want to get a human-readable(ish) list of all the existing Behat test scenarios:
 +
 +
<source lang="bash" enclose="div">
 +
cd /var/www/mahara
 +
find test/behat -name "*.feature" -exec grep -i -P "(Scenario)|(Feature)" {} \;
 +
</source>
  
 
[[Category: Behat]]
 
[[Category: Behat]]

Revision as of 16:26, 3 November 2015

Welcome to Behat testing with Mahara

Behat testing is writing an automated test that tests the developers code by automatically, clicking around Mahara to check the devs submitted code doesn't break anything. This wiki section will teach you step by step how to write and submit your first Behat test.

Follow the steps below:

  1. Setting up your Mahara with Behat
  2. Running tests
  3. Writing tests
  4. Steps
  5. Errors & Solutions
  6. Submitting tests
  7. Jenkins Maintenance

Behat code snippets

If you want to get a human-readable(ish) list of all the existing Behat test scenarios:

cd /var/www/mahara
find test/behat -name "*.feature" -exec grep -i -P "(Scenario)|(Feature)" {} \;