Cucumber Undefined Step, Though Defined Using IntelliJ

后端 未结 5 843
慢半拍i
慢半拍i 2020-12-16 22:12

I\'m trying to run a .feature file to test a simple RESTEasy web application: https://github.com/dashorst/jaxrs-quickstart-resteasy.

However, the IntelliJ keeps say

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-16 22:33

    Try this:

    1. Cucumber for java plugin is installed and compatible with your intellij idea version
    2. Create and mark test\resources as Test Resources Root
    3. Put the .feature in test\resources
    4. Create the folder step_definitions in test\java and put your test code there
    5. Check that the Feature configuration contain step_definitions as Glue
    6. Check if the step_definitions code is building properly

    After those checks the steps should be recognized.

提交回复
热议问题