I have added dependencies in my pom file and still not able to extend AbstractTestNGCucumberTests
I have added dependencies in my pom file and still not able to extend AbstractTestNGCucumberTests
Maybe there is a scope in your dependency?
If it looks like this
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-testng</artifactId>
<version>4.7.1</version>
<scope>Test</scope>
</dependency>
delete that scope parameter, then you'll be able to use this dependency in the whole project.
For the latest versions of maven cucumber and Test NG integration use import io.cucumber.testng.AbstractTestNGCucumberTests; instead of import cucumber.api.testng.AbstractTestNGCucumberTests;
and ofcourse updated maven dependency to:
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-testng -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-testng</artifactId>
<version>6.4.0</version>
</dependency>