Test cases

The test cases are written using gherkin language and are stored on a github repository

https://github.com/openimis/openimis-gherkin

Bluesquare added some details about the various validations performed during the submission: Claim Submission Test Details.

The test case takes the point of view of a final user and need to follow Gherkin structure :

Gherkin structure

Feature

Group of use case that have a common business goal, for example submit a claim

Example
Feature: Enter a claim

Background

Prerequisites to resolve before starting the tests, a feature can have only on background

Example
Background:
Given HF with claim administrator is defined
Given the "Health facility claims page" is open
Given the Health facility and claim administrator are selected
Given the "Add" button was clicked

Rules

Actual behavior that will be tested, a feature can have multiple rules

Example
Rule: error message if mandatory information are missing 

Scenario

on of the approach to validate the rules, several scenario can be required to validate a rule

Example
Scenario: validation of the mandatory field
Given that no fields were filled 
When the "save" button is clicked
Then a message should appear to saying that the mandatory fields should be filled
And the mandatory fields should be highlighted in RED (Insurance Number, Claim No, Date claimed, Visit Date From, Visit Type, Main Diag)

Gherkin key words

in addition to the structure name, Gherkin has other key words

Given

Set a prerequisite for a specific scenario or background, if present must be the first keyword. to add multiple prerequisite the "And" key word must be used

Example
Given "Visit Date From","Visit Date To" are set
And the focus leaves the cell

When

Define what will trigger the test

Example
When a date is entered in "Claimed Date"

Then

Define the test result

Example
Then the system must check that the "Claimed Date" before or equal to today
And "Visit Date To" is before "Claimed Date"
And "Claimed Date" is after or equal "Visit Date From" 

And

helps to see when there is multiple conditions in a Given, When or Then






Did you encounter a problem or do you have a suggestion?

Please contact our Service Desk



This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. https://creativecommons.org/licenses/by-sa/4.0/