Forum Discussion

Beginner's avatar
Beginner
Occasional Contributor
6 years ago
Solved

How to integrate scripts in script library to git?

Hi Team,

 

I have some groovy classes defined in the 'Script Library' which are being used in several tests. I need some suggestion on how I can integrate all the '.groovy' files in script library to git so that everyone can access these and also easy to run the tests from Jenkins smoothly. Can someone please throw some light on this? 

 

Thanks in advance!

  • If there are classes, and maintainability is the issue, then you should read the below article where you can create a separate project with all the classes and put it under git/ other repository. And you can just call them from Groovy Script test steps. This will make "Script Library" obsolete, which I don't you need to bother about for your use case as long as you are achieving re-usability.

    http://rupertanderson.com/blog/1-how-to-develop-add-and-use-a-custom-groovy-library-in-soapui/

4 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    If there are classes, and maintainability is the issue, then you should read the below article where you can create a separate project with all the classes and put it under git/ other repository. And you can just call them from Groovy Script test steps. This will make "Script Library" obsolete, which I don't you need to bother about for your use case as long as you are achieving re-usability.

    http://rupertanderson.com/blog/1-how-to-develop-add-and-use-a-custom-groovy-library-in-soapui/
    • Olga_T's avatar
      Olga_T
      SmartBear Alumni (Retired)

      Thank you for the reply, nmrao .

       

      Beginner have you had a chance to try what Rao suggested? Was your question answered?
      We are looking forward to hearing from you.

       

      • Beginner's avatar
        Beginner
        Occasional Contributor

        Hi,

         

        My team denied this option as they don't want to put the jar file manually every time we update it.. I'm still waiting for a feasible way for us to maintain the script library files from a common repository.

    • Beginner's avatar
      Beginner
      Occasional Contributor

      Thanks a lot for your reply, @nmrao.

       

      Looks like the suggestion you made isn't feasible in our team, do you have any other suggestion apart from Rupert Anderson's.