我正在使用Selenium WebDriver,Eclipse,TestNG和Surefire插件.我无法从pom.xml运行testng.xml文件.当我使用mvn test运行pom.xml时,它直接运行src/test/java中的文件.
我的pom.xml代码是
<groupId>angel</groupId>
<artifactId>Angel</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Angel</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties>
<dependencies>
<!-- Java API to access the Client Driver Protocols -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.21.0</version>
</dependency>
<!-- JExcel API is a java library which provides the ability to read, write, and modify Microsoft Excel spreadsheets.-->
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6.10</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
<!-- Java API for manipulate the Microsoft Excel Sheets. -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-contrib</artifactId>
<version>3.5-beta5</version>
</dependency>
<!-- Java Mail …Run Code Online (Sandbox Code Playgroud)