Complete the code to disable SSL certificate verification in Postman settings.
pm.settings.set('[1]', false);
In Postman, the setting to disable SSL certificate verification is sslVerification. Setting it to false turns off SSL checks.
Complete the test script to check if SSL certificate verification is enabled.
pm.test('SSL verification is enabled', () => { pm.expect(pm.settings.get('[1]')).to.be.true; });
The correct setting to get SSL verification status is sslVerification. This test checks if it is enabled (true).
Fix the error in the test script to correctly assert SSL verification is disabled.
pm.test('SSL verification disabled', () => { pm.expect(pm.settings.get('[1]')).to.be.false; });
The correct key to check SSL verification status is sslVerification. Using this key ensures the assertion works properly.
Fill both blanks to create a test that disables SSL verification and confirms it is disabled.
pm.settings.set('[1]', false); pm.test('SSL verification is disabled', () => { pm.expect(pm.settings.get('[2]')).to.be.false; });
Both setting and getting the SSL verification status use the key sslVerification. This ensures the test disables and verifies the setting correctly.
Fill all three blanks to write a test that disables SSL verification, sends a request, and checks the response status is 200.
pm.settings.set('[1]', false); pm.sendRequest('https://example.com', (err, res) => { pm.test('Response status is [2]', () => { pm.expect(res.code).to.eql([3]); }); });
The test disables SSL verification with sslVerification, sends a request, and asserts the response status is 200, indicating success.