Forum Discussion

jakeyizle's avatar
jakeyizle
New Contributor
4 years ago

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?

  • 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 .

  • 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 .

    • jakeyizle's avatar
      jakeyizle
      New Contributor

      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.

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    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.)