AlexRa
12 years agoNew Contributor
Maven, SoapUI-plugin and external Groovy scripts
I am currently trying to migrate our soap ui-tests to run with maven.
Unfortunately my external groovy scripts (in <project-base>/src/test/groovy) are not found during the test execution.
The folder contains multiple scripts within their different packages / directories.
My pom-file (excerpt):
Within the log-file the plugin writes the info that the directory is used:
But I always get the following error:
Does anyone now what's wrong up there?
Thanks.
Unfortunately my external groovy scripts (in <project-base>/src/test/groovy) are not found during the test execution.
The folder contains multiple scripts within their different packages / directories.
My pom-file (excerpt):
<!-- SOAP-UI-Settings -->
<properties>
<!-- References an empty settings file - Maybe this solves the issue that the scripts aren't found?! -->
<soapui.settings.empty.file.path>${baseDir}/src/test/resources/empty-soapui-settings.xml</soapui.settings.empty.file.path>
</properties>
<build>
<testOutputDirectory>target/test-classes</testOutputDirectory>
<scriptSourceDirectory>src/test/groovy</scriptSourceDirectory>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
<plugins>
<!-- Run SOAP UI tests during the integration phase. -->
<plugin>
<groupId>eviware</groupId>
<artifactId>maven-soapui-plugin</artifactId>
<version>4.5.1</version>
<configuration>
<testFailIgnore>true</testFailIgnore>
<settingsFile>${soapui.settings.empty.file.path}</settingsFile>
<outputFolder>${project.build.directory}/soap-ui-reports</outputFolder>
<junitReport>true</junitReport>
<printReport>true</printReport>
<exportAll>true</exportAll>
<soapuiProperties>
<property>
<name>soapui.scripting.library</name>
<value>${project.build.scriptSourceDirectory}</value>
</property>
<property>
<name>soapui.logroot</name>
<value>${project.build.directory}/soap-ui-reports</value>
</property>
</soapuiProperties>
</configuration>
<executions>
<execution>
<id>project</id>
<configuration>
<projectFile>src/test/soapui/project.xml</projectFile>
</configuration>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<artifactId>jdbc-oracle</artifactId>
<groupId>jdbc</groupId>
<version>10.2.0.3</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Within the log-file the plugin writes the info that the directory is used:
Setting soapui.scripting.library value D:\workspaces\soapui-it\src\test\groovy
But I always get the following error:
Script1.groovy: 1: unable to resolve class com.company.ExpiresChecker
@ line 1, column 1.
import com.company.ExpiresChecker
^
org.codehaus.groovy.syntax.SyntaxException: unable to resolve class com.company.ExpiresChecker
Does anyone now what's wrong up there?
Thanks.