NodeJS 包可以处理具有类似 selenium 网格功能的 Linux 盒子上的并行无头测试?
我需要处理在 selenium 独立服务器上运行并行测试的经过身份验证的多个用户,并在 nodejs 上发现了两个 webdriver 客户端。有 webdriver-js 和 wd-js。哪个更主动、更可靠?有什么经验吗?我有点担心当节点或硒更新或删除功能时它们会崩溃。
我不认为这些包中的任何一个提到在每次测试时在唯一的显示编号上自动启动 Xvfb。那么在驱动浏览器之前启动 shell 命令来运行 xvfb 吗?
以下过程是我尝试在 Node.js 中构建的过程(它本质上类似于 Grid 2,但 Node.js 的目的是持续集成运行的测试)并为以下任何部分寻找任何包或建议。
首先使用持久双向连接(WebSockets 或 HTTP 1.1)对用户进行身份验证
用户请求在可用硬件节点上运行的启动/队列测试(我将添加更多 Linux 机器,因此需要一个包来跨“网格”分发并行测试)
监视正在运行的 selenium 浏览器测试并发送客户端状态更新(例如)运行/停止)
用户提交的测试需要持久且可访问,以供将来或持续集成(couchdb或mysql)
调度要连续运行的作业(例如运行每个设定的时间间隔)。
Nodejs 是不是有点大材小用了?我应该只关注 Java 的后端吗?
I need to handle authenticated multiple users running parallel tests on the selenium standalone server, and discovered two webdriver clients on nodejs. There's webdriver-js and wd-js. Which is more active and reliable? Any experiences? I'm a bit concerned about them breaking down when node or selenium updates or removes features.
I don't think any of those packages mention automatically starting Xvfb on a unique display number per test. So start shell commands to run xvfb before driving the browser?
The following process is what I am trying to build in nodejs (it's essentially like Grid 2 but on nodejs purpose of continuous integration of tests running) and looking for any packages or suggestions for any of the following part.
First authenticate the user(s) using a persistent bi-directional connection (WebSockets or HTTP 1.1)
Start/queue tests requested to run by the user on available hardware nodes (I will add more linux boxes so need a package to distribute parallel tests across the "grid")
Monitor the running selenium browser tests and send client status updates (ex) running/stop)
Tests submitted by the users need to be persistent and accessible for future or continuous integration (couchdb or mysql)
Scheduling of jobs to be run on a continuous basis (ex. run every set interval of time).
Is nodejs a bit overkill? should I focus on Java only for the backside?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
https://github.com/LearnBoost/soda
这是用于 vanilla Sauce Labs/Selenium RC 集成。我想当你在像 Selenium RC 这样的浏览器实例中运行时,websockets 应该可以正常工作,因为页面上的 javascript 被执行。如果您要对用户进行身份验证,您只需填写任何表单并正常提交(这会触发您的 WS 身份验证)。
我不认为 Nodejs 对此有过大的杀伤力。节点是轻量级的。我不知道我只是为了这个而将节点添加到我的堆栈中,但这确实很方便,而且如果您致力于 JavaScript,那没什么大不了的。
https://github.com/LearnBoost/soda
This is for vanilla Sauce Labs/Selenium RC integration. I'd imagine when you're running in a browser instance like Selenium RC, websockets should just work, as the javascript on the page is executed. If you're authenticating a user, you want to just fill out whatever form and submit (which triggers your WS auth) as normal.
I don't think nodejs is overkill for this. Node is lightweight. I don't know that I'd add node to my stack ONLY for this, but its certainly convenient and if you have a commitment to javascript, its no big deal.