Testing Area/Behat Testing: Difference between revisions
From Mahara Wiki
< Testing Area
No edit summary |
No edit summary |
||
(15 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
== | ==Welcome to Behat testing with Mahara== | ||
https://docs.behat.org/en/latest/guides.html the behat home site! | |||
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_Area/Behat_Testing/Setup | Setting up your Mahara with Behat]] | |||
# [[Testing_Area/Behat_Testing/Running test |Running tests]] | |||
# Writing tests | |||
## [[Testing_Area/Behat_Testing/Basics |Basics]] | |||
## [[Testing_Area/Behat_Testing/Characteristics of a good test |Characteristics of a good test ]] | |||
## [[Testing_Area/Behat_Testing/Data set up | Data set up]] | |||
## [[Testing_Area/Behat_Testing/Steps |Steps]] | |||
## [[Testing_Area/Behat_Testing/Selectors and Elements |Selectors and elements ]] | |||
# [[Testing_Area/Behat_Testing/Error & Solutions |Errors and solutions]] | |||
# [[Testing_Area/Behat_Testing/Submitting tests |Submitting tests]] | |||
# [[Testing_Area/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]] |
Latest revision as of 15:43, 7 August 2020
Welcome to Behat testing with Mahara
https://docs.behat.org/en/latest/guides.html the behat home site! 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:
- Setting up your Mahara with Behat
- Running tests
- Writing tests
- Errors and solutions
- Submitting tests
- 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)" {} \;