用于测试 Rails 和 Merb 应用程序的 selenium 和 watir 的无头替换
未来是否有计划用 mechanize + johnson 取代 selenium 和 watir?
Are there any future plans to replace selenium and watir with mechanize + johnson?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
目前,似乎最有动力的是 celerity,它是“orip”提到的围绕 HtmlUnit 的 Jruby 包装器。
此外,还有一个围绕 celerity 的非常简洁的包装器“culerity”,它允许您访问 HtmlUnit(运行 Java/JRuby)您的正常机器设置。 Culerity 是 Cucumber 和 Celerity 之间的桥梁。
这对于用 Cucumber 编写测试来说非常有用,我强烈推荐它。
以下是更多信息:
http://drogomir .com/blog/2009/6/16/cucumber-and-celerity-testing-unobtrusive-javascript
以下是错误示例:
http://github.com/drogus/culerity-javascript-example/tree/ master
这是 culerity 项目本身,也有很好的例子(以及一个很好的安装指南)
http://github.com/langalex/culerity/tree/master
关于此设置的成熟度:
几周前我尝试过这个。我很容易就得到了 culity 示例并运行起来。
另一方面,我在两件事上遇到了问题:
我的一些发现可能是在极端前沿进行尝试的结果。然而,我仍然认为这将是这样,无头浏览器测试将会进行,除了不成熟的 webrat/culerity 界面之外,您可能可以创建一些基于 celerity/HtmlUnit 的不错的测试套件:)
我希望这能回答您的问题。
For the moment, there seems to be most momentum around celerity which is a Jruby wrapper around HtmlUnit mentioned by "orip"
Also there is a pretty neat wrapper "culerity" around celerity, which allows you to access HtmlUnit (running Java/JRuby) in your normal machine setup. Culerity is the bridge between Cucumber and Celerity.
This is brilliant for writing tests in Cucumber, which i can highly recommend.
Here is more info:
http://drogomir.com/blog/2009/6/16/cucumber-and-celerity-testing-unobtrusive-javascript
And here is the culerity examples:
http://github.com/drogus/culerity-javascript-example/tree/master
Here is the culerity project itself also with good examples (and a nice install guide)
http://github.com/langalex/culerity/tree/master
A note on maturity of this setup:
I experimented with this a couple of weeks ago. And i got the culerity examples up and running fairly easy.
On the other hand, I had problems with two things:
Some of my findings may be a result of trying this out on the extreme bleeding edge. However, i still think that this will be the way, the headless browser tests will go, and apart from the immature webrat/culerity interface, you could probably create some decent test suite based on celerity/HtmlUnit :)
I hope this answers your question.
有点离题,但您已经可以使用 HtmlUnit 来支持 JS 的无头浏览器,以进行测试。使用 JRuby,您甚至可以继续使用 Ruby。
A little off-topic, but you can already use HtmlUnit for a JS-supporting headless browser geared for testing. Using JRuby you can even keep using Ruby.