Forum Discussion

vhTesting01's avatar
vhTesting01
New Contributor
4 years ago

[SoapUI] Groovy script calling evaluate(File) function has problems with my project's package

Hello,

just briefly explaining the concept: I have git repo, mvn project with structure:

Spoiler

+-soap.xml

+-fileN

     |

     +script .groovy files doing some tasks

+-src

     |

    +main

          |

          +java

               |

               +package including my custom helper classes
+-pom.xml

 

 

My soapUI is using script step alongside with groovy function evaluate(File) -> to run the script .groovy file

 

now this is working okay, the problem came when I started to create my own helper classes under src/main/java/myPackage ....while checking and running  scripts from IDEA, classes are imported to the scripts fine and are working; when I try to evaluate same working script file from SoapUI script step, I am getting error: No class found 

  • Hi vhTesting01 ,

    if you want to use your own Groovy/Java library in SoapUI, just do the following:

    1. build your library into a JAR file
    2. put it into SoapUI/bin/ext directory

    Then you can use your library from different places of SoapUI, including calling evaluate for an external Groovy script.

    The same works for any other Java libraries.

     

    Plese don't forget to include import statement where appropriate.

     

    Best regards,

    Karel