Testing JSF application with JSFUnit
来源:互联网 发布:淘宝服务市场的代运营 编辑:程序博客网 时间:2024/04/27 08:27
People refer JSF as the implementation of this specification -
a server-side, user-interface, component framework for Java technology based applications.
some implementations:
Apache MyFaces
Sun's Mojarra JFS Reference Implementation
JSFUnit is step on Cactus, means when writing, also need to extend like ServletTestCase, JSFUnit is heavily lie on HtmlUnit, so it can integrate with HtmlUnit to test fron-end.
Basically first create JSFSession, then using it to get JSFServerSession and JSFClientSession. serverSession use to verify Bean Java logic and clientSession can verify html along with HtmlUnit.
public void testCommandButton() throws IOException, SAXException{
JSFSession jsfSession = new JSFSession("/album_details.jsp");
JSFServerSession serverSession = jsfSession.getJSFServerSession();
JSFClientSession clientSession = jsfSession.getJSFClientSession();
clientSession.click("PurchaseButton");
Object userBeanValue = serverSession.getManagedBeanValue("#{albumDetailsBean.status}");
Assert.assertEquals("Successfully purchased:", userBeanValue);
String spanContent = ((HtmlPage)clientSession.getContentPage()).getElementsByTagName("span").item(0).getTextContent();
Assert.assertEquals("Successfully purchased:", spanContent);
}
- Testing JSF application with JSFUnit
- JBOSS发布JSF测试工具-JSFUnit
- Web Application Penetration testing with Google Chrome Browser
- Android application testing with the Android test framework
- Heuristic Web Application Testing
- The JSF application lifecycle
- Unit testing with CPPUnit
- Testing with untrusted Https
- Testing with TestComplete ppt
- Unit Testing with wxPython
- Load Testing with Jmeter
- Testing with Xcode文档
- Unit testing with R
- Testing with NPM
- Managing Certificates for Application Testing
- Effective testing in console application
- Oracle RAT- Real Application Testing
- Web Application Testing Tools Collection
- 如果说不好就什么都不要说
- JAVA---JDK环境变量的配置
- sed命令华丽用法举例
- 调试技巧 —— 如何利用windbg + dump + map分析程序异常
- 三维建模控件 EWDraw 3D ActiveX
- Testing JSF application with JSFUnit
- Shell十三问___ChinaUnix精华帖整理
- js的对象和小效果案例
- IE和Firefox的Javascript兼容性总结
- 黑马程序员--IO流笔记(二)
- Factory Method Pattern(工厂方法模式)——莫勇鹏老师
- android 新增语言
- mysql 导入大量数据
- [编程珠玑读书笔记]最好的快速排序与库函数中的排序函数比较