Maxim Kim
Maxim Kim

Reputation: 171

TestNG. can't run a single test method

I have Selenium+Eclipse+Java Project+Eclipse TestNG plugin. For example, my code is:

public class TestClass {

@Test
public void test1() throws Exception {
    ...
    }

//@Test
public void test2() throws Exception {
    ...
    }

When i run TestClass as TestNG, both tests are executed. I can't understand why test2 is executed also. Because there is a comment "//" before @Test annotations.

Any ideas? thanks in advance

Upvotes: 0

Views: 540

Answers (1)

chaser
chaser

Reputation: 36

First, you should clean the class files, then compile the project again

Upvotes: 1

Related Questions