Environment Specific Configuration/Variables
Hello - I use TestComplete to test a web app that exists in different environments (DEV, QA, Staging, etc.).
One issue I have is that when I want to run tests in a different environment, I need to manually change data in either TestComplete data-tables, TestComplete project-level variables, or my Excel Sheets. So every time I change environments, I need to change the URL, the test users, some of the input data, etc. Obviously this is getting tiring, and sometimes we forget to change certain properties which wastes time.
In Selenium/Protractor, I would just create different config files and then pass in a command line argument to determine which config file to use. Is there a way of doing that in TestComplete, or are there any other ways to manage running TestComplete with different variables/properties?
Solved! Go to Solution.
you can maintain your Test Data in different excel sheet for different environment , feed that data as Test parameter , from there Test can pick up updated Data .
> In Selenium/Protractor, I would just create different config files and then pass in a command line argument to determine which config file to use.
You can do the same for TestComplete as well.
Also, if URLs for different environments are different, you may add a code that will analyze tested URL and adjust settings for data/configuration files appropriately.
If you execute tests against different environments from different machines, then you may consider Shared Mode. (While the functionality for customized property values seems to be broken for a long time and not fixed yet.)
/Alex [Community Hero]
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
This sounds like a really good idea - my rough draft is to create excel tables with property/value pairs and then use a script to read from the sheet and create project-level variables. And then for Ci/CD runs I can set the sheet as a command line parameter.
Thank you for the suggestion.