2014-09-11 69 views
-1

我想配置哪些selenium測試運行,哪些不是通過XML或通過屬性文件運行。Selenium XML/Propeerties文件測試套件?

testCase1=false 
testCase2=true 
testCase3=true 

現在,如果我開始Selenium測試,它必須只運行2和3

任何可能性?

另外,我是否需要多個端口同時運行測試?

回答

0

如果您使用TestNG,則可以使用@Test(enabled = false)即@Test註釋的enabled參數。在這裏看到:http://www.tutorialspoint.com/testng/testng_ignore_test.htm

+0

「@Test(enabled = false)」在我們構建項目後會進入類文件。但我想配置屬性文件或xml。 – user3168792 2014-09-11 09:30:11

+0

你想在類中執行多個類或測試方法嗎? – 2014-09-11 09:38:58

0

I wanted to configure which selenium tests to run and which not to by either XML or through properties file.

這取決於你用它來運行測試其框架。

對於JUnit,您可以使用@Ignore跳過測試方法。

對於TestNG的,你可以讓測試方法enabled=false作爲German Petrov回答

有大量的可用信息通過互聯網。去谷歌上查詢。

Also do i need multiple ports to run tests simultaneously? 

不,您不需要多個端口,您可以設置並行測試執行,並且TestNG提供更好的支持。