HtmlUnit was intended to be used for UI testing. For example, let’s say you host an eCommerce Java EE application. In order to perform some testing, you would want to simulate the entire life cycle of a user creating an account, verifying the account, logging in, filling up their shopping cart, and paying for the items.Normal Java testing methods use JUnit and only test the the back-end Java code that runs on the server. This is fine and dandy, but that is not how the user uses the website. You need to use a UI test in order to truly test. While testing the back-end is extremely valuable and should never be forgotten, you are potentially not testing several key things that can only be tested using the actual browser.For example, here are some issues that cannot be tested on the back end:
Subscribe to The Enterprise Open Source Blog via emailFollow @openlogicFollow @CloudSwingThis work is licensed under a Creative Commons Attribution 3.0 Unported License.
Allowed tags: <a> link, <b> bold, <i> italics
If you read a post on The Enterprise OSS Blog, please leave a comment. Let us know what you think, even if it's just a few words. Comments do not require approval, but they are moderated.OpenLogic reserves the right to remove any comments it deems inappropriate.