是否可以在 Linux 上运行 Magento TAF(测试自动化框架)?
我正在尝试在 Ubuntu 上配置 Magento TAF,遵循 安装指南 pdf。 我读过它...
当前版本限制:
- 正在执行远程测试
- UNIX 运行使用
- 通过配置文件配置 Firefox
Firefox配置文件的远程测试...但我感到怀疑:)
- 则有一个准备好的主要shell脚本(runtests.sh)
- 如果我配置了所有内容并执行, selenium RC 和 runtests.sh,firefox 浏览器打开...(但站在空页面上)。
- 此外:安装指南中有一些不一致之处,这就是为什么我怀疑 Linux 限制可能已被弃用。例如:第 2 页上说...
在基础级别,Magento 测试自动化框架将需要 以下软件:(...)Selenium RC 2.0.3
...但在第 4 页...
下载并安装 Selenium RC 1.0.3 (...)。最新版本 版本是 2.x,下载 Selenium RC(现在可用 NEW 2.0b),但是 自动化测试用例可能无法使用它。
问题:是否可以在 Linux 上运行 Magento TAF?
谢谢!
I'm trying to configure Magento TAF on Ubuntu, following the Installation Guide pdf.
I read on it...
Current version limitations:
- Remote tests executing
- UNIX running Usage
- Firefox profile through configuration file
...but I feel skeptical :)
- There is a main shell script prepared (runtests.sh)
- if I configure everything and I execute selenium RC and runtests.sh, firefox browser opens... (but stands on empty page).
- Furthermore: there are several inconsistences on the Installation Guide, that's why I suspect that Linux restrictions perhaps are deprecated. For example: on page 2 says...
At the base level, Magento Test Automation Framework will require the
following software: (...)Selenium RC 2.0.3
... but on page 4...
Download and install Selenium RC 1.0.3 (...).The latest available
version is 2.x, Download Selenium RC (Now available NEW 2.0b), but
automated test cases will probably not work with it.
The question: Is it possible to run Magento TAF on Linux?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
是的,这是可能的。
我在 1.x 版本中使用 Selenium Grid 时遇到了同样的问题。
下载 Selenium 驱动程序 (Selenium 2)。我在 Debian 中运行了测试,而没有修改 runtests.sh。
如果您打算使用多个操作系统/浏览器进行测试,您可以找到Selenium Grid 2 快速入门教程。如果您将 Magento 代码托管在 Linux Web 服务器上,这可能会有所帮助。幸运的是,现在设置网格比使用 Selenium 1 容易得多。
启动服务器
默认情况下,服务器将在端口 4444 上运行。您可以在没有桌面环境的 Linux 机器上启动服务器(例如开发 Web 服务器)。
然后你设置带有桌面环境的盒子(例如Windows机器和Linux机器)。现在,您为每台计算机下载服务器独立库并启动客户端:
您必须将 IP 更改为 Selenium 服务器的 IP(如果在第一个命令中这样做,则更改端口)。默认情况下,客户端将在端口 5555 上运行。如果您想为客户端使用其他端口或者希望启动多个客户端实例,您可以使用 -port 开关定义自定义端口。
注意:根本不用太关心文档中提到的软件版本。似乎有点过时了。
Yes, it is possible.
I had the same problem using Selenium Grid in version 1.x.
Download Selenium Driver (Selenium 2). I got the tests running in Debian without modifying runtests.sh.
If you plan to test with several OS / browsers you can find a quick start tutorial for Selenium Grid 2. This may be helpful if you host your Magento code on a linux webserver. It's much easier now to set up the grid than it was with Selenium 1, fortunately.
Launch the server with
By default, the server will run on port 4444. You can start the server on a Linux box without a desktop environment (e.g. a development web server).
Then you set up boxes with desktop environment (e.g. a Windows machine and a Linux machine). Now you download the server standalone library for every machine and start the client:
You have to change the IP to the IP of your Selenium server (and change the port if you did so in the first command). By default, the client will run on port 5555. If you want to use another port for the client or if you wish to start several client instances, you can define custom ports using the -port switch.
Note: don't care too much about the software versions mentioned in the document at all. It seems to be a bit outdated.
最新的公开版本在 Ubuntu/Debian 上几乎开箱即用,运行良好,但文档是面向 Windows 的。
我们使用 Ubuntu 服务器 11.04 64 位上的 Google Chrome 在无头 Selenium 安装上运行测试。屏幕截图仅在使用 Firefox 时才可用,
但 Selenium 需要 Firefox 3.6 版本,因此我们需要降级 Mozilla 浏览器才能启用该功能。[更新:2012 年 3 月 27 日] 升级软件包后,我们再次尝试使用 Firefox 10,最令我们惊讶的是,它成功了!我们现在已经有了屏幕截图!
我写了一个 教程(2012 年 3 月 27 日更新),概述了在 Ubuntu 服务器上使用 Magento TAF 安装全新的无头 Selenium 环境。希望有帮助。
The latest public release works fine on Ubuntu/Debian pretty much out of the box, but the documentation is Windows-orientated.
We got the tests running on a headless Selenium installation using Google Chrome on Ubuntu server 11.04 64bit. Screen-shots are only possible when using Firefox,
but Selenium requires version 3.6 of Firefox, so we'll need to downgrade the Mozilla browser to enable that.[Update: March 27th 2012] We tried again with Firefox 10 after upgrading our packages and to our biggest surprise, it worked! We've now got screen-shots!
I wrote a tutorial (updated March 27th 2012) that outlines installing a fresh headless Selenium environment with Magento TAF on Ubuntu Server. Hope that helps.
是的,这是可能的。
我制作了一个初始化脚本 selenium-headless 简化了在服务器。
Yes, this is possible.
I made a init script selenium-headless that simplifies running the TAF on a server.
TAF 项目正在开发中,这只是发布的预览版。该团队希望分享想法并为 Magento 开发的每个人提供有价值的好处(自动测试)。 TAF会有变化,在正式发布之前会进行重组和打磨。
这些文档有点过时了,它们给出了测试用法的一般概述。目前TAF可以在Windows和Linux上运行,并且Selenium 1和2都可以用来运行它们。
总结
PS 对于问题,我们深表歉意 - 这个版本只是一个工作草案。我们将对其进行改进,对文档进行校对,并提供信息丰富的消息。
无论如何,感谢您使用 TAF :)
The TAF project is under development, this is just a preview was published. The team wanted to share ideas and give valuable benefits (automatic tests) for everyone, who is developing for Magento. TAF will have changes, it will be restructured and polished before the official release.
The docs are outdated a little, they give general overview of the tests usage. Currently TAF can be run on both Windows and Linux, and both Selenium 1 and 2 can be used to run them.
Summary
P.S. And sorry for issues - this version is just a working draft. It will be improved, documentation will be proof-read and informative messages will be provided.
Thanks for using TAF, anyway :)