【发布时间】:2014-09-11 05:37:53
【问题描述】:
我想通过 XML 或属性文件来配置运行哪些 selenium 测试,哪些不运行。
例子
testCase1=false
testCase2=true
testCase3=true
现在如果我开始 selenium 测试,它必须只运行 2 和 3。
有没有可能?
另外,我是否需要多个端口来同时运行测试?
【问题讨论】:
标签: selenium selenium-webdriver selenium-grid
我想通过 XML 或属性文件来配置运行哪些 selenium 测试,哪些不运行。
例子
testCase1=false
testCase2=true
testCase3=true
现在如果我开始 selenium 测试,它必须只运行 2 和 3。
有没有可能?
另外,我是否需要多个端口来同时运行测试?
【问题讨论】:
标签: selenium selenium-webdriver selenium-grid
如果您使用TestNG,您可以使用@Test(enabled = false),即enabled 参数作为@Test 注释。见这里:http://www.tutorialspoint.com/testng/testng_ignore_test.htm
【讨论】:
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对其提供更好的支持。
【讨论】: