TestNG启动期间发生内部错误 [英] TestNG An internal error occurred during launching

查看:1909
本文介绍了TestNG启动期间发生内部错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个TestNG类(FirstTest.java),当我将测试用例作为TestNG Test运行时,我收到以下错误。

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

在启动FirstTest期间发生内部错误。
java.lang.NullPointerException

Eclipse版本:Luna Service Release 2(4.4.2)

Eclipse Version: Luna Service Release 2 (4.4.2)

如果有人知道请帮助!

推荐答案

我今天遇到类似症状的问题。我不知道这是否是同样的问题,但它匹配您的问题中的所有内容。

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)

所以我的问题是Eclipse中的TestNG插件找不到pom文件,因为我不使用Maven。无论如何,卸载可选的M2E(Maven ...)部分TestNG Eclipse插件后,我可以成功运行我的TestNG测试用例。

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


  • 帮助

  • 安装新软件...

  • 已经安装了什么?

  • 选择TestNG M2E软件,然后单击卸载

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

希望这有帮助!

这篇关于TestNG启动期间发生内部错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆