[英]How to start JUnit tests separately?
I am new in JUnit and I found a lot of examples in web, but all of them show me a class of tests, where they start in sequence. 我是JUnit的新手,我在Web上找到了很多示例,但是所有示例都向我展示了一系列测试,它们按顺序开始。 I have the follow test class: 我有以下测试课程:
public class ControlServiceTest {
@Test
public void testCreateUser() {
//some stuff
}
@Test
public void testLoginUser() {
//some stuff
}
}
But i need to start only one test at same time, not both. 但是我只需要同时开始一个测试,而不是两个都开始。 I will be glad if somebody explain me how can I do it. 如果有人向我解释我该怎么做,我会很高兴。
If you're using Eclipse: 如果您使用的是Eclipse:
Right click on the specific test that you want to run in Outline, Run As -> JUnit Test. 右键单击要在Outline,Run As-> JUnit Test中运行的特定测试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.