In Postman Monitor scheduling, what does setting the frequency to every 12 hours mean?
Think about how many times 12 hours fits into a day.
Setting the frequency to every 12 hours means the monitor runs two times per day, spaced 12 hours apart.
What will be the result of this Postman Monitor scheduling setup code snippet?
pm.monitor.schedule({
interval: 'PT1H',
timezone: 'UTC'
});
pm.test('Schedule interval test', () => {
pm.expect(pm.monitor.schedule().interval).to.eql('PT1H');
});Check if the interval is correctly set and retrieved.
The code sets the monitor schedule interval to 1 hour (PT1H) and the test confirms this value, so the test passes.
Which assertion correctly verifies that the next scheduled run time of a Postman Monitor is in the future?
Think about comparing dates to check if nextRun is after now.
The assertion checks that the nextRun date is greater (in the future) than the current date, which is correct.
What is the bug in this Postman Monitor scheduling script?
pm.monitor.schedule({
interval: 'PT24H',
timezone: 'UTC'
});
if(pm.monitor.schedule().interval === 'PT12H') {
console.log('Monitor runs every 12 hours');
}Look carefully at the if statement condition.
The if condition mistakenly uses assignment (=) instead of comparison (== or ===), causing a logic error.
In a CI/CD pipeline using Postman Monitors, which scheduling approach ensures tests run only after successful code deployment?
Consider how to align monitor runs with deployment success.
Triggering the monitor manually after deployment ensures tests run only when new code is deployed, avoiding false failures.