简体   繁体   English

NetBeans + TestNG->“转到源代码”是不可能的

[英]NetBeans + TestNG -> “Go to source” is not possible

I have an huge maven project with TestNG tests. 我有一个带有TestNG测试的大型Maven项目。 I create an new test file and add tests to it to clean my code out of bugs. 我创建了一个新的测试文件,并向其中添加测试以清除代码中的错误。 I use NetBeans to run TestNG tests. 我使用NetBeans运行TestNG测试。

These are my issues: 这些是我的问题:

  1. The output of the tests is in text form. 测试的输出为文本形式。 When I have got an stack trace, its elements are not hyperlinks (so they are not clickable). 当我有一个堆栈跟踪时,其元素不是超链接(因此它们不可单击)。 Rightclick + "Go to source" is also not possible. 右键单击+“转到源代码”也是不可能的。 So I have to manually search for the class and the line with the error. 因此,我必须手动搜索带有错误的类和行。

  2. The output of the test is in text form, not like in this example: http://wiki.netbeans.org/TestNG 测试的输出为文本形式,与本示例不同: http : //wiki.netbeans.org/TestNG

How could I get the stacktraces clickable? 如何获得可单击的堆栈跟踪?

PP I use Netbeans 8.1. PP我使用Netbeans 8.1。 Today I installed all pending plugin updates but the described behavior has not changed. 今天,我安装了所有待处理的插件更新,但是所描述的行为没有改变。

PP2 I start tests via Run -> Test File [Ctrl+F6] PP2我通过运行->测试文件[Ctrl + F6]开始测试

This is related to two reported bugs in Netbeans. 这与Netbeans中报告的两个错误有关。

#257563 - surefire 2.19.1 show no test results windows #257563 - surefire 2.19.1不显示测试结果窗口

solution: downgrade to surefire plugin version 2.18.1 解决方案:降级到surefire插件版本2.18.1

#255883 - test results windows isn't displayed #255883-未显示测试结果窗口

solution: untick in the options Java -> Maven -> print maven output loggin level 解决方案:取消勾选选项Java- Java -> Maven -> print maven output loggin level

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM