0
I made an environment variable that takes the ID of a registered Account, and when I go in my Find ID method I’m validating to see if I brought what I’m waiting for by passing code:8631 as Request. The return of my method shows the code being 8631. My environment variable "idConta" also has the value 8631. However this giving error, says that the number is not equal to the other, already tried with pm.expect also and nothing.
let responseJson = JSON.parse(responseBody);
pm.test("deve retornar um elemento",function(){
if(responseJson.code === "{{idConta}}"){
pm.response.to.be.ok;
}else{
pm.response.to.be.error;
});
The returned data type is the same as you compare in the condition?
– Darlei Fernando Zillmer