Steps to reproduce:
-
Create a feature file with this Scenario:
Feature: Test that Katalon Studio cannot find the step definition if the annotation uses a regular expression
Scenario:
Given dummy step ‘this is a Given step’
When dummy step ‘this is a When step’
Then dummy step ‘this is a Then step’ -
Create the step definition:
@Given("dummy step '(.+)'")
def dummy_step(String text) {
println "text=${text}"
}
-
Run the feature file (Ctrl + Shift + A). See that it works .
-
Change the @Given annotation with this: @Given(“[Dd]ummy step ‘(.+)’”)
-
In the feature file editor press F5 to recalculate steps, or click on a step, righ click and select ‘Find step’. Note all steps are in orange with a warning, meaning that KS cannot find the correspondinet step definition for each step.
-
Run the feature file. See that it works (so, it’s only a problem of the features files editor)
-
Restore the original annotation text, recalculate steps and see that warnings dissapear.
Next video shows the bug: