I’m trying to run a test script that fetches the data from CSV or JSON file format, but I’m getting the error message as AssertionError: expected false to be truthy.
Reference data:
POST Req=https://reqres.in/api/register
Body={
“email”: “[email protected]”,
“password”: “pistol”
}
Response body:
- id: 4
- token: “QpwL5tke4Pnpja7X4”
CSV data =
[{
“endpoints”: “api/register”,
“email”: “[email protected]”,
“password”: 1234
}, {
“endpoints”: “api/register”,
“email”: “[email protected]”,
“password”: 12345
}]
Test script= tests[“contains email”]=responseBody.has(data.email);
tests[“contains password”]=responseBody.has(data[“password”]);
Error=AssertionError: expected false to be truthy
Please, need help on this.