I am facing a challenge with my login API request that requires 3 parameters (userName, password, and remember) in the request body. Out of these parameters, userName and password are mandatory, while remember is optional. The input data is being pulled from a CSV file during runtime, with the following content:
https://i.sstatic.net/6rRYS.png
My goal is to use this request with different inputs, generating the request body accordingly. Here is an example of how the request body should look for each iteration:
Iteration 1,
{
"userName": "{{userName}}",
"password": "{{password}}"
}
iteration 2,
{
"userName": "{{userName}}",
"password": "{{password}}",
"remember": {{remember}}
}
iteration 3,
{
"userName": "{{userName}}",
"password": "{{password}}",
"remember": {{remember}}
}
In addition, specific assertions need to be implemented for each iteration based on the response received. I would appreciate any guidance on how to achieve this.