GwtTestCase 和 Spring
所以我设法创建了一个 GWT-SpringMVC 设置。这并不容易(没有太多资源),但有可能。我什至自动连线之类的。它甚至可以工作:)
但是,我不知道如何使 GwtTestCase 运行。显然它需要“服务器”启动,并且因为我使用Spring,所以它需要通过调度servlet(不是?)。但我不知道如何将两者联系起来。在生产或托管模式下,我使用 web.xml 和 spring-servlet.xml 来配置这些内容。我可以为测试做什么?
我想过忽略 Web 部分并直接测试服务 - 但这将使我无法选择自动测试所有内容是否“可转移”。 (如果您知道如何做到这一点,我可能会完全放弃 GWTTestCase)。
So I managed to create a GWT-SpringMVC setup. Wasn't easy (not too many resources), but possible. I even autowired and stuff. It even works :)
However, I can't figure out how to make the GwtTestCase run. Obviously it needs the "server" to be up, and because I use Spring, it needs to pass through the dispatching servlet (no?). But I can't figure out how to connect the two. In production or hosted mode, I got the web.xml and the spring-servlet.xml to configure these things. What can I do for tests?
I thought of ignoring the web part and testing the service directly - but this will deny me the option to automatically tests that everything is "transferable".
(if you have an idea on how to do that, I might ditch the GWTTestCase altogether).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
GWTTestCase 的替代方案可以是 gwt-test-utils 框架,它提供与 Spring 的简单集成(有关详细信息,请参阅此处)
An alternative to GWTTestCase could be the gwt-test-utils framework, which provides a simple integration with Spring (see here for details)