UserControl UserControl - 4 months ago 23
Javascript Question

Debug output in tests

How do I output some information in Postman tests?

console.log(tv4.error);
tests["Valid Data1"] = tv4.validate(data1, schema);


console.log()
seems to be working but I want to output my info into the same panel where my assertions go (for easier correlation):

enter image description here

Answer

Just make a fake test that passes:

var jsonData = JSON.parse(responseBody);
tests["id = " + jsonData.id] = true;              // debug message
tests["name = " + jsonData.name] = true;          // debug message
Comments