JAVA Test Tools (JUnit, Httpunit, Jwebunit, Strutstestcase)

xiaoxiao2021-03-06  133

Junit.

JUnit is the nasal ancestors of the unit test. Other tools are often created on a JUnit, because Junit provides two functions that must be used in unit testing and functional testing: assertion checks and results reports. JUnit can be found at www.junit.org.

HttpUnit

HTTPUNIT is a test framework built on JUnit, which supports black box testing and in-container testing for web applications. It is a functional test tool that you can use it to verify that the software meets business needs and meets the expected behavior at the visual level. Interestingly, httpunit's basic code actually doesn't matter with test. The purpose of the HTTPUNIT library is to enhance HTTP's access to web applications. It supports features, request submission, response analysis (HTML parsing), and some of the web spider toolkit needed. Features. HttpUnit also has a class servletUnit that supports the container. Based on the assertion function and result reporting feature provided by Junit, HttpUnit has become a very useful tool for testing web applications. HttpUnit can be found at www.httpunit.org.

Jwebunit

JWebunit is an auxiliary kit created on HTTPUnit, which reduces the code you write by the test web program. Simply put, you can use it as a macro sequence of httpunit, provide a shortcut to the HTTPUnit code segment, simplify most of the Web program test. HttpUnit offers a relatively underlying interface to let you customize many things yourself. You may think that jwebunit is useful, or it may not, if you can solve all your questions in httpunit, jwebunit can also. It may bring more code, but you have better control. You can find jwebunit at http://jwebunit.sourceforge.net/.

Strutstestcase

StrutstestCase is a test framework created on the JUnit application for testing the Struts application. Struts is a model that uses Java development web applications - Trial-Controller (MVC) platform, which simplifies data, representation, and logical separation of easy maintenance component code development. Struts makes the function testing and unit test of the web program container (in-container) because they clip between the servlet container and your programs. This means that this test framework is to know Struts, which can process Struts's container tests. Since there is no need to know the internal implementation of the web program, the black box test of HttpUnit is still working very well. However, you can't use HTTPUnit to test the Struts application to the container test because HttpUnit is independently located between your programs and servlet containers. Strutstestcase is designed for containers designed for Struts programs. StrutstestCase can be obtained at http://strutstestcase.sourceforge.net/.

转载请注明原文地址:https://www.9cbs.com/read-98938.html

New Post(0)