How to test JBoss deployment automatically?
Asked Answered
I

3

6

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
Incandescent answered 30/10, 2009 at 14:0 Comment(0)
K
4

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.
Katherinkatherina answered 31/10, 2009 at 22:25 Comment(0)
M
3

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.

Measles answered 1/11, 2009 at 4:18 Comment(0)
D
1

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

Diva answered 31/10, 2009 at 13:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.