Forum Discussion

eli's avatar
eli
New Contributor
13 years ago

Running a distributed test multiple times, please help!

Greetings all!



Before I ask my question please know that I'm totally new to testing and to the SmartBear applications so please be gentle =)



I've created Project Suite with a single keyword test with Test Complete 8.70.727.7 and set it up with the NetworkSuite and it runs my test fine.



My question however is, How do I get Test complete (or Test execute) to run the test more than once automatically?



I've found the "Count" column when setting up the Test items and have set it to 5 but when I Run the Network suite it only completes the test once before exiting and retrieving the logs.



Thank you all in advance, 



Eli.

10 Replies


  • Hi Eli,


     


    That's strange. The column you found is what you need. How are you running the test? You need to run the project that contains this test item or a project suite.


     

  • eli's avatar
    eli
    New Contributor
    Hello Tanya, 



    Thank you for your response and sorry for the extended delay in replying to my query as I've just recently returned from Annual Leave.



    I'll investigate how I'm running my tests and let you know the outcome within a few days. 



    Thanks again for the information. 



    Kind Regards, 

    Eli Brown.





  • I am very new to Test Complete and using the trial preiod. How can i run single test multiple times?



    thanks
  • ritxart's avatar
    ritxart
    New Contributor
    Hi, so how can I do it using a variable?



    I mean, I'm trying to execute my test in 3 diferents enviroments, so I have a projectSuite variable which is an integer and depends on its value I go in one link or another.



    I can do it mannually but I wuold like to do it automatic.

  • Hi Roc,


     


    You can add the appropriate handler to the script. Here is the pseudocode:


    If (ProjectSuite.Variables.<VariableName> == 1)


      /// run the needed test


     


    If this is not what you need, please describe your task in detail. 

  • ritxart's avatar
    ritxart
    New Contributor
    Hi again!



    Sorry I think I didnt explained myself enough.



    I would like to execute a proper project, or Projectsuite.



    So the idea is.



    If var == 0; it will go to https://enviromenttest0  ---user0

    If var == 1; it will go to https://enviromenttest1  ---user1

    If var == 2; it will go to https://enviromenttest2  ---user2

    ...



    I have this var on the ProjectSuite but I don't know how to execute all of them authomatically.



    Thanks



  • Hi Roc,


     


    Are you using Name Mapping? If you are, you could consider specifying the site pages names (or the constant part of the name) in the project variable.


    Then, specify this variable in the corresponding mapped object:




     


    As a result, once you change the value of the variables, TestComplete will work with the corresponding web page.


     




  • ritxart's avatar
    ritxart
    New Contributor
    Hi again!



    Sorry for not enough information.



    Well I use this variable for many other things, like a table with differents users etc.



    So I would like to execute the project suite in a loop, and loop as many times as I want changing this variable.


  • Hi Roc,


     


    I guess something like this should work then:


     


    function runTest()


    {


      // Specify the part of the page that will be permanent for all users


      var pageLinkPermPart = "https://enviromenttest";


     


      // This variable stores the ID of the user


      var userNumber = Project.Variables.Var1;


     


      // Find out the resulting page name: https://enviromenttest<UserNumber>


      var pageLink = pageLinkPermPart + userNumber;


      


      // Launch the browser and open the needed page 


      Browsers.Item(btIExplorer).Run(pageLink);


    }