测试框架意外退出 - Cucumber 测试

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

测试样品

http://img.mukewang.com/6229ab6f0001581706470290.jpg

测试功能

http://img2.mukewang.com/6229ab7a000128e204670143.jpg

输出

http://img3.mukewang.com/6229ab880001857718300283.jpg

配置

http://img3.mukewang.com/6229ab9700016f0412850944.jpg

<?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>




慕运维8079593
浏览 338回答 1
1回答

慕虎7371278

实际上,您需要在@CucumberOptions 中指定功能文件的位置。如:@CucumberOptions(&nbsp; &nbsp; &nbsp; &nbsp; format={"pretty", "html:reports/test-report"},&nbsp; &nbsp; &nbsp; &nbsp; tags= "@smokeTest",&nbsp; &nbsp; &nbsp; &nbsp; features = "Features")
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java