Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save bcarun/a6ac286d26063c054842c702a454cf56 to your computer and use it in GitHub Desktop.

Select an option

Save bcarun/a6ac286d26063c054842c702a454cf56 to your computer and use it in GitHub Desktop.
Feature: Create Employee
Scenario Outline: <testCase> <expectedResult>
-----------------------------------------------
1. Create employee without first name fails.
2. Create employee without last name fails.
... other validations
-----------------------------------------------
Given user wants to create an employee with the following attributes
| id | firstName | lastName | dateOfBirth | startDate | employmentType | email |
| 110 | <firstName> | <lastName> | <dateOfBirth> | <startDate> | <employmentType> | <email> |
And with the following phone numbers
| id | type | isdCode | phoneNumber | extension |
| 111 | Mobile | +1 | 2141112222 | |
| 112 | Office | +1 | 8362223000 | 333 |
When user saves the new employee '<testCase>'
Then the save '<expectedResult>'
Examples:
| testCase | expectedResult | firstName | lastName | dateOfBirth | startDate | employmentType | email |
| WITHOUT FIRST NAME | FAILS | | Green | 1990-01-01 | 2018-01-01 | Permanent | [email protected] |
| WITHOUT LAST NAME | FAILS | Rachel | | 1990-01-01 | 2018-01-01 | Permanent | [email protected] |
| WITHOUT DATE OF BIRTH | FAILS | Rachel | Green | | 2018-01-01 | Permanent | [email protected] |
| WITHOUT START DATE | FAILS | Rachel | Green | 1990-01-01 | | Permanent | [email protected] |
| WITHOUT EMPLOYMENT TYPE | FAILS | Rachel | Green | 1990-01-01 | 2018-01-01 | | [email protected] |
| WITHOUT EMAIL | FAILS | Rachel | Green | 1990-01-01 | 2018-01-01 | Permanent | |
| WITH ALL REQUIRED FIELDS | IS SUCCESSFUL | Rachel | Green | 1990-01-01 | 2018-01-01 | Permanent | [email protected] |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment