有什么优点和优点?新 Grails 应用程序的功能测试框架有何缺点?

发布于 2024-09-18 13:51:09 字数 928 浏览 9 评论 0原文

我对新 grails (v1.3.4) 应用程序的所有不同功能测试选项进行了分析瘫痪。我看过

并且一定还有其他的。我认为我用来做出决定的一些标准包括(排名不分先后):

  • 可能的寿​​命、积极的开发
  • 可以进行 ajax/javascript
  • 支持 PageObject 或类似模式
  • 成熟度
  • 无头(例如 htmlunit)是可以的,特别是如果它使事情进展得更快
  • 良好的报告
  • 支持 NTLM 凭证提供程序或类似
  • 紧凑、稳健的测试脚本
  • 利用 Groovy 语言

我特别有兴趣听到尝试过多种框架的人的意见。谢谢!

I've got analysis paralysis looking at all the different functional testing options for a new grails (v1.3.4) application. I've looked at

and there must be others. I think some of the criteria that I would use to make a decision include (in no particular order):

  • Likely longevity, active development
  • Can do ajax/javascript
  • Support for PageObject or similar patterns
  • Maturity
  • Headless (eg htmlunit) is ok, especially if it makes things go faster
  • Good reporting
  • Support for NTLM credential provider or similar
  • Compact, robust test scripts
  • Takes advantage of groovy language

I would be particularly interested to hear from people who have tried more than one framework. Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

若无相欠,怎会相见 2024-09-25 13:51:09

我维护 WebTest 插件,但我建议尝试一下 Geb。我还没有在项目中亲自使用它,但我认为它会满足您的大部分标准。

它是开发最活跃的(IMO),但相当新。它是基于 WebDriver/Selenium 构建的,因此也应该很适合您过去的经验。

WebTest 目前没有太多的开发,并且没有对页面对象的内置支持。但它确实为您提供了很棒的报告。它的缺点是它是蚂蚁金服的历史基础。这使得以动态方式进行测试变得困难,因为测试步骤是在执行测试用例时构建的,然后实际测试作为第二遍运行。

我也使用过 GFunc,但缺乏报告确实令人痛苦,而且它的发展不如 Geb。它比 WebTest 更“常规”,并且是 HtmlUnit 的一个薄包装,允许您非常轻松地“推出自己的”测试功能。

干杯

I maintain the plugin for WebTest but I'd recommend giving Geb a try. I haven't used it personally on a project yet but I think it will tick off most of your criteria.

It is the most actively developed (IMO) but is quite new. It is built on WebDriver/Selenium so should also be a good fit with your past experience.

WebTest doesn't see a lot of development these days and does not have built in support for page objects. But it does give you great reports. It's downside is it's historical foundation of Ant. It makes it hard to test in a dynamic fashion as your test steps are built up when the test case is executed and then the actual test is run as a second pass.

I have used GFunc as well but the lack of reporting is a real pain and it does not get as much development as Geb. It is far more "groovy" than WebTest though and is a thin wrapper over HtmlUnit allowing you to "roll your own" testing functionality quite easily.

cheers

Lee

温柔戏命师 2024-09-25 13:51:09

Grails 功能测试仅适用于 HtmlUnit。如今,我不建议使用其他可用框架直接向 HtmlUnit 进行编码,这些框架可以为您提供页面对象和开箱即用的更好的抽象。

我使用了 webdriver 插件,它似乎工作得很好,并且内置了页面对象 - 但页面对象支持与 JUnit 层次结构耦合,这使我很难使用,因为我也想使用 Cucumber。

我对 Geb 感到非常兴奋,并且听到了很多关于它的成功故事,但我自己还没有完成设置。

Grails Functional Test is HtmlUnit only. I wouldn't suggest coding directly to HtmlUnit these days with the other frameworks that are available that give you page object and better abstraction out of the box.

I've used the webdriver plugin which seems to work pretty well and has page object built in - but the page object support is coupled to the JUnit hierarchy, which makes it hard for me to use because I want to also use Cucumber.

I'm very excited about Geb and am hearing a lot of success stories with it but haven't gotten to finish setting it up myself.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文