Closed FrankRua closed 2 years ago
There are several ways. I have per environment a setting system
, on which I query in the sequence. But you could also access httpFile.activeEnvironment
directly.
GET https://httpbin.org/json
{{
if(system === 'dev'){
test.status(200);
}
}}
export $cancel
in script to cancel complete request, (but it cancels complete execution)
{{
exports.$cancel = this.system !== 'dev';
}}
GET https://httpbin.org/json
disable httpRegion in global script at start of file
{{
for(const httpRegion of httpFile.httpRegions){
httpRegion.metaData.disabled = this.system !== 'dev';
}
}}
###
GET https://httpbin.org/json
Do any of the solutions work for your use case or do you have another idea?
As a developer, there are certain test that I don't want to run in production but do want to run in non-production. Is it possible to skip test execution depending on environment?