0
0
Postmantesting~10 mins

Collection runner results in Postman - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to get the total number of requests run in the collection.

Postman
let totalRequests = collectionRunner.results.[1];
Drag options to blanks, or click blank then click option'
Alength
Bcount
Ctotal
Dsize
Attempts:
3 left
💡 Hint
Common Mistakes
Using count or size which are not valid properties for arrays in JavaScript.
2fill in blank
medium

Complete the code to access the status code of the first request result.

Postman
let statusCode = collectionRunner.results[0].response.[1];
Drag options to blanks, or click blank then click option'
Acode
Bstatus
CstatusCode
DresponseCode
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'status' or 'code' which are not the exact property names in Postman response objects.
3fill in blank
hard

Fix the error in accessing the response time of the last request result.

Postman
let lastResponseTime = collectionRunner.results[collectionRunner.results.[1] - 1].responseTime;
Drag options to blanks, or click blank then click option'
Asize
Blength
Ccount
Dtotal
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'count' or 'size' which are not valid array properties.
4fill in blank
hard

Fill both blanks to filter results with status code 200 and map their response times.

Postman
let fastResponses = collectionRunner.results.filter(r => r.response.[1] === 200).map(r => r.[2]);
Drag options to blanks, or click blank then click option'
AstatusCode
BresponseTime
Cstatus
Dtime
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect property names like 'status' or 'time' which do not exist.
5fill in blank
hard

Fill all three blanks to create an object with request names as keys and their response codes as values for successful requests.

Postman
let successStatus = { [1]: [2].name, [3]: [2].response.statusCode };
Drag options to blanks, or click blank then click option'
Akey
BcollectionRunner.results[0]
Cvalue
DcollectionRunner.results[1]
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect variable names or mixing up indexes.