如何自动测试JBoss部署?

发布于 2024-08-09 22:28:50 字数 322 浏览 4 评论 0原文

我有jboss应用程序。并希望自动测试部署。并希望将此任务添加为 Hudson 中的项目

我的愿景基于以下阶段:

  1. 将我的申请提交到JBoss(复制耳朵、配置、库等)
  2. 运行 JBoss

    我有一台 Linux 机器,现在我们的项目需要 JBoss 4.3.2。 我如何运行 JBoss 并分析结果。我的应用程序是否已完全成功部署?

  3. 运行一些独立测试

  4. 停止 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:

  1. Put my application to JBoss(copy ears, configs, libs e.t.c)
  2. 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?

  3. Run some standalone tests

  4. Stop JBoss

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

梅倚清风 2024-08-16 22:28:50

使用 Cargo 进行自动“(下载服务器)、启动服务器、部署应用程序、运行测试、取消部署、停止服务器”循环。 Maven Cargo 插件在使用 Surefire 执行集成测试方面做得很好。支持大多数应用程序服务器,包括 JBoss 4。

Cargo 提供以下工具和 API

  • :启动/停止/配置 Java 容器并将模块部署到其中。
  • Java API 。
  • 用于解析/创建/合并 Java EE 模块Ant 任务、Maven 1、Maven 2 插件的

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:

  • A Java API to start/stop/configure Java Containers and deploy modules into them.
  • A Java API to parse/create/merge Java EE Modules
  • Ant tasks, Maven 1, Maven 2 plugins.
℡Ms空城旧梦 2024-08-16 22:28:50

取决于“自动测试部署”是什么意思。
如果您只需要测试部署是否成功,

  • 可以查询JMX,
  • 或者使用JBoss Fresh(现在是alpha)。

如果您想做一些 CI 测试,

  • 那么 Cargo 是一个很好的工具,并且可以与最新的 JBoss AS 和 EAP 配合使用。
  • 如果您使用 JSF,另请参阅 JSFUnit。

要将它们粘合在一起,请使用 Maven(我的选择)、Ant 或 Groovy。

Depends on what do you mean by "test deployment automatically".
If you only need to test whether the deployment succeeded,

  • you can query JMX,
  • or use JBoss Fresh (alpha now).

If you want to do some CI tests,

  • then Cargo is a good tool, and works with both latest JBoss AS and EAP.
  • Also see JSFUnit if you use JSF.

To glue it all together, use Maven (my choice), Ant, or Groovy.

肤浅与狂妄 2024-08-16 22:28:50

除了编写脚本来运行各个步骤之外,我还没有找到使用 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文