Forum Discussion

CLowe's avatar
CLowe
Staff
7 years ago

SBA Elective Class - Advanced Groovy Scripting [Recap & Recording]

Hi All!

 

The recording from " SmartBear Academy - Elective Class - Advanced Groovy Scripting" is now available. For those of you who were able to join us for the live session, thank you for your active participation and questions.

As promised, here is the recording for you to view on-demand.

 

JKambli was able to provide the example from the class (see attached).

 

Thanks,

7 Replies

    • nmrao's avatar
      nmrao
      Champion Level 3

      JKambli,

       

      Thank you for the pdf document with the scripts.

       

      In the groovy script step, there are context, and testRunner variables being initialized. 

       

      In order to refer a test case object, any of the below two can be used. Is there is any specific difference?

       

      context.testCase

      testRunner.testCase

      • JKambli's avatar
        JKambli
        Staff

        On a groovy script test step (above example), its pretty much same but context essentially has current run data and it can leverage the data but testRunner has methods which can control flow (fail, cancel etc).

         

        context object is available at all levels since it holds information but testRunner is available only when you want to trigger a run.

         

        Thanks,

        Jeshtha