-2

I have added dependencies in my pom file and still not able to extend AbstractTestNGCucumberTests

plugins

dependency

Test

Ru Chern Chong
  • 3,692
  • 13
  • 33
  • 43
sakura
  • 1
  • 1
  • 1

2 Answers2

1

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.

Relict
  • 33
  • 6
  • now able to access AbstractTestNGCucumberTests with only later version up till 4.8.1 and but its now been deprceated "cucumber.api.testng.AbstractTestNGCucumberTests' is deprecated " anyone know how to implement this – sakura Feb 24 '20 at 13:13
  • You're using info.cukes, that's the old version of cucumber, you need io.cucumber, get it from maven repository. – Relict Feb 25 '20 at 10:11
0

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>
Gaj Julije
  • 1,538
  • 15
  • 32