Difference between revisions of "Testing Area/Behat Testing"

From Mahara Wiki

< Testing Area
m (Welcome to Behat testing with Mahara)
(7 intermediate revisions by 2 users not shown)
Line 4: Line 4:
Follow the steps below:
Follow the steps below:
# [[Testing/Behat_Testing/Setup | Setting up your Mahara with Behat]]
# [[Testing_Area/Behat_Testing/Setup | Setting up your Mahara with Behat]]
# [[Testing/Behat_Testing/Running test |Running tests]]
# [[Testing_Area/Behat_Testing/Running test |Running tests]]
# [[Testing/Behat_Testing/Writing tests |Writing tests]]
# [[Testing_Area/Behat_Testing/Writing tests |Writing tests]]
  * [[Testing/Behat_Testing/Basics |Basics]]
## [[Testing_Area/Behat_Testing/Basics |Basics]]
  * [[Testing/Behat_Testing/Characteristics of a good test |Characteristics of a good test ]]
## [[Testing_Area/Behat_Testing/Characteristics of a good test |Characteristics of a good test ]]
  * [[Testing/Behat_Testing/Selectors and Elements |Selectors and Elements ]]
## [[Testing_Area/Behat_Testing/Selectors and Elements |Selectors and elements ]]
# [[Testing/Behat_Testing/Steps |Steps]]
# [[Testing_Area/Behat_Testing/Data set up | Data set up]]
# [[Testing/Behat_Testing/Error & Solutions |Errors & Solutions]]
# [[Testing_Area/Behat_Testing/Steps |Steps]]
# [[Testing/Behat_Testing/Submitting tests |Submitting tests]]
# [[Testing_Area/Behat_Testing/Error & Solutions |Errors and solutions]]
#[[Testing/Behat_Testing/Jenkins Maintenance |Jenkins Maintenance]]
# [[Testing_Area/Behat_Testing/Submitting tests |Submitting tests]]
# [[Testing_Area/Behat_Testing/Jenkins Maintenance |Jenkins maintenance]]
==Behat code snippets==
==Behat code snippets==

Latest revision as of 13:07, 8 June 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
    1. Basics
    2. Characteristics of a good test
    3. Selectors and elements
  4. Data set up
  5. Steps
  6. Errors and 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)" {} \;