简体   繁体   English

如何测试基于JSP的Web应用程序?

[英]How to test a jsp based web application?

What sort of a framework can be used to test a jsp web application? 什么样的框架可以用来测试jsp Web应用程序? All java classes and the servrlets needs to be tested too. 所有的Java类和servrlet也需要进行测试。 What would be the best approach and related frameworks that can be used in this regard? 在这方面可以使用的最佳方法和相关框架是什么?

Update 更新资料

Any other suggestions? 还有其他建议吗?

For the Java part I still recommend JUnit as Unit-Test-Framework. 对于Java部分,我仍然建议将JUnit作为单元测试框架。

For the test of the web part one can think about using a web test framework like Selenium. 对于Web部分的测试,可以考虑使用诸如Selenium之类的Web测试框架。 However, this part is more difficult to automate during (for example) a nightly build. 但是,此部分在(例如)每晚构建期间更难以自动化。

You can test your application front end with selinium webdriver automation testing. 您可以使用selinium webdriver自动化测试来测试您的应用程序前端。

you can test your java code with junit framework or testNg now a days becoming more popular in the market 您可以使用junit框架或testNg测试Java代码,如今在市场上越来越流行

JUnit was selected as the testing framework for java components. JUnit被选作Java组件的测试框架。 Still looking for a method to test application front end? 还在寻找测试应用程序前端的方法吗?

There is a tool called JspTester ( http://jsptester.com ) which integrates as a servlet to your webapp, and allows to inject values directly to beans, model objects, request parameters and session variables. 有一个名为JspTester( http://jsptester.com )的工具,该工具作为Servlet集成到您的Web应用程序,并允许将值直接注入到bean,模型对象,请求参数和会话变量中。 Useful when there is a need to test the JSPs in isolation from business logic or MVC controllers. 当需要与业务逻辑或MVC控制器隔离地测试JSP时很有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 JSP Servlet Web 应用程序 - JSP Servlet Web Application JSP Web应用程序中的国际化? - Internationalization in a JSP web application? 我们如何在不使用 spring 框架的情况下,仅使用 gradle 构建工具创建一个简单的基于 Web 的 JSP 应用程序? - How can we create a simple JSP web based application without the use of spring frame work , using gradle build tool only? 使用JSP Web应用程序还是applet的Web应用程序? - Web application using JSP web application or applet? 如何读取位于JSP Web应用程序中项目文件夹之一中的图像 - How to Read an Image located in one of the Project Folder in JSP Web Application 如何避免数据与jsp Web应用程序中的其他用户详细信息冲突? - How to avoid data clashing with Other User details in jsp web application? 如何在MVC Web应用程序(Servlet和Jsp)中处理异常? - How can I handle exception in a MVC web application (Servlet and Jsp)? 如何通过配置web.xml将URL模式从/index.jsp更改为/test/index.jsp? - How to change the URL pattern from /index.jsp to /test/index.jsp by configuring web.xml? 如何将嵌入式论坛添加到现有的JSP Web应用程序 - How add embedded forum to existing JSP web application 我如何在Web java应用程序(jsp)中加载Bootstrap的css和js? - How I load css and js of Bootstrap in a web java application (jsp)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM