0

I'm using serenity-cucumber-archetype project and run it in different ways (in pom I specified firefox as webdriver.driver and in serenity.properties -> chrome as webdriver.driver): 1. using test runner, which successfully runs the tests in Chrome

@RunWith(CucumberWithSerenity.class)
@CucumberOptions(features="src/test/resources/features/consult_dictionary/LookupADefinition.feature")
public class DefinitionTestSuite {}
  1. using mvn site, which successfully runs the tests in Firefox

  2. BUT, when I run separately *.feature file or single Scenario from *.feature file I get exception in run log:

    Exception in thread "main" java.lang.NoClassDefFoundError: gherkin/formatter/Formatter
    

Please advise, how to fix it and to make it possible to run single Scenario or single *.feature file

1 Answers1

0

If you are using IntelliJ and Cucumber v2.x: You might need to upgrade IntelliJ, and/or the Cucumber-for-Java plugin. If that doesn't work, try uninstalling/installing the plugin. Bachground: There are changed to the Cucumber event model as of Cucumber v2.x and the Cucumber-for-Java plugin has been updated for those.

Marit
  • 2,399
  • 18
  • 27