Actions

Testing Area/Behat Testing

From Mahara Wiki

< Testing Area
Revision as of 13:50, 8 June 2020 by Anitsirk (talk | contribs)

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