在服务器上运行单元测试 (JAX-RS)
我正在编写一个 JAX-RS (Jersey+Maven) 应用程序,它执行一些棘手的操作(例如调用 WAR 中嵌入的本机可执行文件)。我需要在服务器(运行 Tomcat 7.0.22 的 Amazon Elastic Beanstalk)上运行[一些]单元测试 (JUnit4),以检查一切是否正常。
除了 RYO(自己动手)之外,是否有标准、灵活的方法可以做到这一点?我发现的事情似乎与开发人员机器上的集成测试(即 Jersey Test Framework)有更多关系。甚至 RYO 都让我感到困惑......我如何从源包调用测试包中的代码?
基本上,我想创建一个可以调用的 /test 资源,它将以漂亮的格式从服务器返回我的单元测试结果。如果我可以做 /test/{category} 就更好了
I am writing a JAX-RS (Jersey+Maven) application that does some tricky things (eg call native executables embedded in the WAR). I need to run [some of] my unit tests (JUnit4) on the server (Amazon Elastic Beanstalk running Tomcat 7.0.22) to check that everything is ok.
Is there a standard, flexible way of doing this other than RYO (roll your own)? The things I found seem to have more to do with integration testing on the developer machine (ie, Jersey Test Framework). Even RYO is confusing me... how could I call code in the Test Packages from Source Packages?
Basically, I want to create a /test resource that I can call that will return my unit test results from the server in a pretty format. Even better if I could do /test/{category}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
