Debug output in tests

UserControl picture UserControl · Jul 1, 2015 · Viewed 36k times · Source

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

Veener picture Veener · May 6, 2016

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