0

Here https://support.smartbear.com/readyapi/docs/testing/scripts/libs/groovy-lib.html at the bottom of the page, it says how to dynamically load a library in ReadyApi.

However the solution proposed isn't qualitative; it says to do a Thread.sleep(3000)... But this isn't a guarantee that the lib is effectively loaded!

As proof, I did this in my "Setup script" of my test suite:

String customGroovyLibsPath = (new File(testSuite.project.getPath())).getParent() + File.separator + "GroovyLibs"

if (System.properties[ 'soapui.scripting.library' ] != customGroovyLibsPath) {
    System.properties[ 'soapui.scripting.library' ] = customGroovyLibsPath
    Thread.sleep(3000)
}

On the first execution of my test suite, most of the time, it ends up in an error.

So, my question is how can I make "absolutely" sure my library is fully loaded, without using Thread.sleep and passing to it an arbitrary big amount of time?

Kind regards.

Aymen Turki
  • 105
  • 2
  • 10

0 Answers0