Forum Discussion

pkimmel's avatar
pkimmel
Occasional Contributor
8 years ago
Solved

Can Testcomplete do distributed testing if an application is installed at different locations?

Can Testcomplete do distributed testing if an application is installed at different locations?  On one PC the application is installed in Program Files, in the other it is installed in Program Files (x86).  When I run the verification on a task created on one PC, it can't find the application on the other one.

  • hi pkimmel,

     

    I assume the exe you're trying to execute is in several places but has the same name.

    you have to distinguish the way you launch the exe and the way you work with one of its instances in memory.

    thus, you could launch several instances of an object and you could use for this the "TestedApps" items.

    for example, I added the testedapp "cmd" with a parameter :

     

    TestedApps.Clear;
    TestedApps.Add('\\mylocation\myapp.exe', '/my parameter', 1, true, '');
    TestedApps.myapp.Run;

     

    as you see, you could run a cmd.exe from any location. so you could by the code, with some switching parameters, use the same script to launch one exe or another.

     

    and... when the instance will be in memory, the aliases or the objects names in memory will be obviously the same...

  • and if the name is not exactly the same (for example myexev1.exe and myexev2.exe) you could use conditionnal mapping with both processes names and an "OR" operator.

7 Replies

  • m_essaid's avatar
    m_essaid
    Valued Contributor

    Hi pkimmel,

     

    you could do absolutely everything you want ...untill it works :)

     

    for example, I have 4 machines. 1 physical one, one vsphere for the night run, and 2 hyperV for the day.

    with this 4 machines I could test 2 versions of the same application, alpha and beta.

    on each machine it's barely copies of the applications. vsphere and physical machine same project, but have their own tested exe.

    hyperv gets the TestComplete project copied...

     

    as you see, it could be complex.

     

    but... the code (script) is unique. I use parameters.

     

    windows version does not matter unless you want to keep a coherence between the machine that build scripts and the machine that execute them.

     

    in 3 words, you're free.

  • m_essaid's avatar
    m_essaid
    Valued Contributor

    hi pkimmel,

     

    I assume the exe you're trying to execute is in several places but has the same name.

    you have to distinguish the way you launch the exe and the way you work with one of its instances in memory.

    thus, you could launch several instances of an object and you could use for this the "TestedApps" items.

    for example, I added the testedapp "cmd" with a parameter :

     

    TestedApps.Clear;
    TestedApps.Add('\\mylocation\myapp.exe', '/my parameter', 1, true, '');
    TestedApps.myapp.Run;

     

    as you see, you could run a cmd.exe from any location. so you could by the code, with some switching parameters, use the same script to launch one exe or another.

     

    and... when the instance will be in memory, the aliases or the objects names in memory will be obviously the same...

    • m_essaid's avatar
      m_essaid
      Valued Contributor

      and if the name is not exactly the same (for example myexev1.exe and myexev2.exe) you could use conditionnal mapping with both processes names and an "OR" operator.

  • Ravik's avatar
    Ravik
    Super Contributor

    Hi,

     

    here you must be getting compatibility issue, you can not run your distributed test on different configuration. (Configuration must be same on all machine - like  OS 64, same browser version, even computer theme should be same.)

     

    this may help you :)

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      Ravik wrote:

      Hi,

       

      here you must be getting compatibility issue, you can not run your distributed test on different configuration. (Configuration must be same on all machine - like  OS 64, same browser version, even computer theme should be same.)

       

      this may help you :)


      Well.... not ENTIRELY true... if you write your automation code well enough, you can account for differences in configuration.  For example, in this case, we're dealing with bit architecture of the environments.  You can write code to detect what bit version you are running (Sys.OSInfo.Windows64bit is a boolean... if true, you're on a 64 bit machine) and then detect your application location accordingly.

      It's been a while since I've done distributed testing but, just refreshing my information from the help file, the verification of a task doesn't really check whether the application under test can be run, it simply checks to see if the right conditions are set up in order to run the task, not whether or not the test itself can be run successfully.  So, as long as all the conditions are met (see https://support.smartbear.com/testcomplete/docs/testing-with/advanced/distributed/processing/verifying.html) the task can be verified.

       

      So... what it sounds like is not a problem with your application being tested, but with your setup, configuration, and environment for your distributed test.  Check through this list of possible problems and see if there's something going wrong here.

      https://support.smartbear.com/testcomplete/docs/testing-with/advanced/distributed/messages/verification-failed/index.html

       

       

      • Ravik's avatar
        Ravik
        Super Contributor

        Yes I am agree with you.

         

         

        (You can write code to detect what bit version you are running (Sys.OSInfo.Windows64bit is a boolean... if true, you're on a 64 bit machine) and then detect your application location accordingly)

         

        Actually I had few incidents where my distribute test was fail.

         

        1- Master computer and Salve computer (OS Theme) was not same hence getting issue.

        2- In IE 10 browser few text boxes are TextBox1, TextBox2 etc. but in IE 11 same textboxes become emailbox, passwordbox (like that)

        3- same like - Excel and OpenOffice.

         

        In this case we need to maintain separate NameMapping/Code to perform distribute test.