Created
February 27, 2022 23:19
-
-
Save daffahilmyf/3d1d00e3cbaa8f146ac43a0a33b32496 to your computer and use it in GitHub Desktop.
Example Test Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pm.test("Activities Get Collection Response Status Code Should be 200", ()=>{ | |
pm.expect(pm.response.code).to.eql(200); | |
}); | |
pm.test("Activities Get Collection Response Time Should Less Than 1000ms", () => { | |
pm.expect(pm.response.responseTime).to.be.below(1000); | |
}); | |
pm.test("Activities Get Collection Content-Type Header Should be application/json", ()=>{ | |
pm.expect(pm.response.headers.get('Content-Type')).to.contain('application/json'); | |
}); | |
pm.test("Activities Collection Response Should be Array of JSON", ()=>{ | |
pm.expect(pm.response.json()).to.be.an("array"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment