Can you try doing the requests in Postman and see if you get the expected result?
Start environment:
Tests:
const response = pm.response.json();
pm.test("Received JobId", function () {
let jobId = response.JobId;
pm.expect(jobId).to.not.be.undefined;
pm.collectionVariables.set("JobID", jobId);
});
Start status:
Tests:
const response = pm.response.json();
if (response.Status === "Starting") {
console.log("Environment is starting...");
setTimeout(() => {}, 60000);
postman.setNextRequest(pm.info.requestId);
}
pm.test("Environment has started", function () {
pm.expect(response.Status).to.equal("Started");
});