Forum Discussion

greenTea's avatar
greenTea
New Contributor
14 years ago

soapUI-Maven-Plugin and mySQL

Hi All,

I like to run a soapUI-Test with the maven plugin. This test includes a sql query to a mysql database. In soapUI I have copied the mysql driver into the ext folder of soapUI. All works fine in soapUI.
But how to do this on the maven plugin? The documentation http://www.soapui.org/Test-Automation/maven-2x.html does not describe how to load any external libraries.

Any suggestions?
  • greenTea's avatar
    greenTea
    New Contributor
    Ok, I get it. Just reference the mySQL-Lib in the plugin section.


    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>soapui</groupId>
    <artifactId>soapui</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>runSaopUiTests</name>
    <description>runs the soapUI tests</description>
    <build>
    <plugins>
    <plugin>
    <groupId>eviware</groupId>
    <artifactId>maven-soapui-plugin</artifactId>
    <version>4.0.1</version>
    <executions>
    <execution>
    <id>soapUITest</id>
    <goals>
    <goal>test</goal>
    </goals>
    <phase>test</phase>
    </execution>
    </executions>
    <configuration>
    <projectFile>test-soapui-project.xml</projectFile>
    <projectProperties>
    <projectProperty>staging=STG</projectProperty>
    </projectProperties>
    <testSuite>test TestSuite</testSuite>
    <testCase>test1</testCase>
    <outputFolder>${project.build.directory}/</outputFolder>
    </configuration>
    <dependencies>
    <!-- MySQL database driver -->
    <dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>5.1.9</version>
    <scope>runtime</scope>
    </dependency>
    <!--due to an issue in pom at soapui-plugin 4.0.1 we have to reference junit -->
    <!-- http://www.soapui.org/forum/viewtopic.php?t=8190 -->
    <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.4</version>
    <scope>test</scope>
    </dependency>
    </dependencies>
    </plugin>
    </plugins>
    </build>
    </project>