Showing posts with label Mistake. Show all posts
Showing posts with label Mistake. Show all posts

Thursday, 14 February 2013

Common mistake which may be done while using TestNG

Hi Folks,

When i move on to data driven testing, TestNG helped for that. As usual i recorded the script using selenium IDE(Firefox Plug-in), save and convert the batch test case using Junit 4. Afterwards just copied the script and paste it in eclipse IDE to implement data driven testing and i am done with the parameterization. But when i start to run the script it got terminated and it not even open the browser but what ever script i have written for parameterization correct. Where i have done a mistake, i was in terrible confusion to resolve the error. Finally i found error where i made, it was just simple but to identify it took a day for me.

What was the mistake: "Forget to remove Junit Statements"
I convert the test case using junit but in the script i was using TestNG framework. In the converted script by default Junit import statements were added, I forget to remove those statements. So when i started to run the script it started using Junit framework to run the script even if i run it using TestNG. So make sure you were removed the Junit statements before running the TestNG script.

 I hope this post would help at least some. Your comments are welcome to improve my blog strategy.

Thanks Folks!!!!