简体   繁体   English

使用NetBeans调试Maven测试?

[英]Debugging maven tests with netbeans?

I'm trying to debug maven tests in NetBeans 6.9.1. 我正在尝试在NetBeans 6.9.1中调试Maven测试。 Does anyone know how to go about doing this? 有人知道该怎么做吗? The reason I ask is because if I run my tests using Maven, they all pass. 我问的原因是因为如果我使用Maven运行测试,那么所有测试都会通过。 However, if I debug my tests using NetBeans (right click test class -> Debug Test File) my tests fail because I have Surefire set up to handle my tests, and NetBeans seems to use its own test runner. 但是,如果我使用NetBeans调试测试(右键单击测试类->调试测试文件),则测试将失败,因为我设置了Surefire来处理我的测试,并且NetBeans似乎使用其自己的测试运行程序。 I noticed that Surefire has a debug option, but how would you go about using that with NetBeans, ie have it stop on your breakpoints in NetBeans? 我注意到Surefire有一个调试选项,但是您将如何与NetBeans一起使用它,即在NetBeans中的断点处停止它呢?

Thanks for any help. 谢谢你的帮助。

I am not very sure about that: 我对此不太确定:

But you may try it with... 但是您可以尝试...

pom.xml pom.xml


<project>
 ...
 <!-- <scope>test</scope> --> <!-- Jus comment out this line and try it -->
 ...

-Saligh -萨利格

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

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