Skip to content

Feature File: Create New Employee

Mahmoud A. Zaid edited this page Mar 17, 2019 · 3 revisions

The objective in this lesson and the next one is to learn how to Serialize the object to send it as A JSON body in API request with method POST

Create a new feature file

Feature: CreateNewEmployee
This page will contains information about, how to create employee data using rest /employee.

Scenario: Create a new employee
Given Create Request "create" with "POST" method
When I create a request body with the following values
| name	     |salary| age |  
|TestEmployee| 5000 |25   |
And Add the serialized body to the API request
And Execute API
Then returned status code will be "200"