构建成功完成,但硒测试未在Jenkins(Java,Cucumber,Selenium)中运行

时间:2019-10-05 06:09:03

标签: java maven jenkins automated-tests cucumber

我遇到Jenkins / GitHub的问题。我的构建已成功完成,但是我的Selenium / Cucumber测试未运行(它也未打开浏览器)。

我的Maven var环境也已配置。

所有的硒测试也在我的Eclipse中使用JUnit或TestNG运行。

不知道缺少什么。

POM.XML

 <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>br.me.cucumber</groupId>
    <artifactId>the-internet-herokuapp</artifactId>
    <version>0.0.1-SNAPSHOT</version>

    <properties>
      <maven.compiler.source>1.7</maven.compiler.source>
      <maven.compiler.target>1.7</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <dependencies>
        <!-- https://mvnrepository.com/artifact/info.cukes/cucumber-java -->
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>1.2.5</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/info.cukes/cucumber-`enter code here`junit -->
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-testng</artifactId>
            <version>1.2.5</version>
        </dependency>


            <!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>3.141.59</version>
        </dependency>

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.6</version>
        </dependency>

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>7.0.0</version>
            <scope>test</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-java -->
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>4.7.2</version>
            <scope>test</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-testng -->
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-testng</artifactId>
            <version>4.7.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/info.cukes/cucumber-junit -->
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>1.2.5</version>
            <scope>test</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/commons-collections/commons-collections -->
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2</version>
        </dependency>


  </dependencies>
</project>

Jenkins控制台输出

    [INFO] -----------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] -----------------------------------------------------------------------
    [INFO] Total time:  9.427 s
    [INFO] Finished at: 2019-10-05T07:07:30+02:00
    [INFO] -----------------------------------------------------------------------
    Waiting for Jenkins to finish collecting data
    [JENKINS] Archiving C:\Users\me\Documents\me\_Github\the- 
    internet-herokuapp\the-internet-herokuapp\pom.xml to 
    br.me.cucumber/the-internet-herokuapp/0.0.1-SNAPSHOT/the-internet- 
    herokuapp-0.0.1-SNAPSHOT.pom
    [JENKINS] Archiving C:\Users\me\Documents\me\_Github\the- 
    internet-herokuapp\the-internet-herokuapp\target\the-internet-herokuapp- 
    0.0.1-SNAPSHOT.jar to br.me.cucumber/the-internet-herokuapp/0.0.1- 
    SNAPSHOT/the-internet-herokuapp-0.0.1-SNAPSHOT.jar
    channel stopped
    Finished: SUCCESS

0 个答案:

没有答案