0
0
Postmantesting~10 mins

Why Postman supports non-functional testing - Test Your Understanding

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

Complete the code to set a timeout for a Postman request.

Postman
pm.test('Response time is acceptable', function () {
    pm.expect(pm.response.responseTime).to.be.below([1]);
});
Drag options to blanks, or click blank then click option'
A'2000ms'
B2000
Ctimeout
DresponseTime
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string with units like '2000ms' instead of a number.
Using variable names instead of a numeric value.
2fill in blank
medium

Complete the code to check if the response size is less than a limit.

Postman
pm.test('Response size is within limit', function () {
    pm.expect(pm.response.responseSize.[1]).to.be.below(5000);
});
Drag options to blanks, or click blank then click option'
Asize
Blength
Clength()
Dlengths
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'length()' instead of 'size'.
Using 'size' on wrong object.
3fill in blank
hard

Fix the error in the code that checks if the response time is less than 1000 ms.

Postman
pm.test('Response time check', function () {
    pm.expect(pm.response.responseTime [1] 1000).to.be.true;
});
Drag options to blanks, or click blank then click option'
A<
B==
C>
D=
Attempts:
3 left
💡 Hint
Common Mistakes
Using assignment operator '=' instead of comparison.
Using equality '==' which checks exact match.
4fill in blank
hard

Fill both blanks to check if the response status is 200 and response time is below 1500 ms.

Postman
pm.test('Status and performance check', function () {
    pm.expect(pm.response.code).to.be.[1](200);
    pm.expect(pm.response.responseTime).to.be.[2](1500);
});
Drag options to blanks, or click blank then click option'
Aequal
Bbelow
Cabove
DnotEqual
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'above' for response time when we want below.
Using 'notEqual' for status code when expecting 200.
5fill in blank
hard

Fill all three blanks to create a test that checks response time below 1000, status code 200, and response body contains 'success'.

Postman
pm.test('Complete non-functional test', function () {
    pm.expect(pm.response.responseTime).to.be.[1](1000);
    pm.expect(pm.response.code).to.[2](200);
    pm.expect(pm.response.text()).to.include('[3]');
});
Drag options to blanks, or click blank then click option'
Abelow
Bequal
Csuccess
DnotEqual
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'notEqual' instead of 'equal' for status code.
Checking response time with 'above' instead of 'below'.
Missing quotes around the string 'success'.