Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
2 views
in DevOps and Agile by (29.3k points)

There is only one TestNG software installed in the eclipse. Please find the attached screenshot. Also there is only one jar file present in the location from where i am running it. Also, headless option is not working, it's opening the website.

Screenshot 2019-08-28 at 3.52.58 PM.png

1 Answer

0 votes
by (50.2k points)

This issue is happening because, at runtime, TestNG jar is not available in the classpath. You can resolve this by using <scope>compile</scope> instead of <scope>test</scope> in your testng pom dependency..

image

Replace the test with compile in the pom.xml file. and then create a jar file then it will run perfectly.

Related questions

0 votes
1 answer
asked Mar 28, 2021 in Java by dante07 (13.1k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Jul 11, 2019 in Java by Ritik (3.5k points)
+3 votes
1 answer

Browse Categories

...