When editing a feature file, KS cannot find step definitions if the @Given, @When or @Then annotation uses a regular expression

Steps to reproduce:

  1. Create a feature file with this Scenario:

    Feature: Test that Katalon Studio cannot find the step definition if the annotation uses a regular expression

    Given dummy step ‘this is a Given step’
    When dummy step ‘this is a When step’
    Then dummy step ‘this is a Then step’

  2. Create the step definition:

     @Given("dummy step '(.+)'")

    def dummy_step(String text) {

     println "text=${text}"


  3. Run the feature file (Ctrl + Shift + A). See that it works .

  4. Change the @Given annotation with this: @Given(“[Dd]ummy step ‘(.+)’”)

  5. 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.

  6. Run the feature file. See that it works (so, it’s only a problem of the features files editor)

  7. Restore the original annotation text, recalculate steps and see that warnings dissapear.

Next video shows the bug:

Hi @Enrique_Castilla

What version are you using ? Also I think you’re missing the link to a video, or the video itself in the post.

Hi ThanhTo, thank you for your response.

I’m using version 6.1.5 (I know it’s an outdated version :frowning: )

Sorry for the mistake with the video. Now I’ve uploaded: https://www.dropbox.com/s/vk41m0spz6zrgm6/Cannot%20find%20step%20definition%20if%20the%20annotation%20uses%20a%20regular%20expression%20(convert-video-online.com).mp4?dl=0


This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.