Actions

Difference between revisions of "Testing Area/Behat Testing/Characteristics of a good test"

From Mahara Wiki

< Testing Area‎ | Behat Testing
Line 4: Line 4:
  
 
<pre>
 
<pre>
 +
@javascript
 
  Feature:  
 
  Feature:  
 
   In order to  
 
   In order to  
Line 10: Line 11:
  
 
  Scenario:
 
  Scenario:
    
+
   Given
Or for multiple scenarios on one page
+
  And
 
+
  When
 +
  And
 +
  Then
  
  

Revision as of 10:28, 16 December 2014

How to write a good test

Template

 @javascript 
 Feature: 
  In order to 
  As an
  So I can

 Scenario:
  Given
  And
  When
  And
  Then 



Feature

Good features clearly explain what you are trying to do. If you are using a bug from Launchpad to write the test, use the title of the bug in the title of the feature.

Feature:
 In order to 
 As a
 So I can 


Tags

Always attach a @javascript tag

Scenario


Background


Steps


Comments