Forum Discussion
- peti2005Occasional Contributor
hello skush05
I guess I can help with. Just few days ago a made it happen.
1. Setup maven and make sure that your command line recognices the "mvn" command. For details look here
2. Create a pom.xml file and place it to the same folder where your SoapUI test project is located
3. The content should look like this (for more details look here):
<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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>YOUR_GROUP_ID</groupId> <artifactId>YOUR_ARTIFACT_ID</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>YOUR_NAME</name> <description>YOUR_DESCRIPTION</description> <url>http://maven.apache.org</url> <pluginRepositories> <pluginRepository> <id>SmartBearPluginRepository</id> <url>http://smartbearsoftware.com/repository/maven2/</url> </pluginRepository> </pluginRepositories> <build> <plugins> <plugin> <groupId>com.smartbear.soapui</groupId> <artifactId>soapui-maven-plugin</artifactId> <version>5.3.0</version> <dependencies> <dependency> <groupId>com.microsoft.sqlserver</groupId> <artifactId>mssql-jdbc</artifactId> <version>7.4.1.jre8</version> <scope>runtime</scope> </dependency> </dependencies> <configuration> <projectFile>YOUR_TEST_PROJECT.xml</projectFile> <outputFolder>${project.build.directory}/reports</outputFolder> <junitReport>true</junitReport> <printReport>true</printReport> <testSuite>YOUR_TEST_SUITE</testSuite> <soapuiProperties/> </configuration> </plugin> </plugins> </build> </project>
In this example we use also database connection via JDBC driver from micrososft. You can see how it is specified in dependencies section
4.Open command line tool (in Windows it is cmd) and navidate to the folder where the test project and pom xml files are located
5. To run 1st time and resolve/download dependencies: mvn install
6. To execute test suite specified int he pom.xml: mvn com.smartbear.soapui:soapui-maven-plugin:5.3.0:testAs successfull result you will get something like
oapUI 5.3.0 TestCaseRunner Summary ----------------------------- Time Taken: 42743ms Total TestSuites: 1 Total TestCases: 632 (0 failed) Total TestSteps: 2528 Total Request Assertions: 632 Total Failed Assertions: 0 Total Exported Results: 0 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 667.296 s [INFO] Finished at: 2019-11-27T14:31:28+01:00 [INFO] ------------------------------------------------------------------------
NOTE: Before doing it on remote machine (where CI server is running) I recommend to try it 1st on local machine.
Related Content
- 3 years ago
- 8 years ago
Recent Discussions
- 3 days ago
xml to soap
Solved3 days ago- 4 days ago
- 16 days ago