Run one request with many rows of test data
QuizMediumAsked in: Capgemini, Infosys
You have a CSV file with columns email,expectedStatus and 30 rows. How do you run the sign-up request once per row?
- Run the collection with the CSV as the data file (Collection Runner, or newman run -d data.csv); the body uses {{email}} and tests read pm.iterationData.get("expectedStatus")
- Write 30 copies of the request
- Paste the CSV into the request body
- Postman cannot read CSV files
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.