将 struts2-junit-plugin jar 与 Struts1.x 应用程序一起使用

Using struts2-junit-plugin jars with Struts1.x application

我正在开发 struts 1.x 应用程序,需要在其中实施 junit 4 测试用例。 我有 struts2-junit-plugin jar 用于使用 StutsTestCase 为 Action 类 创建测试用例。这可能吗 ? Struts 1.x 使用 struts2-junit jar 的应用程序。当我尝试 运行 测试用例时,出现错误 - InitializationError 当我检查失败跟踪时 - 它显示 java.lang.noclassdeffounderror org/springframework/core/io/resourceloader

谁能帮我解决问题。是 junit jar 版本还是在 struts 1 应用程序中使用 struts2 jar。或者我需要添加更多内容或任何其他错误。请帮助

提前致谢

没有

这毫无意义--Struts 2 是一个完全 不同的框架。在功能、支持库、体系结构等方面零重叠

可能 能够重新设计 Struts 1 StrutsTestCase 以支持任何明确的 JUnit 4 功能,如果它不超出-开箱即用,或者简单地构建支持对象(例如 ActionFormActionMapping 和正常的 HTTP 内容)和 运行 "bare" 测试。

Struts 1 在五年前就已停产是有原因的:该体系结构过时并且与自身和 HTTP 紧密耦合,这使得测试变得困难。如果您四处搜索,您可能会找到一些用于更新测试基础架构的资源。