Showing posts with label Errors in TestNG XML. Show all posts
Showing posts with label Errors in TestNG XML. Show all posts

TestNG Error Codes


We write automation framework using TestNG and when we run it we get errors sometimes. So, it becomes important for us to know about error messages. 

I have put some of the error messages that we get when we go wrong and execute TestNG XML file:

1.If two tests are having the same name then we see below error

at org.testng.TestNG.checkTestNames(TestNG.java:981)
at org.testng.TestNG.sanityCheck(TestNG.java:970)
at org.testng.TestNG.run(TestNG.java:1002)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:109)

2.If the testname doesnot enclosed in double quotes("") then we get below error