azharuddin
7 years agoOccasional Contributor
How to run testNg.xml and a soapUI.xml in the same pom.xml(Maven)
I have a pom.xml with 2 plugins, one for a testng.xml(with selenium and smartbear) suite and one for a soapUI.xml tests. I want to run both tests xml's, but only the testng.xml is run. MAde a separate pom, only with the configuration necessary for a soapUI.xml witch runs OK(with install command).
<properties> <project.build.sourceEncoding>UTF-8 </project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> </properties> <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.5</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>2.18.1</version> </plugin> <plugin> <groupId>com.smartbear.soapui</groupId> <artifactId>soapui-pro-maven-plugin</artifactId> <version>5.1.1</version> <configuration> </configuration> <dependencies> <dependency> <groupId>org.reflections</groupId> <artifactId>reflections</artifactId> <version>0.9.9-RC1</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>3.10-FINAL</version> <exclusions> <exclusion> <groupId>org.apache.xmlbeans</groupId> <artifactId>xmlbeans</artifactId> </exclusion> </exclusions> </dependency> </dependencies> <executions> <execution> <phase>integration-test</phase> <goals> <goal>test</goal> </goals> <configuration> <projectFile>${project.basedir}/src/test/resources/All-4-WB-soapui-project.xml</projectFile> <outputFolder>${project.build.directory}/project-reports</outputFolder> <junitReport>true</junitReport> <printReport>false</printReport> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.18</version> <inherited>true</inherited> <executions> <execution> <phase>test</phase> <goals> <goal>test</goal> </goals> <configuration> <suiteXmlFiles> <suiteXmlFiles>testng.xml</suiteXmlFiles> </suiteXmlFiles> <includes> <include>**/*EAS*.java</include> </includes> </configuration> </execution> </executions> </plugin> </plugins> </pluginManagement> </build> <pluginRepositories> <pluginRepository> <id>SmartBearPluginRepository</id> <url>http://www.soapui.org/repository/maven2/</url> </pluginRepository> </pluginRepositories> <repositories> <repository> <id>jenkins-releases</id> <url>http://repo.jenkins-ci.org/releases/</url> </repository> <repository> <id>SmartBear Sweden Repository</id> <url>http://www.soapui.org/repository/maven2</url> </repository> <repository> <id>maven2-repository.java.net</id> <name>Java.net Repository for Maven</name> <url>http://java.net/projects/maven-repository/</url> <layout>default</layout> </repository> </repositories> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> </dependency> <dependency> <groupId>org.jenkins-ci.main</groupId> <artifactId>cli</artifactId> <version>1.514</version> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>2.47.1</version> </dependency> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>6.9.6</version> <scope>test</scope> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-server</artifactId> <version>2.47.1</version> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-firefox-driver</artifactId> <version>2.47.1</version> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-chrome-driver</artifactId> <version>2.47.1</version> </dependency> </dependencies>