Your question may already have an answer on the community forum. Please search for related topics, and then read through the guidelines before creating a new topic.
Here’s an outline with best practices for making your inquiry.
Hello everyone, I was wondering since I’m always updating all environments when one change is made on any env… Is there a way to make one environment and target(test) all instances from one environment… I’d like to have one environment where I can target all of my envs:
Only thing that is different from env to env is password and path (example qa1.something.com, qa2.something.com and so on)
Details (like screenshots):
How I found the problem:
I’ve already tried:
This can be done by having multiple environment files and switching between them.
One click and you can test a different environment with the same tests.
Great for semi-automated testing.
Or you can have variables for each environment and then write code to switch, but that just sounds messy. Sound like you would have to group tests for each environment into its own folder, and that would just duplicate the tests and increase the effort in maintenance.
I’ve only just started with Postman, but the way I’ll be running my tests will be from Azure Dev Ops pipelines. (But it will be the same principle for any other continuous integration tool).
I will have separate pipelines for each environment, but the Newman command line will call the same collection and include the same environment file. It will be the same tests for each environment.
The environment file will be parametrized and I will send the endpoint (and potentially passwords\master keys) using the pipeline.
Taking this one step further. I will be using Azure Key Vault to store passwords and master keys, and the first step in the pipeline will be to pull this data so its not included in the code repository or in the pipeline.
I also want to tag tests so I could potentially execute only read only tests against prod but haven’t looked into that yet.
One step at a time.