Selenium的Remote Control与WebDriver之间有什么区别? [英] What is the difference between Selenium's Remote Control vs WebDriver?

查看:267
本文介绍了Selenium的Remote Control与WebDriver之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定我是否完全理解其中的区别. WebDriver API还直接控制选择的浏览器.什么时候应该使用硒遥控器(selenium RC)?

I'm not sure I quite understand the difference. WebDriver API also directly controls the browser of choice. When should you use selenium remote control (selenium RC) instead ?

现在,我目前的情况是我正在通过编写带有Selenium WebDriver API的套件并使其在我的计算机上运行来测试Web应用程序.测试花费的时间越来越长,因此我一直在寻找在Linux服务器上运行测试的方法.

Right now, my current situation is I am testing a web application by writing a suite with Selenium WebDriver API and letting it run on my computer. The tests are taking longer and longer to complete, so I have been searching for ways to run the tests on a Linux server.

如果我使用Selenium Remote Control,这是否意味着我必须重写用WebDriver API编写的所有内容?

If I use Selenium Remote Control, does this mean I have to rewrite everything I wrote with WebDriver API?

我对Selenium Grid,Hudson和Selenium RC感到困惑.我为Hudson找到了一个Selenium Grid插件,但不确定是否包括Selenium RC.

I am getting confused with Selenium Grid, Hudson, Selenium RC. I found a Selenium Grid plugin for Hudson, but not sure if this includes Selenium RC.

我走的路线正确吗?我设想了以下架构:

Am I taking the correct route? I envision the following architecture:

  • Hudson在少数Ubuntu专用服务器上运行.
  • Hudson与Xvnc& Selenium Grid插件. (我需要单独安装Firefox吗?)
  • 运行硒RC测试套件的硒网格.

我认为,这比在当前使用WebDriver API的台式计算机上运行测试要省时得多.

I think this is far more time efficient than running test on my current working desktop computer with WebDriver API.

推荐答案

据我了解,Webdriver实现的开始时间比Selenium RC稍晚.从我的角度来看,WebDriver是更灵活的解决方案,它解决了SeleniumRC的一些烦人的问题.

As far as I understand, Webdriver implementation started little later than Selenium RC. From my point of view, WebDriver is more flexible solution, which fixed some annoying problems of SeleniumRC.

WebDriver提供了用于测试Web GUI的标准界面.该接口有几种实现方式(HTTP,特定于浏览器并基于Selenium).由于您已经有一些WebDriver测试,因此您必须熟悉

WebDriver provides standard interface for testing web GUI. There are several implementations of this interface (HTTP, browser-specific and based on Selenium). Since you already have some WebDriver tests, you must be familiar with basic docs like this

完成测试的时间越来越长,所以我一直在寻找在Linux服务器上运行测试的方法.

The tests are getting longer and longer to complete, so I have been searching for ways to run the tests on a linux server.

您是否尝试找到实际的瓶颈?我不确定,消除WebDriver层是否会有所帮助.我认为,大多数时间都花在Selenium命令发送和HTTP请求到被测系统上.

Did you try to find actual bottlenecks? I'm not sure, that elimination of WebDriver layer will help. I think, most time is spent on Selenium commands sending and HTTP requests to system-under-test.

如果我使用slenium遥控器, 这意味着我必须重写所有内容 我是用WebDriver API编写的吗?

If I use sleneium remote control, does this mean I have to rewrite everything I wrote with WebDriver API ?

通常,是的.如果您未在测试代码和WebDriver之间实现其他附加层.

Generally, yes. If you did not implement some additional layer between tests code and WebDriver.

对于硒网格: 您可以在几个不同的[虚拟]节点上启动几个Selenium RC实例,然后在Selenium Grid中注册它们.您的测试将连接到Selenium Grid,并将所有命令重定向到SeleniumRC实例,并根据所需的浏览器进行协调.

As for Selenium Grid: You may start several Selenium RC instances on several different [virtual] nodes, then register them in Selenium Grid. Your tests connect to Selenium Grid, and it redirects all commands to SeleniumRC instances, coordinating them in accordance with required browsers.

有关hudson插件的详细信息,您可以在此处

For details of hudson plugin you may find more info here

这篇关于Selenium的Remote Control与WebDriver之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆