Java testing tools (JUnit, httpunit, jwebunit, strutstestcase)

Source: Internet
Author: User

JUnit.

JUnit is the originator of unit testing. Other tools are often created on the basis of JUnit, because JUnit provides two features required for both unit test and functional test: assertion check and result report. You can find JUnit at www.junit.org.

Httpunit

Httpunit is a testing framework built on JUnit. It supports black box testing and In-container testing for Web applications. It is a functional testing tool that you can use to verify that the software meets your business needs and meets the expected behavior at a visual level. Interestingly, the basics of httpunitCodeIt actually has nothing to do with testing. The httpunit library aims to enhance HTTP access to web applications. It supports status management (cookies), request submission, Response Parsing (HTML parsing ), and some features required by the web spider toolkit. Httpunit also has a class servletunit that supports intra-container testing. Httpunit is a useful tool for testing Web applications based on the assertion and result reporting functions provided by JUnit. Httpunit can be found at www.httpunit.org.

Jwebunit

Jwebunit is an auxiliary toolkit created on httpunit, which reduces the number of testing WebProgramThe code you need to write. To put it simply, you can use it as the macro library of httpunit and provide shortcuts to the httpunit code segment to simplify most of the behaviors in web program testing. Httpunit provides relatively underlying interfaces for you to customize many things. You may think that jwebunit is useful or not. If you use httpunit, you can solve all your problems, as can jwebunit. It may bring more code, but you have better control. You can find jwebunitat http://jwebunit.sourceforge.net.

Strutstestcase

Strutstestcase is a test framework created on JUnit for testing struts applications. Struts is a model that programmers who use Java to develop Web applications like very much. It tries to use the controller (MVC) platform to simplify the easy-to-maintain component code development of data, representation, and logical separation. Struts makes functional testing and unit testing between web application containers complicated because they are sandwiched between servlet containers and your programs. This means that this testing framework should understand struts and be able to process inter-container tests of struts. Because you do not need to know the internal implementation of the web program, the black box test of httpunit still works well. However, you cannot use httpunit for inter-container testing of struts applications, because httpunit must be independent between your program and servlet containers. Strutstestcase is designed for inter-container testing of struts programs. Strutstestcase can be found at http://strutstestcase.sourceforge.net.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.