A default environment is created for each project by default. You cannot edit or delete the Default environment. However, you can add new environments. You can have different selectors, variables and endpoints depending on the environment. Below you will find the information on how to add new environments and use them in tesing.
Add a New Environment
In order to create an environment:
- Click the Environment dropdown and click Add under More in the dropdown list. An Add Environment modal will be displayed.
- Enter the environment Name and Description and click SAVE. An Environment has been created successfully toast message will be displayed.
When you run a test in a specific environment, only the items (selectors, variables, endpoints) existing in it will be used. The ones that have not been created for this environment, will be taken from the Default environment. |
Using Environments in Automated Test Cases
In order to use an environment in a test case, in the begining of a scenario, simply add a sentence:
Given environment "<Environment name>"
By using this sentence, you indicate that all the selectors, variables and endpoints existing in this environment and referred to in this test case should take on the value specified in this environment.
Comments
0 comments
Please sign in to leave a comment.