简体   繁体   English

Maven 测试在本地运行,但在 Azure Pipeline 中使用 Azure DevOpz Maven POM.xml 失败所有测试给出时间 Elapsed 错误

[英]Maven test run locally but fail in Azure Pipeline using Azure DevOpz Maven POM.xml All test giving time Elapsed error

Here is my POM.xml When I run from TestNG or Maven test from locally all the test cases are working fine but in pipeline it gives me this error time elapsed .please check the below image attached Using Chrome Driver TestNG Maven Azure Devopz Pipline这是我的 POM.xml 当我从本地运行 TestNG 或 Maven 测试时,所有测试用例都运行良好,但在管道中它给了我这个错误时间。请检查下面的图片使用 Chrome 驱动程序 TestNG Maven Azure Devopz Pipline

<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>Selenium_Framework</groupId>
  <artifactId>Selenium_Framework</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <properties>
     <maven.compiler.target>1.8</maven.compiler.target>
     <maven.compiler.source>1.8</maven.compiler.source>
   
</properties>
<build>
<plugins>
       <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
              <version>3.8.1</version>
        </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.20</version>
            </plugin>
</plugins>
</build>
  <dependencies>

    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>4.1.0</version>
    </dependency>
    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.14.3</version>
    </dependency>
    
    <dependency>
        <groupId>com.googlecode.json-simple</groupId>
        <artifactId>json-simple</artifactId>
        <version>1.1.1</version>
    </dependency>
    <dependency>
        <groupId>org.json</groupId>
        <artifactId>json</artifactId>
        <version>20090211</version>
    </dependency>
    <dependency>
        <groupId>com.paulhammant</groupId>
        <artifactId>ngwebdriver</artifactId>
        <version>1.1.6</version>
    </dependency>
    <dependency>
        <groupId>io.qameta.allure</groupId>
        <artifactId>allure-testng</artifactId>
        <version>2.17.3</version>
    </dependency>
  </dependencies>
</project>

在此处输入图像描述

Maven test run locally but fail in Azure Pipeline using Azure DevOpz Maven POM.xml All test giving time Elapsed error Maven 测试在本地运行,但在 Azure Pipeline 中使用 Azure DevOpz Maven POM.xml 失败所有测试给出时间 Elapsed 错误

You could try to update your selenium dependencies to the most recent release.您可以尝试将您的 selenium 依赖项更新到最新版本。

And according to the warning message "unable to find cDP implementation matching 103", you could try to selenium-devtools-v103 in the dependencies, like:根据警告消息“无法找到匹配 103 的 cDP 实现”,您可以尝试在依赖项中使用selenium-devtools-v103 ,例如:

   <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>4.3.0</version>
    </dependency>

    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-devtools-v103</artifactId>
        <version>4.3.0</version>
    </dependency>

If above not resolve your issue, please share the debug build log as txt in your question.如果上述方法不能解决您的问题,请在您的问题中以 txt 格式分享调试构建日志。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM