Solving “An internal error occurred during Launching TestNGFile” Problem in Selenium
If you are here, you have probably encountered the notorious “An internal error occurred during Launching TestNGFile Problem” in Selenium. The message must also be saying that it has something to do with the java.lang.NullPointerException. First of all, I would say relax! There’s no need to panic. Nothing good has ever come of it. The DITD doctor is here, and I will literally walk you through this situation.
The TestNGFile issue is basically being caused by the presence of TestNG M2E part in your installed software list. You just gotta remove that, and the problem will solve itself.
You might be getting something like this while trying to run your code:
Here’s a step by step process explaining how to exactly do that and fix this issue.
Steps to Solve An Internal Error Occurred During Launching TestNGFile Problem
Step 1: Navigate to Help> Install New Software…
When you click on it, here’s what you will get:
Step 2: Now click on What is already installed? as shown in the picture above.
It will open a new window showing all that is already installed on your Eclipse.
Step 3: Look for TestNG M2E (Maven) Integration (Optional) option in the list. Must be at the bottom or something. Just click on it. It will make highlight the “Uninstall…” option at the bottom.
Step 4: Go ahead and uninstall it by clicking on the “Uninstall…” button.
Step 5: Just click on Finish.
The uninstallation will begin to happen. When it will be done, it will ask for a restart.
Step 6: Click on Yes.
Wait for Eclipse IDE to restart once again. When it will restart just go to your program that you were trying to run and click on Run (green button).
This time you will not face the same “internal error” message anymore.
Here I have made a cool video explaining the entire process on Youtube:
Did this method work for you? Let me know in the comments section below.
Like this cool trick? Check out our other cool tips, tweaks and tricks as well.
It’s a wonderful solution to overcome this internal error.
Thanks for your given information on this.
Glad I could be of assistance San.
Cheers,
Scottshak
I have uninstalled TestNG M2E plugin and ran testng.xml file, still i am getting the same issue. Please give me suggestion.
the An internal error occurred during: “Launching FirstTestCase”.
java.lang.NullPointerException, this issue is resloved by using your given solution.
thank you
Thank you Soniya. I am glad that it did 🙂
Thank you dude…Now its working
Glad I could be of help, Pradeep. 🙂
Thank You so much . Now it is working fine.
I am glad Sagarika. My solution worked. 🙂
It’s Very helpful solution. Thank you so much.
Glad it solved things for you Mona. 🙂
It’s wondeful solution. Thank you so much.
That’s wonderful. It’s so simple I was banging my head on my desktop for to see what was wrong. Thank you very much!
Woohoo! Glad I could be of assistance. 🙂
Thank You so much . Now it is working fine.
Happy that it worked Sandeep. 🙂
it worked for me. Thank you
Glad that it did. Thank you 🙂
i tried this solution but still am facing same issue. pls anyone help me
Could not initialize class org.testng.eclipse.util.ClassMethodsSuite..
plz help i am getting this error
Try cleaning the project.
If using maven, you can go for ‘maven clean install’.
Thank you brother.
No problem. 🙂
Getting same issue, please help me to overcome this error
Ya Thank you bro. I solved this issue.