Forum Discussion

jtdavies's avatar
jtdavies
Occasional Contributor
7 years ago

Three newbie questions

1. I have three tested apps that are run in sequence. Is there any way I can put a delay between them to give the first a chance to fully startup before the second and third?

 

2. Alternately, can I automatically start the first two tested apps and keep them running throughout all the tests and only close them when all tests are completed?

 

3. Can I specify a startup folder for a tested app? The first test I wrote is having path problems.

  • 1) Every app can be run individually.  TestedApps.AppName.Run() will run that individual item if you're running it in script code.  If you're using a keyword test, when you use the "Run TestedApp" operation, you can specify either All applications or individual ones.  In both cases, if you want to wait for one to be loaded before the next, the easy answer is to use a hardcoded delay (Utils.Delay for script or the "Delay" operation in keyword tests).  However, what I would recommend is to use some method to "Wait" for the main form of the application to appear before starting the next.  There are various ways of doing this.  Search the help for the many articles on how to do this.

     

    2) Yes.  You are in control of your tests.  You can determine when an app runs and when it closes.  So, it's just a matter of not including the "close" command for those two applications until you finish all your tests.  So, what I would do is create a "test" that starts up the applications and another one that closes them and bracket those around all your other test cases.

     

    3) When creating a "TestedApp" there's a "working folder" field.  Enter in there the folder that you want to use as your starting folder for your application.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    1) Every app can be run individually.  TestedApps.AppName.Run() will run that individual item if you're running it in script code.  If you're using a keyword test, when you use the "Run TestedApp" operation, you can specify either All applications or individual ones.  In both cases, if you want to wait for one to be loaded before the next, the easy answer is to use a hardcoded delay (Utils.Delay for script or the "Delay" operation in keyword tests).  However, what I would recommend is to use some method to "Wait" for the main form of the application to appear before starting the next.  There are various ways of doing this.  Search the help for the many articles on how to do this.

     

    2) Yes.  You are in control of your tests.  You can determine when an app runs and when it closes.  So, it's just a matter of not including the "close" command for those two applications until you finish all your tests.  So, what I would do is create a "test" that starts up the applications and another one that closes them and bracket those around all your other test cases.

     

    3) When creating a "TestedApp" there's a "working folder" field.  Enter in there the folder that you want to use as your starting folder for your application.

    • jtdavies's avatar
      jtdavies
      Occasional Contributor

      I have a Word document that shows a possible before/after comparison that I’m looking into. There are many ways of accomplishing the same task, this is just an example.

       

      Since this is an unreleased product, could I send the Word doc direct instead of having it posted on the forum?

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        You can... note that, with the exception of the few SmartBear employees that frequent these forums, MOST of us are gainfully employed and anything we do here is extra beyond our paying jobs.... so, feel free to send direct.... but it may be a while before I can reply.