无法通过Idea启动黄瓜测试

时间:2018-07-30 13:51:44

标签: java testing gradle intellij-idea cucumber

无法使用Idea启动黄瓜测试。请帮助。

我的环境:

  

Idea 2018.2,具有所有最新更新;摇篮3.5; JDK 1.8.0_172;最新   黄瓜插件;

依赖项

    testCompile group: 'junit', name: 'junit', version: '4.12'
    compile group: 'io.appium', name: 'java-client', version: '5.0.2'
    compile group: 'io.qameta.allure', name: 'allure-junit4', version: '2.6.0'
    compile group: 'org.assertj', name: 'assertj-core', version: '3.9.1'

    testCompile group: 'io.cucumber', name: 'cucumber-junit', version: '3.0.2'
    testCompile group: 'io.cucumber', name: 'cucumber-java', version: '3.0.2'

结构:

main -> baseclass -> BaseClass (core of my Appium/Selenium project)
test -> cucumbersteps: 
          - MyStepDefs
          - RunnerTest
test -> resources -> cucumbersteps -> open_day.feature

当我使用命令启动RunnerTest时:

gradlew clean test --tests ru.cucumbersteps.RunnerTest

我的测试通过了,但是当我尝试使用Idea配置运行测试时,我的测试失败

java.lang.NullPointerException


Failed scenarios:
1 Scenarios (1 failed)
6 Steps (1 failed, 3 skipped, 2 passed)
0m1,001s

我正在使用Idea创建运行配置:

Main class: cucumber.api.cli.Main
Glue: ru.cucumbersteps
Feature: C:/git/JunitPOM/src/test/resources/cucumbersteps/01.open_day.feature
Arguments: --name "^Open day$"
Classpath: JunitPOM_test

0 个答案:

没有答案