htmlunit vs. jwebunit with htmlunit plugin

827 Views Asked by At

I did some research on ui testing tools such as htmlunit, httpunit, jwebunit, selenium etc.

I'm not very familiar to testing tools. Htmlunit sounds a good option in terms of javascript support. Then, I found jwebunit, it provides APIs and it is possible to write concise code using jwebunit compared to htmlunit.

The one thing I'm not very sure: When we use jwebunit with htmlunit plugin, do we have all features of htmlunit, or does jwebunit limits usage of some features provided by htmlunit?

1

There are 1 best solutions below

0
On

For UI testing there is another interesting choice: use Cannoo Webtest(based on HtmlUnit) + Groovy language. You can write your tests using simple DSL, for example(from 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"
    }
  }
}