Forum Discussion

s9goswami's avatar
s9goswami
Occasional Contributor
8 years ago

Ready Api 2.2.0 - Scipt Library - Update to the Scripts not reflecting

Ready Api 2.2.0  - Scipt Library -  If i update the scripts meaning change something in the script  and then run my tests even after 10 mins , the changes are not getting reflected?

 

Please confirm if this is a bug in Ready API?

  • larsn's avatar
    larsn
    Contributor

    Not familiar with ReadyAPI v2.x, but for v1.x - I would make sure that you copy the Groovy code into the correct location. We keep the code in source code control so we have copy the groovy script from our personal sandbox directories into the expected location by ReadyAPI, which is ${SmartBearDir}/bin/scripts/${libName}/. As long as the Groovy code is syntactically correct it will be updated. The ReadyAPI log tab will show what directories it is scanning for changes, when it compiles the groovy to a jar, and if there are issues.

     

     

     

     

    • s9goswami's avatar
      s9goswami
      Occasional Contributor

      Yes, we are using GIT to checkin and check out the Groovy Code . Are you saying if there are changes done in the same Groovy file , ReadyAPI 1.x will pick up the changes but not Ready API 2.0?

       

      I recently posted in Smart Bear and they confirmed its a issue.

       

      EXT] Case #00269049: Ready Api 2.2.0 - Scipt Library - Update   to the Scripts not reflecting

       

      Still I will try in ready API 1.X to try.

       

      Thanks for the solution!

    • Beginner's avatar
      Beginner
      Occasional Contributor

      Hi,

       

      I'm just trying to understand how are you able to maintain the script library? I have a bunch of custom groovy scripts that I want to maintain in a repository, do you have any suggestions?

  • nmrao's avatar
    nmrao
    Champion Level 3
    May be this is not a solution, but you could try restarting the tool after update of the script and see if that helps.
    • s9goswami's avatar
      s9goswami
      Occasional Contributor

      Yes , but that is very annoying if everytime I have to restart the Tool . As per script library documentation the Tool should recompile / refresh all the classes every 5 seconds which dioesn't seems to be the case?

       

      Is Smart Bear putting false documentation or is it a bug?

       

      Documentation:

       

      Groovy Script Library

      The Script Library can be used as follows;

      • Specify which directory to use in the SoapUI Preferences tab (default is /scripts). SoapUI will check this directory for files with the "Groovy" extension and compile these upon startup. The directory is then checked periodically (every 5 seconds) for updates and new or existing scripts are compiled and re-compiled if necessary.
      • Scripts should be placed in directories named after their containing package, that is a script in the package soapui.demo should be in a soapui/demo directory under the specified scripts directory.
      • The compiled classes are added to the parent class loader of all Groovy scripts, you can access them as standard java classes.

       

       

      Link : 

      https://www.soapui.org/scripting---properties/scripting-and-the-script-library.html

       

      • nmrao's avatar
        nmrao
        Champion Level 3
        Not sure of the details.

        Any ways, you should be able to report the same to SmartBear team using below link:

        https://support.smartbear.com

        By the way, do you update the scripts from with in ReadyAPI tool or using any IDE ?