Search code examples
seleniumfunctional-testinghttp-unit

Selenium and HTTPUnit


What's the pro's and cons for both and why should I use either of them for functional testing?

Regards, Jonas


Solution

  • Selenium is for integration testing, It will test how your web application behaves in an actual browser. This can find things that HTTPUnit cannot, e.g. browser compatibility of css and JavaScript.

    HTTPUnit tests web applications by directly calling the web service and manipulating the response. This is a functional test framework as it tests what your web app does, not how it behaves across different platforms.

    One advantage of HTTPUnit is that it is much quicker than Selenium. Personally I would (and do) use both. HTTPUnit for complete functional testing and Selenium for selective (not complete) integration testing to check browser compatibility.