Can you write one test and just change the environment variable?
See original GitHub issueIs it possible that you can have one test in your *.http file and just simply just the variable on one iteration, and then another iteration have it change?
I have a use case for this as I want to run tests against a CDN and the Load Balancer behind the CDN. An example would be like:
// Iteration 1&2
GET {{cdnDns}}/healthcheck
GET {{lbDns}}/healthcheck
// Assertions should be the same, since response should be the same.
// Assert Result on both iterations
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Is it possible to set environment variables for exactly one test?
I would like to set the x and y environment variable for this one test only. Is that possible? javascript · node.js ·...
Read more >Edit environment variables programmatically in Unit Tests #3218
To support table-driven testing, I'd like to define a static list of data before executing tests. In some special cases, these data can...
Read more >Environment Variables: What They Are and How To Use Them
Updating the environment variables when they're stored independently is simpler—you do not need to edit your source code and make a new release ......
Read more >How To Set Environment Variables - Twilio
In the new window that opens, click on the Advanced tab and afterwards on the Environment Variables button in the bottom right of...
Read more >Environment Variables | Cypress Documentation
You can set environment variables for specific suites or tests by passing the env values to the test configuration. Suite of test configuration....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, the script Context is a real NodeJS Context. You can use all functionality of JavaScript, I prefer using
indexOf
but NodeJS should also supportincludes
(not sure). You couldJSON.stringify
the complete response and useindexOf
If there are any questions just contact me again:-)