Do not know if you are tested on the experience of Web pages? Or are on the web page you want to test? Why no one reply to the article below it? Because fewer people use JSF, or because I am more advanced not a fewindividuals automatically think of the JSF page test? Oh
All along, we use the java language development program is mainly web applications rather than desktop applications, of course, is fully used to develop java desktop applications, there is now a more mature unit testing tool for java Junit, but JunitIn the process of web application development is difficult to put to great use, such as how to program automatic test JSP page?
We are in Taiyuan, the widespread adoption of railway projects in the JSF framework for the front page of the presentation and server-side business logic processing, received a relatively good results, improve efficiency, but we are often in the program development process had repeated some solutionserrors, in order to resolve these errors and need to find a wrong place, or because changes in a small place which led to problems in other places but we know nothing.
Finally, we can only repeat the test over and over again to click the page to re-establish confidence in the program, but people are tired of psychological, for the low-level repeated over and over again will soon be tired of working, especially programmers wrote their owncode is tired of testing, it is difficult to ensure program quality.
So we thought that the introduction of unit testing, let the computer do repetitive things, but unit testing of JSF pages is difficult, because the JSF program is running in the container environment, and the corresponding HTTP requests and are closely related, ifWe want to test ManagedBean need to construct context, the context browser and the original is a container like JBoss constructed, let us write code to construct their own context is also very difficult reality, JSF pages automaticallyTesting is difficult to imagine, but with the participation of all JSFUnit will become very simple, JSFUnit is what I would like to introduce the following testing tools for JSF.
JSFUnit jboss open source is an open source project, JSFUnit beta 1 version released in November 2007, the current domestic use JSFUnit is still relatively small, I believe the future will certainly be widely used.JSFUnit is designed by using a simple API to complete the JSF program integration testing and unit testing tools.It is entirely possible to access managed beans, FacesContext, EL Expressions, and the internal JSF component tree, while each client can access the HTML after the corresponding request.
JSFUnit course there are other features, such as static analysis and testing to test JSF JSF configuration file faces-config.xml, as soon as possible to help you find configuration problems.JSFTimer to the JSF life cycle of each phase of performance testing.Since then, the test JSF to easily become a reality from the unimaginable.Currently only the official website of JSFUnit to use it for a more detailed description, who are interested can visit the www.jsfunit.org or http://www.jboss.com/jsfunit/ to search.I will show you what I am using JSFUnit some of the experience, people who want to use it to avoid detours.