Forum Discussion

msaunders's avatar
msaunders
Contributor
11 years ago
Solved

grouping tests to run

I have written scripts across 3 "units" and i need to run them. 



I know how to add test items and then run them but my dilemma comes that i want to only run some tests at a time and other sets at other times. So i want something like 



SmokeTest "abci'

Undo Test "aefghi"

mats group runs "a-i"



Only i will be using test complete, the others will be using testExecute so i am trying to make it easy on them.

 my first attempt i just ended up making 3 files and naming them then having Execute point to the pjs and run. That worked great but i had tons of redundancy between the modules. 



I also tried right clicking on the project in the explorer and adding a new item, but the second item cannot see any of my units in the first one.   I am thinking its something along the lines of //USEUNIT and point to the units in the first project but i am not getting it to play nice with me.  in the end i want it to it to be undo runs:



"Testexecute.exe Collab.pjs UndoUnit /r /e"  



Then at another time SmokeTest runs and so on.

I never want them to all run back to back though, just want to run in random sets but also reuse code to keep down redundancy. 
















  • Hi Mathew,


     


    Do you want to run a group of test items? You can use an approach listed here.


     

2 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Mathew,


     


    Do you want to run a group of test items? You can use an approach listed here.


     

  • That was close and got me thinking, i solved it using that info. I made another unit and put the routines i wanted in order i.e.




    //USEUNIT SmokeTestSource


    function RunSmokeTestDev()


    {


      bringToFront()


      testSizing()


      ResizeWindow()


      createSceanrio()


      setViewpoint()


      BasicViewpoint()


      Palette()


      BasicCulture()


      BasicBehavior()


      CultureAttach()


      BehaviorAttach()


      exitCancel()


      exitDontSave()


    }



    I am then making another but it will be 

    function SmokeTestBuild()

    function SmokeTestQA()



    etc



    then from TestExecute i will call



    TestExecute.exe <mypjs> <unit> <routine> 

    that will be decided by the goal at that time. 



    I did a lot of reading past few days and realized i should not have all my main code in my test file jus tthe routines i want bundled to keep it clean. This is my first job that has code beyong general scripting so i have a lot to learn. thank you for link it opened my eyes :)