Forum Discussion

jhgreen's avatar
jhgreen
Contributor
12 years ago

Running on different computers for 1 test

I have a test where some steps needs to run on 1 computer while the other test steps needs to run on another computer. Looking at the documentation it looks like I need to create separate tests for the 1 test which would be tasks in network suite. Is there a way where I do not have to split them out into separate tests.



Thanks,

Jeff

3 Replies

  • Hi Jeffrey,



    You can run test steps conditionally depending on the computer name, Windows version or other system properties. For example:



    if (aqString.ToLower(Sys.HostName) == "computer_1")

    {

      // Do something

    }



    if (aqString.ToLower(Sys.HostName) == "computer_2")

    {

      // Do something else

    }

  • Thanks for the reply. I did not think of that option. Unfortunately, that option

    would not work for me because I need to run some test steps on computer 1 and then run on another setup on computer 2. The workaround I had to was split out a test I originally had into 6 different tests.



    My preference would be to have 1 test where it would execute some steps on computer 1 then execute the next steps on computer 2 and then some steps back on computer 3.
  • A single test/script cannot work with multiple computers simultaneously. That's what network suites are for.