Jboss JSFUnit是一个专门用于JSF应用程序的综合测试框架。它设计成能够在JSF层对JSF应用程序进行调试和综合集成测试。JSFUnit测试运行在容器之中,能够让开发人员完全控制managed beans,FacesContext和内部JSF组件Tree。同时,还可以控制每个客户端请求的HTML输出。
官方网站:http://labs.jboss.com/jsfunit/
下载地址:http://labs.jboss.com/jsfunit/gettingstarted.html
JSFUnit is an integration test framework for JSF applications. It is designed to allow complete integration testing and debugging of JSF applications at the JSF level. JSFUnit tests run inside the container, which provides the developer full access to managed beans, the FacesContext, and the internal JSF component tree. At the same time, you also have access to the HTML output of each client request.
With each faces request, you get access to the full internal state of your application through the FacesContext. With the FacesContext in hand, you have the "keys to the kingdom". You can do any kind of test you might dream up. You can also make additional HTTP requests to simulate a user session. And, since your application is fully deployed, you can assert state at any level of abstraction all the way from the client HTML down to your database.
The typical usage pattern of JSFUnit is to programatically submit an http request and examine both the raw HTML output and the JSF internals. JSFUnit makes this very easy to do. |