【发布时间】:2017-11-01 20:56:51
【问题描述】:
我在新安装的 Netbeans 8.2 上以调试模式运行测试用例,在 myId 字段上有一个断点。
@Test
public void testCreateDocumentSecurityNullRequest() throws Exception {
final Integer myId = 1;
myRequest request = null;
mockMvc.perform(post("/pathTo/apply/" + myId).contentType(contentType).content(json(request)))
.andExpect(jsonPath("$.code", is("400")));
}
我知道测试已执行,因为我看到了测试结果,但调试器并没有在我的断点处停止。
调试器控制台显示:
Listening on 23206
User program running
LineBreakpoint myTest.java : 'line #' successfully submitted.
User program finished
我不明白为什么它没有停止而是继续?我在 Eclipse 中尝试了它,它停止了,让我按照我的预期继续。我确定我只是误解了一些简单的东西,但我读了documentation 并没有什么对我有影响的。我还查看了其他一些类似的 Stack Overflow 帖子,但这些帖子似乎不适合我的问题。
【问题讨论】:
标签: java debugging breakpoints netbeans-8