测试框架意外退出-黄瓜测试

时间:2018-12-10 05:52:38

标签: java maven automated-tests cucumber

测试启动后,结果通过了测试,但是测试框架意外退出。如何解决?

测试样本

Screen Shot

测试功能

Screen Shot

输出

Screen Shot

配置

ScreenS hot

<?xml version="1.0" encoding="UTF-8"?>

http://maven.apache.org/xsd/maven-4.0.0.xsd“>     4.0.0

<groupId>test</groupId>
<artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
    <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>5.3.2</version>
        <scope>test</scope>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core -->
    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-core</artifactId>
        <version>2.11.1</version>
    </dependency>

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

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


    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-java8</artifactId>
        <version>4.2.0</version>
        <scope>test</scope>
    </dependency>


</dependencies>

1 个答案:

答案 0 :(得分:0)

实际上,您需要在@CucumberOptions中指定功能文件的位置。

例如:

@CucumberOptions(
        format={"pretty", "html:reports/test-report"},
        tags= "@smokeTest",
        features = "Features")