Error while running runner class in cucumber | Selenium Forum
Pawan Mangesh Gulalkari Posted on 31/05/2021

Hi Team, 
I am getting below error while running the runner class in the cucumber project. Can you please share the latest POM.xml file ?


[RemoteTestNG] detected TestNG version 7.0.1
java.lang.AbstractMethodError: Receiver class io.cucumber.testng.TestNGCucumberOptionsProvider$TestNGCucumberOptions does not define or inherit an implementation of the resolved method 'abstract boolean publish()' of interface io.cucumber.core.options.CucumberOptionsAnnotationParser$CucumberOptions.
at io.cucumber.core.options.CucumberOptionsAnnotationParser.addPublish(
at io.cucumber.core.options.CucumberOptionsAnnotationParser.parse(
at io.cucumber.testng.TestNGCucumberRunner.<init>(
at io.cucumber.testng.AbstractTestNGCucumberTests.setUpClass(
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
at java.base/java.lang.reflect.Method.invoke(
at org.testng.internal.MethodInvocationHelper.invokeMethod(
at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(
at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(
at org.testng.internal.ConfigInvoker.invokeConfigurations(
at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(
at java.base/java.util.ArrayList.forEach(
at org.testng.TestRunner.privateRun(
at org.testng.SuiteRunner.runTest(
at org.testng.SuiteRunner.runSequentially(
at org.testng.SuiteRunner.privateRun(
at org.testng.SuiteRunnerWorker.runSuite(
at org.testng.TestNG.runSuitesSequentially(
at org.testng.TestNG.runSuitesLocally(
at org.testng.TestNG.runSuites(
at org.testng.remote.RemoteTestNG.initAndRun(
at org.testng.remote.RemoteTestNG.main(

Default test
Tests run: 0, Failures: 0, Skips: 0
Configuration Failures: 1, Skips: 0

Default suite
Total tests run: 0, Passes: 0, Failures: 0, Skips: 0
Configuration Failures: 1, Skips: 0

[TestNG] No tests found. Nothing was run
Usage: <main class> [options] The XML suite files to run
Should MethodInvocation Listeners be run even for skipped methods
Default: true
Configuration failure policy (skip or continue)
Output directory
Number of threads to use when running data providers
The dependency injector factory implementation that TestNG should use.
Comma-separated list of group names to exclude
Comma-separated list of group names to be run
JUnit mode
Default: false
List of .class files or list of class names implementing ITestListener
or ISuiteListener
Comma separated of test methods
Default: []
List of .class files or list of class names implementing IMethodSelector
Mixed mode - autodetect the type of current test and run it with
appropriate runner
Default: false
List of .class files or list of class names implementing
Parallel mode (methods, tests or classes)
Possible Values: [tests, methods, classes, instances, none, true, false]
The port
Extended configuration for custom report listener
Default name of test suite, if not specified in suite definition file or
source code
Size of the thread pool to use to run suites
Default: 1
The list of test classes
A jar file containing the tests
Default name of test, if not specified in suitedefinition file or source
The list of test names to run
-testrunfactory, -testRunFactory
The factory used to create tests
Number of threads to use when running tests in parallel
The threadpool executor factory implementation that TestNG should use.
Whether to use the default listeners
Default: true
-log, -verbose
Level of verbosity
The full path to the xml file inside the jar file (only valid if
-testjar was specified)
Default: testng.xml


Pawan Mangesh Gulalkari Replied on 31/05/2021

The issue got resolved after adding the below dependency for  - <artifactId>cucumber-core</artifactId>.

Now after running the runner class it is giving error as - I have feature files and step definition present:

May 31, 2021 5:56:58 PM io.cucumber.core.runtime.FeaturePathFeatureSupplier get
WARNING: No features found at classpath:/Runner