英文:
Eclipse - Debug as - TestNG Test: fails to find the test source code
问题
我正在尝试在Eclipse中运行TestNG的单元测试并进行调试。我在代码中设置了一个断点,但当它达到该点时,Eclipse会报告无法找到单元测试的源代码!
在过去,我曾经遇到过这个问题,但那时是因为我没有在本地下载外部项目的源代码。然而,这次情况完全不同。Eclipse甚至无法找到定义单元测试的项目的源代码。
然而,当我使用"编辑源代码查找路径"附加了项目后,我可以看到源代码。
编辑:
经过一些调查,我可以说:
Eclipse --> 以Java应用程序方式进行调试可以找到源代码。
所以这个问题似乎与TestNG测试的启动有关。
英文:
I am trying to debug a unit test running testng in Eclipse. I put a breakpoint in the code and when it reaches that point Eclipse complains that it can not find the source code for the unit test!
I had experience this issue in the pass but this was always because external projects that i had not downloaded the sources locally. However, this is something entirely different. Eclipse is not even able to find the source for the project where the unit test is defined.
However, when i attached the project using the "Edit Source Lookup Path", I am able to see the source code.
EDIT:
After some investigation I can say that:
Eclipse --> Debug As -> Java Application works and finds the source code.
So this issue seems to be related to TestNG Test launch
答案1
得分: 0
The description and solution to this issue and a solution can be found here:
https://github.com/cbeust/testng-eclipse/issues/490
英文:
The description and solution to this issue and a solution can be found here:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论