我也在互联网上搜索过,但我找不到我遇到的确切问题。为了解释我在做什么,我正在编写 selenium UI 测试。我正在尝试使用故障安全插件执行测试。我正在执行 maven 命令,mvn clean verify但它不执行我的任何测试类。但是,当我将测试类更改为 *Test.java 时,我的测试类正在执行我怀疑我的项目没有使用故障安全,而是使用了surefire。我正在发布我的 pom 文件、项目结构和构建输出。POM文件<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>webproject</groupId> <artifactId>webproject</artifactId> <version>1.0-SNAPSHOT</version> <name>webproject</name> <!-- FIXME change it to the project's website --> <url>http://www.example.com</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.target>1.7</maven.compiler.target> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency> <!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java --> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>3.13.0</version> </dependency> <!-- https://mvnrepository.com/artifact/org.testng/testng --> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>6.14.3</version> <scope>test</scope> </dependency> </dependencies>
1 回答
![?](http://img1.sycdn.imooc.com/533e4ce900010ae802000200-100-100.jpg)
慕工程0101907
TA贡献1887条经验 获得超5个赞
您必须将 maven-failsafe-plugin 配置移出 <pluginManagement>..</pluginManagement>
添加回答
举报
0/150
提交
取消