Alexander Tumanin
Alexander Tumanin

Reputation: 1842

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. 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.

Upvotes: 0

Views: 65

Answers (1)

ahe
ahe

Reputation: 227

If you're using Eclipse:

Right click on the specific test that you want to run in Outline, Run As -> JUnit Test.

Upvotes: 1

Related Questions