I created a Maven project, with Cucumber depepndencies and a Feature file. But on right clicking the Runner class, the "TestNG Test" option is not shown.
When I right click the package name instead, the said option is there.
You have to install the TestNG package from the eclipse marketplace to see the option. ( Only adding dependency in pom.xml does not show the run as "TestNG suite" option.
I've already done this, but still no luck.
I'm trying to remove the existing TestNG installation from Installed Softwares, but the uninstall button itself is disabled. I also tried running Eclipse as Admin, but the same issue is there.
Now I've created testng.xml file, and running this file instead of the runner class directly.
InstructorAshish Replied on 15/03/2022
Have you installed the cucumber eclipse plugin?
Thank you for your reply.
I haven't added the cucumber eclipse in the PLUGINS tag, but have added the DEPENDENCY for cucumber-java, cucumber-testng, and testng:
The cucumber.version in properties tag is - 6.8.2.
In plugins, I've added only two plugins -
maven-compiler-plugin (no version specified), and
maven-surefire-plugin - 3.0.0-M5