TestNG An internal error occurred during launching

青春壹個敷衍的年華 提交于 2019-12-17 07:49:43

问题


I created a TestNG class (FirstTest.java) and when I run the test case as TestNG Test, I am getting the following error.

An internal error occurred during: "Launching FirstTest". java.lang.NullPointerException

Eclipse Version: Luna Service Release 2 (4.4.2)

If anyone knows Please Help!


回答1:


I encountered a problem with similar symptoms today. I'm not sure if it is the same problem but it matches everything in your question.

In my case, the log files said:

!ENTRY org.eclipse.core.jobs 4 2 2015-12-03 15:49:19.369
!MESSAGE An internal error occurred during: "Launching NewTest".
!STACK 0
java.lang.NullPointerException
at org.testng.eclipse.maven.MavenTestNGLaunchConfigurationProvider.getVMArgsFromPom(MavenTestNGLaunchConfigurationProvider.java:74)

So my problem was that the TestNG-plugin in Eclipse failed to find the pom-file, as I don't use Maven. Anyway, after uninstalling the optional M2E (Maven...) part of the TestNG Eclipse plugin I could run my TestNG test cases successfully.

If you have the same issue, you uninstall the M2E part in Eclipse by selecting

  • Help
  • Install new software...
  • What is already installed?
  • Select the TestNG M2E software and click uninstall

Hope this helps!




回答2:


Need to uninstall M2E. I uninstalled like below path: Help->Install new software->Already installed -> Uninstall M2E




回答3:


I was also getting the same issue, I just uninstalled TestNG M2E software.

Steps:

  1. Help
  2. Install new software.
  3. Install/Update.
  4. Click on Install/Update link (right-hand side)
  5. Select TestNG M2E from the list.
  6. Uninstall.



回答4:


I Installed TestNG in Eclipse and tried to execute test case but got error message "Launching Test Case has encountered a problem, an Internal error occur during during launching Test Case "

i guess TestNG-plugin in Eclipse might failed,i uninstalled optional M2E (Maven...). After uninstalling the optional M2E (Maven...) part of the TestNG Eclipse plugin I could run my TestNG test cases successfully.

If you have the same issue, you uninstall the M2E part in Eclipse by selecting

Help Install new software... What is already installed? Select the TestNG M2E software and click uninstall




回答5:


The issue was fixed, please use the latest release 6.12.0.201709050550: http://beust.com/eclipse.

Link the similar issue here




回答6:


Hi I faced the same problem. The eclipse failed to initiate the action,

To solve this problem, follow the below steps

  1. Go To Help
  2. Choose Install New Software
  3. Choose Whats been installed?
  4. Uninstall the TestNG M2e from the list
  5. Restart the application


来源:https://stackoverflow.com/questions/34050615/testng-an-internal-error-occurred-during-launching

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!