Exception in thread “main” after updating cucumber version

前端 未结 4 1474
迷失自我
迷失自我 2021-01-16 15:26

i have updated my cucumber version after that it is giving following exception:

     WARNING: You are using deprecated Main class. Please use 
   io.cucumber         


        
相关标签:
4条回答
  • 2021-01-16 15:57

    I managed to force IntelliJ-cucumber plugin template to use the suggested io.cucumber.core.api.cli.Main, and it works.

    0 讨论(0)
  • 2021-01-16 16:04

    As stated by @mpkorstanje:

    The correct class to use is io.cucumber.core.api.Main

    0 讨论(0)
  • 2021-01-16 16:04

    I had the same problem.

    I put the dependencies below in pom.xml and implements the En interface in the class of steps the problem was solved.

    <!-- cucumber -->
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-java8</artifactId>
            <version>4.2.0</version>
            <scope>test</scope>
        </dependency>
    
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-spring</artifactId>
            <version>4.2.0</version>
            <scope>test</scope>
        </dependency>
    
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>4.2.0</version>
            <scope>test</scope>
        </dependency>
    
    0 讨论(0)
  • 2021-01-16 16:17

    In the official SmartBear forum, the creator and lead developer of Cucumber Open says:

    "You can safely ignore this warning. All it means is that cucumber-eclipse has not yet been updated to use Cucumber's new package structure. We have an open issue about this. If you feel strongly about it you can help us by submitting a pull request to cucumber-eclipse."

    https://community.smartbear.com/t5/Cucumber-Open/deprecated-Main-class-error-while-using-Cucumber-6-1-1/td-p/203642

    0 讨论(0)
提交回复
热议问题