[Cucmber] You can implement missing steps with the snippets below, There were undefined steps. You can implement missing steps with the snippets below
2021. 4. 28. 08:44ㆍ도구/Appium+Cucumber
Runner로 실행
glue 설정 시 유의사항
- If your step definition classes are in the package steps (so they are stored in the path src/test/java/steps) the value must be glue = { "steps" }.
- https://stackoverflow.com/questions/50254255/junit-cucumber-cannot-find-steps/50349499#50349499
glue = { "steps" }
- Runner가 최상위 클래스에 있으므로 빼야한다.. glue를 계속 설정하고 Runner 실행시켰더니
There were undefined steps. You can implement missing steps with the snippets below: 에러 계속발생했음 - 아래코드로 실행해야한다.
@RunWith(Cucumber.class)
@CucumberOptions(
features = {"classpath:features/cucumber.feature"}
)
gradle 로 실행
build.gradle 파일에 task cucumber 실행시에도
You can implement missing steps with the snippets below: 에러가 계속 발생했는데
args = ['--plugin', 'pretty', '--glue', 'gradle.cucumber', 'src/test/resources']
의 4번째 변수를 패키지 네임으로 채우려고 했더니 문제가 발생했다
마찬가지로 테스트 코드가 최상위 폴더에 있으므로 아래처럼 빈값으로 설정해야한다
args = ['--plugin', 'pretty', '--glue', '', 'src/test/resources']
'도구 > Appium+Cucumber' 카테고리의 다른 글
[Cucumber] run gradle 실행하기 (0) | 2021.05.07 |
---|---|
[Cucumber] BDD, 테스트 시나리오 문법(gherkin) (0) | 2021.05.04 |
appium maven setting (0) | 2021.04.19 |
appium gradle setting (0) | 2021.04.19 |
[cucumber] gradle 설치 (0) | 2021.04.14 |