Skip to content

Instantly share code, notes, and snippets.

@thieux
Last active September 13, 2016 16:59
Show Gist options
  • Select an option

  • Save thieux/f44d668903f8b4cfcb1c0dfd431ce997 to your computer and use it in GitHub Desktop.

Select an option

Save thieux/f44d668903f8b4cfcb1c0dfd431ce997 to your computer and use it in GitHub Desktop.

Everyday Cucumber in IntelliJ

Cucumber runner is used to run the scenario (.feature) from Maven

  1. Write cucumber runner first.
  2. Write scenario in .feature file.
  3. Generate the empty steps.
  4. Glue each step to an actual implementation.

Different step snippet style

Because step snippet is different between tools, choose one style and stick to it.

IntelliJ create step definition code:

@Given("^delete \"([^\"]*)\" has been performed$")
public void deleteHasBeenPerformed(String arg0) throws Throwable {
    // Write code here that turns the phrase above into concrete actions
    throw new PendingException();
}

Cucumber step snippet:

@Given("^delete \"([^\"]*)\" has been performed$")
public void delete_has_been_performed(String arg1) throws Throwable {
    // Write code here that turns the phrase above into concrete actions
    throw new PendingException();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment