Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

228
Views
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

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

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
over 4 years ago · Santiago Trujillo Report

0

Reference for the people who just want to use Chrome’s Developer Tools (which will let you see console output and give you many more features)

To enable it

  1. Type chrome://flags inside your Chrome URL window
  2. Search for "Debugging for packed apps" setting
  3. Enable the setting
  4. Restart Chrome

You can access the Developer Tools window by right clicking anywhere inside Postman and selecting "inspect element".

You can also go to chrome://inspect/#apps and then click "inspect"

Reference

over 4 years ago · Santiago Trujillo Report

0

I used this, which isn't the prettiest, but it works for what I needed.

tests["your test name here " + data.data.length] = data.data.length > 100;
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!