Hi Team,
While using Packages in Scripts tab, I am able to run it from my local machine, but when I am running it through Jenkins, it is failing the tests where I am using these packages.
I am getting Object.eval sandbox-script.js:1:2
In package library I have added below code:
function verifyStatus(statusCode){
pm.test("Verify Response status code is "+statusCode, function () {
pm.response.to.have.status(statusCode);
});
}
module.exports ={
verifyStatus
}
And in one of my tests I am using it :
const verifyStatusCode = pm.require('@raj/verify-status-code');
verifyStatusCode.verifyStatus(200);
I am able to run it from my local but it is failing when I am running it from Jenkins.
Is it a bug or currently Postman does not support Packages run from Jenkins.