Complete the code to create a new collection in Postman.
pm.collectionVariables.set('collectionName', '[1]');
The collection name should be a meaningful title like 'My API Tests' to organize requests clearly.
Complete the code to add a request to a collection in Postman.
pm.collection.addRequest({ name: 'Get User', url: '[1]', method: 'GET' });The URL must be the endpoint you want to test, like 'https://api.example.com/users'.
Fix the error in the code to correctly save a request in a folder.
pm.collection.folders.[1]('User Requests').addRequest(request);
Use 'create' to make a new folder before adding requests to it.
Fill both blanks to filter requests by method and save the filtered list.
const filtered = requests.filter(r => r.method [1] 'GET' && r.status [2] 200);
Use strict equality '===' to check method and status exactly match 'GET' and 200.
Fill all three blanks to create a test that checks response status and content type.
pm.test('Status is [1]', () => { pm.response.to.have.status([2]); pm.response.to.have.header('[3]'); });
The test name should be descriptive like '200 OK'. The status code is 200, and the header to check is 'Content-Type'.