Created
April 2, 2019 10:58
-
-
Save vdespa/73ce40a23efc76f0148719af9ae80861 to your computer and use it in GitHub Desktop.
Simple example for reusing Postman scripts
This file contains hidden or 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
const commonTests = () => { | |
pm.test("Status code is 200", function () { | |
pm.response.to.have.status(200); | |
}); | |
} | |
pm.globals.set('commonTests', commonTests.toString()); | |
eval(pm.globals.get('commonTests'))(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment