Testing Area/Behat Testing/Basics
From Mahara Wiki
< Testing Area | Behat Testing
How to write a Behat test
Behat tests are written in Gerkin language, which is English readable. You write the test in a text editor like Vim, Gedit or Eclipse. For beginners, Gedit is reccomended.
To write the test start with the feature, you are about to click around Mahara and test an area so say:
Feature: Creating a Portfolio page <- (the point of the test) In order to have a portfolio page in Mahara <- (What you are wanting to do) As a student <- (Who you are logging in as eg student, admin, institution admin) So I can save my work on my Portfolio page <- (How you benefit from it)
Scenario: Creating a Portfolio page <- (Describe what you are about to do to test it works)
You can follow the Behat documentation below on how to write a test:
[1]