如何自动测试JBoss部署?
我有jboss应用程序。并希望自动测试部署。并希望将此任务添加为 Hudson 中的项目
我的愿景基于以下阶段:
- 将我的申请提交到JBoss(复制耳朵、配置、库等)
运行 JBoss
我有一台 Linux 机器,现在我们的项目需要 JBoss 4.3.2。 我如何运行 JBoss 并分析结果。我的应用程序是否已完全成功部署?
运行一些独立测试
- 停止 JBoss
I have jboss application. And want to test deployment automatically. And want to add this task as a project in Hudson
My vision is based on the following stages:
- Put my application to JBoss(copy ears, configs, libs e.t.c)
Run JBoss
I have a Linux-machine and now our project is require JBoss 4.3.2.
How can I run the JBoss and analyze results. Is my application deployed fully and successfully or not?Run some standalone tests
- Stop JBoss
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用 Cargo 进行自动“(下载服务器)、启动服务器、部署应用程序、运行测试、取消部署、停止服务器”循环。 Maven Cargo 插件在使用 Surefire 执行集成测试方面做得很好。支持大多数应用程序服务器,包括 JBoss 4。
Cargo 提供以下工具和 API
Use Cargo for an automatic "(download server), start server, deploy application, run tests, undeploy, stop server" cycle. The Maven Cargo plugin does a good job with executing integration tests using Surefire. has support for most app servers, including JBoss 4.
Cargo provides the following Tools and APIs:
取决于“自动测试部署”是什么意思。
如果您只需要测试部署是否成功,
如果您想做一些 CI 测试,
要将它们粘合在一起,请使用 Maven(我的选择)、Ant 或 Groovy。
Depends on what do you mean by "test deployment automatically".
If you only need to test whether the deployment succeeded,
If you want to do some CI tests,
To glue it all together, use Maven (my choice), Ant, or Groovy.
除了编写脚本来运行各个步骤之外,我还没有找到使用 JBoss 4.x 执行此操作的好方法。启动服务器后,等待足够长的时间,让 JBoss 服务启动并部署应用程序,然后测试应用程序的基本组件是否已在 JNDI 中注册。
我发现一些链接可能有助于使用 JBoss 5 执行此操作:
我本来建议您可以将脚本编写为 Hudson 插件,但也许您可以使用它:Hudson 的 JBoss JPBM 插件
I haven't found a good way to do this with JBoss 4.x other than writing a script to run the various steps. After starting the server, wait for long enough for the JBoss services to start and deploy the application, then test that the essential components of your application are registered in JNDI.
I found some links that might help to do this with JBoss 5:
I was going to suggest that you could write your script as a Hudson plugin, but perhaps you could use this instead: JBoss JPBM Plugin for Hudson