2014-02-18 60 views
0

我有Selenium + Eclipse + Java Project + Eclipse TestNG插件。 例如,我的代碼是:TestNG。無法運行單一測試方法

public class TestClass { 

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

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

當我運行識別TestClass作爲TestNG的,這兩個測試被執行。 我不明白爲什麼test2也被執行。 因爲在@Test註釋之前有一個註釋「//」。

任何想法? 在此先感謝

回答

0

首先,您應該清理類文件,然後再次抱怨Java編程

相關問題