【问题标题】:htmlunit vs. jwebunit with htmlunit pluginhtmlunit 与带有 htmlunit 插件的 jwebunit
【发布时间】:2012-08-28 20:20:37
【问题描述】:

我对@9​​87654321@、httpunitjwebunitselenium等ui测试工具做了一些研究。

我对测试工具不是很熟悉。 Htmlunit 在 javascript 支持方面听起来是个不错的选择。然后,我找到了jwebunit,它提供了 API,与htmlunit 相比,使用jwebunit 编写简洁的代码是可能的。

我不太确定的一件事:当我们将jwebunithtmlunit 插件一起使用时,我们是否具有htmlunit 的所有功能,或者jwebunit 是否限制了htmlunit 提供的某些功能的使用?

【问题讨论】:

    标签: testing user-interface htmlunit jwebunit


    【解决方案1】:

    对于 UI 测试还有另一个有趣的选择:使用 Cannoo Webtest(基于 HtmlUnit)+ Groovy 语言。您可以使用简单的 DSL 编写测试,例如(来自 official site):

    import com.canoo.webtest.WebtestCase
    
    class SimpleTest extends WebtestCase {
      void testWebtestOnGoogle() {
        webtest("check that WebTest is Google's top 'WebTest' result") {
          invoke "http://www.google.com/ncr", description: "Go to Google (in English)"
          verifyTitle "Google"
          setInputField name: "q", value: "WebTest"
          clickButton "I'm Feeling Lucky"
          verifyTitle "Canoo WebTest"
        }
      }
    }
    

    【讨论】:

      猜你喜欢
      • 2016-02-16
      • 1970-01-01
      • 1970-01-01
      • 2012-03-03
      • 2012-09-30
      • 1970-01-01
      • 1970-01-01
      • 2011-08-09
      • 2015-11-07
      相关资源
      最近更新 更多