Issue
When I right-click the class file and choose "Run As" TestNG isn't an option.
I've added the TestNG jars by adding the dependency in the pom.xml and running as a Maven install. When I right-click my project and choose Properties -> Java Build Path -> Add Library, TestNG doesn't show up in the list. This is an existing project and I see JUnit as well as a few others not pertaining to testing. Am I missing something to get this added? I'm able to import and use items from the TestNG API.
Solution
When I was running it to begin with, I only had a class with a @BeforeTest annotation and Eclipse wasn't seeing it as a Test Case. As soon as I added @Test to the next class for the first.
So the answer is to make sure there's a actual @Test
test case class in the class file.
Answered By - WeVie
Answer Checked By - Pedro (JavaFixing Volunteer)