Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven testng:jar:5.14.3无效_Maven_Webdriver_Testng - Fatal编程技术网

Maven testng:jar:5.14.3无效

Maven testng:jar:5.14.3无效,maven,webdriver,testng,Maven,Webdriver,Testng,当我使用maven运行selenium测试用例时,它会显示警告消息:[警告]org.testng:testng:jar:5.14.3的POM无效,传递依赖项(如果有)将不可用,请启用调试日志以了解更多详细信息 有人知道吗?使用最新版本的TestNG,您的问题就会得到解决 如果您使用的是maven,请尝试将以下依赖项放在pom.xml中 <dependency> <groupId>org.testng</groupId>

当我使用maven运行selenium测试用例时,它会显示警告消息:[警告]org.testng:testng:jar:5.14.3的POM无效,传递依赖项(如果有)将不可用,请启用调试日志以了解更多详细信息


有人知道吗?

使用最新版本的TestNG,您的问题就会得到解决

如果您使用的是maven,请尝试将以下依赖项放在pom.xml中

    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.9.10</version> 
    </dependency>

org.testng
testng
6.9.10 

更新pom.xml中的surefire插件版本可能会解决您的问题

<build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.20.1</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

org.apache.maven.plugins
maven surefire插件
2.20.1

为什么不使用更高版本的testng?谢谢。我试试看。