jcomber
3 years agoOccasional Contributor
Trying to restart docker images from ReadyAPI Groovy script
Is it possible to have a Groovy script within a ReadyAPI test suite that will restart docker image(s)? I have an existing Groovy script that works but copying/pasting into a ReadyAPI Groovy script test step doesn't seem to work. Am I expecting functionality from ReadyAPI that isn't supported with Groovy? If it's possible to attain this, how is it done - not finding much information online.
Hi Dezza,
You'll need to call the Run Code Snippet operation and specify there the following:
Runner.CallMethod("Unit1.theTest", Runner.CallMethod("Unit1.generateRef"), Runner.CallMethod("Unit1.generateMagicNumber"))
*Unit1 is the name of the unit with your script files.
Not a very elegant way, but it should work, though.