Saturday 28 April 2018

Gherkin: Scenario Keyword

A ‘.feature’ file is a collection scenarios. A Scenario describes one complete working flow of the application. In technical terms, a scenario is mapped to a test case.

StudentPassStatus.feature
Feature: Student Pass status 

 Student pass status is decided based on below criteria.
 ---------------------------------------------------
  < 60  : second class
  >= 60 && < 70 : First class
  > 70 : Distinction
 ---------------------------------------------------
 
Scenario: Checking Second Class 
 Student will be notified as second class, if he got < Sixty percentage
  
 Given I am a student 
 When I got Fifty Five percentage of marks 
 Then I should be notified as Second Class 
 
Scenario: Checking First Class 
 Student will be notified as First class, if he got >= Sixty && < Seventy percentage
  
 Given I am a student 
 When I got greater than or equal to sixty and < seventy percentage of marks 
 Then I should be notified as First Class 
 
Scenario: Checking Destinction 
 Student will be notified as Distinction if he got > Seventy percentage
  
 Given I am a student 
 When I got greate than seventy percentage of marks 
 Then I should be notified as Distinction




Previous                                                 Next                                                 Home

No comments:

Post a Comment