reqres.feature
Feature: Reqres api test cases
Scenario Outline: register user post -data driven test of negative scenarios
Given url 'https://reqres.in/api'
And path 'register'
And def payload =
"""
{
"email": "<email>",
"password": "<password>"
}
"""
And request payload
When method post
Then status 400
* print response
* match response == <errorResponse>
Examples:
| email | password | errorResponse |
| null | null | {"error": "Missing email or username"} |
Because of this I am getting response { "error": "Note: Only defined users succeed registration" } instead of this response {"error": "Missing email or username"}. How to solve this issue?