Actions

Difference between revisions of "Testing Area/Behat Testing"

From Mahara Wiki

< Testing Area
m (Welcome to Behat testing with Mahara)
m (Welcome to Behat testing with Mahara)
Line 10: Line 10:
 
   * [[Testing/Behat_Testing/Characteristics of a good test |Characteristics of a good test ]]
 
   * [[Testing/Behat_Testing/Characteristics of a good test |Characteristics of a good test ]]
 
   * [[Testing/Behat_Testing/Selectors and Elements |Selectors and Elements ]]
 
   * [[Testing/Behat_Testing/Selectors and Elements |Selectors and Elements ]]
 +
# [[Testing/Behat_Testing/Data set up ]]
 
# [[Testing/Behat_Testing/Steps |Steps]]
 
# [[Testing/Behat_Testing/Steps |Steps]]
 
# [[Testing/Behat_Testing/Error & Solutions |Errors & Solutions]]
 
# [[Testing/Behat_Testing/Error & Solutions |Errors & Solutions]]

Revision as of 15:15, 29 May 2020

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
 * Basics
 * Characteristics of a good test 
 * Selectors and Elements 
  1. Testing/Behat_Testing/Data set up
  2. Steps
  3. Errors & Solutions
  4. Submitting tests
  5. 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)" {} \;