黄瓜:执行第一个脚本时“警告:正在显示类路径:/ Runner上没有找到的功能”

问题描述 投票:0回答:1

黄瓜:在十二月执行我的第一个脚本时,得到的是“警告:在classpath:/ Runner上找不到功能”。请参考所附快照中的jar文件详细信息。我的第一个测试案例是:功能:验证Boats应用程序登录方案:验证用户凭证给定打开chrome浏览器并检查应用程序输入用户名和密码时然后验证登录成功并验证首页标题

    <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>cucumberwithselenium</groupId>
      <artifactId>cucumberwithselenium</artifactId>
      <version>0.0.1-SNAPSHOT</version>
      <packaging>jar</packaging>

      <name>cucumberwithselenium</name>
      <url>http://maven.apache.org</url>

      <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      </properties>

      <dependencies>
    <!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-java -->
    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-java</artifactId>
        <version>5.0.0</version>
    </dependency>


            <!-- https://mvnrepository.com/artifact/info.cukes/cucumber-jvm -->
    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-jvm</artifactId>
        <version>1.2.6</version>
        <type>pom</type>
    </dependency>


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

            <dependency>
                <groupId>info.cukes</groupId>
                <artifactId>cucumber-jvm-deps</artifactId>
                <version>1.0.5</version>
            </dependency>

            <dependency>
                <groupId>net.masterthought</groupId>
                <artifactId>cucumber-reporting</artifactId>
                <version>1.0.0</version>
            </dependency>

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


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

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

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

      </dependencies>


    </project>

Cucumber error snap

java cucumber maven-plugin
1个回答
0
投票

我也有同样的问题。我也尝试将文件放在src / test / java下,但仍然遇到相同的错误。cumul.runtime.CucumberException:在[classpath:Runner]中找不到功能在Cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:47)我的文件结构与“ azhagu ramaiah”相似]

即使我从Windows资源管理器中删除了.feature文件,也会出现相同的错误。

停留在这里并尝试了我可以在Google上找到的所有补救措施,但仍然是相同的错误。

© www.soinside.com 2019 - 2024. All rights reserved.