cucumber.runtime.DuplicateStepDefinitionException

Duplicate step definitions in test_cases.invalid_login.close_browser() in file:/D:/rakesh/folder/neon%20workspace/com.maven.cucum/target/test-classes/ and test_cases.valid_loign.close_browser() in file:/D:/rakesh/folder/neon%20workspace/com.maven.cucum/target/test-classes/


Solutions on the web6

Solution icon of stackoverflow
Duplicate step definitions in test_cases.invalid_login.close_browser() in file:/D:/rakesh/folder/neon%20workspace/com.maven.cucum/target/test-classes/ and test_cases.valid_loign.close_browser() in file:/D:/rakesh/folder/neon%20workspace/com.maven.cucum/target/test-classes/

Solution icon of googlegroups
via Google Groups by Aslak Hellesøy, 1 year ago
Duplicate step definitions in uk.co.ratedpeople.test.functional.selenium.tmacquisition.TMSignupStepDefs.The_user_is_on_home_page() in file:/home/shabana.khanam/dev/Selenium-Test/selenium-tests-module/target/test-classes/ and uk.co.ratedpeople.test.functional.selenium.tmacquisition.TMSignupStepDefs.The_user_is_on_home_page() in file:/home/shabana.khanam/dev/Selenium-Test/selenium-tests-module/target/test-classes/

Solution icon of googlegroups
via Google Groups by Martin Spamer, 1 year ago
Duplicate step definitions com.company.automation.trading.fdm.timeline.FdmTimeLineSteps.marketRefreshIsTriggered() in file:/C:/Users/me/workspaces/company-trading/fdm-automation/trading-fdm-timeline/target/test-classes/ and com.company.automation.trading.fdm.timeline.FdmTimeLineSteps.marketRefreshIsTriggered() in file:/C:/Users/me/workspaces/company-trading/fdm-automation/trading-fdm-timeline/target/test-classes/

Solution icon of stackoverflow
Duplicate step definitions in com.project.qa.steps.HomeSteps.tap_on_favourites_icon() in file:/Users/admin/bamboo/xml-data/build-dir/PIR-IQDU-JOB1/UITest/build/classes/test/ and com.project.qa.steps.HomeSteps.tap_on_favourites_icon() in file:/Users/admin/bamboo/xml-data/build-dir/PIR-IQDU-JOB1/UITest/build/classes/test/

Solution icon of github
via GitHub by bensmith87
, 6 months ago
Duplicate step definitions in a.b.StepDefsB.b() in file:/home/ben/dev/bug_995/build/classes/cucumber/ and a.b.StepDefsB.b() in file:/home/ben/dev/bug_995/build/classes/cucumber/

Solution icon of stackoverflow
Duplicate step definitions in my.project.MySteps.wait_it() in file:[...] and my.project.MySteps.set_it() in file:[...]

Stack trace

  • cucumber.runtime.DuplicateStepDefinitionException: Duplicate step definitions in test_cases.invalid_login.close_browser() in file:/D:/rakesh/folder
  • eon%20workspace/com.maven.cucum/target/test-classes/ and test_cases.valid_loign.close_browser() in file:/D:/rakesh/folder
  • eon%20workspace/com.maven.cucum/target/test-classes/ at cucumber.runtime.RuntimeGlue.addStepDefinition(RuntimeGlue.java:33) at cucumber.runtime.java.JavaBackend.addStepDefinition(JavaBackend.java:151) at cucumber.runtime.java.MethodScanner.scan(MethodScanner.java:68) at cucumber.runtime.java.MethodScanner.scan(MethodScanner.java:41) at cucumber.runtime.java.JavaBackend.loadGlue(JavaBackend.java:86) at cucumber.runtime.Runtime.<init>(Runtime.java:92) at cucumber.runtime.Runtime.<init>(Runtime.java:70) at cucumber.runtime.Runtime.<init>(Runtime.java:66) at cucumber.api.junit.Cucumber.createRuntime(Cucumber.java:80) at cucumber.api.junit.Cucumber.<init>(Cucumber.java:59) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104) at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:84) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:70) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:43) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 1 year ago