使用 TestNG 在 Selenium 网格上运行脚本时出现问题
我的框架上有测试用例,即我的 seleniumtestsupport.java 文件使用 webdriver 类来启动、停止和运行。终止浏览器。脚本在 Selenium rc 中运行正常。现在我想通过 selenium 网格在多个端口上运行多个脚本。我确实使用 testNg 和 ant 设置了网格。但问题是在 SeeleniumTestSupport.java 中进行哪些更改文件或任何其他文件来运行脚本。 testng.xml 文件也已配置。请帮我 ?
i have the test cases with my on framework i.e. my seleniumtestsupport.java file in i uses the webdriver class for starting,stoping & killing the browser.Scripts was running ok with Selenium rc smoothly.Now i want to run multiple scripts through selenium grid on multiple ports.I did setup the grid with testNg and ant.But issue is what changes to be made in the SeeleniumTestSupport.java file or any other files to run the scripts. testng.xml file is also configured. please help me ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Selenium-Grid 本身不执行任何并行运行测试的操作。网格就像巨大的selenium-RC,可以一起执行多个测试。但是为了让 Grid 执行多个测试,您需要同时触发多个测试。为此,您必须使用 testNG 的功能。
您可以从此处获取有关如何使用 testNG 并行运行多个测试的详细信息。
您可以阅读更多内容关于 Selenium Grid 1.xx 的工作原理请参见此处。 Grid 1.x 仅处理 selenium 请求,而不处理 webdriver。但您最好了解 Grid 1.x 的工作原理。
Grid 的下一个版本(Grid 2.0)最近发布了。它还可以处理 webdriver 测试。您可以从 此处并在此处查找有关网格的更多详细信息
Selenium-Grid by itself doesn't do any thing to run tests in parallel. Grid is like mammoth selenium-RC which can execute multiple tests together. But for Grid to execute multiple tests you need to trigger many tests at the same time. For that you will have to use testNG's features.
You can get details on how to use testNG to run multiple tests in parallel from here
You can read more about how Selenium Grid 1.xx works here. Grid 1.x handles only selenium requests and not webdriver. But it's better you understand how Grid 1.x works.
The next version of Grid (Grid 2.0) was released recently. That handles webdriver tests also. You can download Grid 2.0 from here and find more details about Grid here