使用 Jenkins 和 PHPUnit 实现 selenium
我正在尝试使用 PHPUnit 设置一些 Selenium WebTests,但是 Selenium IDE 不再支持 php,这是否意味着我必须将所有测试重新写入 php 才能使用此方法?
我正在尝试建立一个持续集成系统,但以前从未使用过,我尝试使用 jenkins-php.org 但它不是很有帮助。
I'm trying to do set up some Selenium WebTests using PHPUnit, but php is no longer supported by Selenium IDE, does this mean I have to re-write all my tests into php in order to use this method?
I'm trying to set up a continuous integration system, but have never even used one before, I tried using jenkins-php.org but it wasn't very helpful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
较新版本的 Selenium IDE“声称”它不支持 PHP,
但您仍然可以将 IDE 转换为 PHP 或 PHPUnit。
(在 Selenium IDE 中)选项 >选项>启用实验功能。
选中此选项后,您可以再次在“选项”下切换格式。
您可能仍然想检查您的代码。
希望这会有所帮助,这就是您所说的“Selenium IDE 不支持 PHP”的意思。
The newer releasee Selenium IDE "claims" it does not support PHP,
But you can still convert your IDE to PHP or PHPUnit.
(In Selenium IDE) Option > Options > Enable Experimental Functions.
With this option checked you can switch your format under Options again.
You may still want to review your code.
Hope this helps and it is what you meant by "Selenium IDE does not support PHP".
我能够找到: https://addons。 mozilla.org/en-US/firefox/addon/selenium-ide-php-formatters/
它允许从 Selenium 输出到 PHP,无论是 PHPUnit 格式还是 Selenium 测试。
然而,经过所有这些尝试后,很明显最好的方法是使用 htmlSuite,它在自动化方面拥有最多的支持,并且似乎开箱即用,而 PHPUnit 测试需要大量修改。
I was able to find: https://addons.mozilla.org/en-US/firefox/addon/selenium-ide-php-formatters/
It allows output from Selenium to PHP, either PHPUnit format or Selenium Testing.
However after all this playing around it became apparent that the best way was to use htmlSuite, it has the most support when it comes to automation and seems to work out of the box, whereas PHPUnit testing requires lots of tinkering.
经过大量的黑客攻击后,很明显,最好的解决方案是这个工具:
http: //www.enjoyxstudy.com/selenium/autoexec/index.en.html
它开箱即用,支持 htmlSuite,适用于 Windows 和 Linux,运行大多数浏览器,发送电子邮件报告,可以获得来自 SVN 的新测试,与 Jenkins 很好地集成,并与 Selenium 测试一起使用,它不是基于 PHP 的测试,但与我尝试过的其他工具相比,它的效果非常好。
真的,更容易,非常用户友好,免费并且开箱即用。
After a lot of hacking around it became apparent that the best solution is this tool:
http://www.enjoyxstudy.com/selenium/autoexec/index.en.html
It works out of the box, supports htmlSuite, works with windows and linux, runs most browsers, sends email reports, can get new tests from SVN, integrates with Jenkins well, and works with Selenium tests, its not PHP based tests but it works wonders compared to the other tools I tried out.
Really, so much easier, very user friendly, free and works out the box.