cancel
Showing results for 
Search instead for 
Did you mean: 

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

Staff

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,

Christina Lowe
Senior Manager, Customer & Partner Marketing
Christina.lowe@smartbear.com


7 REPLIES 7
Staff

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

Attaching the scripts as well. 


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Community Hero

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

@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



Regards,
Rao.
Staff

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

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


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Community Hero

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

Thank you @JKambli.

How to avoid script assertion being run twice when a step is run? why does it do in the first place?.




Regards,
Rao.
Staff

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

I think this is a bug, we had it logged on SOAPUI jira number was SOAP-2783, for some reason dev could not reproduce it. I tried it now and its reproducible.

 

Thanks 


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Community Hero

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

Thank you @JKambli for reproducing and letting us know the details. Please post if there are any updates on the same jira issue.


Regards,
Rao.
Staff

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

@nmrao Its fixed on 2.0.2, it runs twice only if script assertion window "OK" is clicked.

 

 


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
New Here?
Join us and watch the welcome video:
Top Kudoed Authors