Forum Discussion

nishaa123's avatar
nishaa123
Contributor
7 years ago
Solved

Running same Project from different Test Execute.

I have created a Project in Test Complete.

I want to Run the same project on 5 different machines through test execute with different data.

Could you tell me what is the best way doing it.

I am following below process.Is it correct or we have some provision for this Scenario?

I am creating 5 clone project and pointing it to 5 different test data.But the Problem is when i make any code changes in one Project in test complete , i need to make same changes to all other 4 clone projects too.

 

Please Guide

  • This is where you need to write some code to 

     

    a) detect the machine

    b) read some sort of data file which tells you what tests to run for that machine

    c) queue up the list of tests in an array or something

    b) execute the tests

     

    It's a kind of data driven model where a data source (be it a CSV, Excel sheet, database, INI file, XML file, etc) actually determine which test cases to run.

9 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    I'm assuming the test data is an excel spreadsheet or SQL database or something?

     

    The way I would do it is not using 5 clones of a project but a single project.  I then use some sort of external indicator (command line switch (takes some custom code), Persistant Project Variable, INI file (use Storages.INI to read), or similar thing) and incorporate into my project code that, immediately on running the whole project (like the first test item), read the INI file, update a variable with a string to indicate the data source desired for that test run, and then execute the tests.  

     

     

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    Are you going to be running these tests at different times or are you trying to set up something like overnight testing in five different environments?

    • nishaa123's avatar
      nishaa123
      Contributor

      Yes running test overnight on five different environments.

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        I agree with tristaanogre's approach to setting up just one project and using variables or something similar to pick the test dataset.

         

        If you want to run the tests one at a time in a row, then just set them as test items inside the TC project with different parameters in the order you want them and run the whole project.  

         

        If you want to run them at the same time in different environments, then you might want something closer to what we use.  Each separate environment script gets the latest application code and checks its own copy of the TC project out and then runs.  In that case, you'll want to pass the parameters in from whatever framework you use (we have Bamboo).