pm.test("success status", () => pm.response.to.be.success );
pm.test("Status code is 200 or 201", function () {
pm.expect(pm.response.code).to.be.oneOf([200, 201]);
});
pm.test("Response time is less than 300ms", () => {
pm.expect(pm.response.responseTime).to.be.below(300);
});
pm.test("Response status code contains 'Created' or 'OK'", function () {
console.log(pm.response.status);
pm.expect(pm.response.status).to.be.oneOf(['Created', 'OK']);
});
pm.test("Response body is not empty", function () {
pm.expect(pm.response.text()).to.not.be.empty;
});
👋 Hi, I'm Suriya — QA Engineer with 4+ years of experience in manual, API & automation testing.
📬 Contact Me | LinkedIn | GitHub
📌 Follow for: Real-Time Test Cases, Bug Reports, Selenium Frameworks.
No comments:
Post a Comment