Forum Discussion

ex's avatar
ex
Occasional Contributor
9 years ago
Solved

Execute a group of tests in Network Suite in series

In a Master Network Suite, I can have a task that can run one task on a remote computer. I am unable to assign multiple tasks to the same Job, as they would try to executed on the same Slave machine at the same time.

 

What I am trying to accomplish is something along the lines of creating a group of tasks to execute on the remote machine (much like making a new group in a project, but only calling that specific group from Network Suite)

 

In summary, I would click run on Network Suite and it would execute with the following structure:

 

Network Suite

            Jobs

                       Job1

                                Task1, run on PC A

                                                          run script 1

                                                          run script 2

                                                          run script 3

                                                          run script 4

                                Task2, run on PC B

                                                          run script 5

                                                          run script 6

                                                          run script 7

 

where Task is running a group of files found in a different project suite. 

 

Thank you for your time! 

  • ex's avatar
    ex
    9 years ago

    I did something along those lines, 

     

    I made a helper called Run() 

     

    function Run(){
        for (var i = 0; i < arguments.length; i++)
        { 
            Log.AppendFolder("Folder 1");
            arguments[i]();
            Log.PopLogFolder();
        }
    }

     

    and I run the tests by calling Run(test1,test2,test3) ... 

     

    Thank you for the help!

6 Replies

  • In a similar situation, using a runner script has worked well in distributed testing:

     

    function Main() {
      
       var lResult = 1;
       try {
      
          var asScripts = ["Script_1.Main","Script_2.Main","Script_3.Main","Script_1.Main"]
         
          for (var i = 0; i < asScripts.length; i++) {
             Runner.CallMethod(asScripts[i]);
          }
         
       }     
       catch (ex)  {
          lResult = 0;
       }
       return lResult; 

      • mtsmith's avatar
        mtsmith
        Contributor

        Good catch, try this, changes are in bold:

         

        //USEUNIT Script_1

        //USEUNIT Script_2

        //USEUNIT Script_3

         

        function Main() {
          
           var lResult = 1;
           try {
          
              var asScripts = ["Script_1.Main()","Script_2.Main()","Script_3.Main()"]
             
              for (var i = 0; i < asScripts.length; i++) {
                eval(asScripts[i]);
              }
             
           }     
           catch (ex)  {
              lResult = 0;
           }
           return lResult;