Ask a Question

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

SOLVED
sofles01
New Contributor

[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 

1 ACCEPTED SOLUTION

Accepted Solutions
KarelHusa
Frequent Contributor

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

Hi @sofles01 ,

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

 

View solution in original post

2 REPLIES 2
nmrao
Community Hero

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

KarelHusa
Frequent Contributor

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

Hi @sofles01 ,

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

 

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: