[jboss-as7-dev] Subsystem testing harness

David Bosschaert david at redhat.com
Tue Jul 19 04:31:34 EDT 2011


Awesome! I'm going to have a play with that today. Was looking for 
something like this for a while.

Cheers,

David

On 18/07/2011 18:05, Kabir Khan wrote:
> There is now a testing harness for testing subsystem parsing, that the operations work, that the model gets updated and services get installed in the service container as expected.
>
> If your subsystem is not totally self contained, the harness provided makes it easy to
> * Install services your subsystem depends on manually
> * Add socket bindings, paths and system properties used by your subsystem
> * Add parsers and other subsystem extensions required by your subsystem
>
> It lives in https://github.com/jbossas/jboss-as/tree/master/subsystem-test and contains some examples/tests of the harness itself in https://github.com/jbossas/jboss-as/tree/master/subsystem-test/src/test.
>
> To see it used in the wild, take a look at https://github.com/jbossas/jboss-as/blob/master/jmx/src/test/java/org/jboss/as/jmx/JMXSubsystemTestCase.java. As you can see here it
> * checks that the model exists:
> https://github.com/jbossas/jboss-as/blob/master/jmx/src/test/java/org/jboss/as/jmx/JMXSubsystemTestCase.java#L180
> * actually bootstraps the controller and uses the services installed by the JMX service (the jmx connector in this case):
> https://github.com/jbossas/jboss-as/blob/master/jmx/src/test/java/org/jboss/as/jmx/JMXSubsystemTestCase.java#L186
>
> The JMX subsystem is trivial, but when writing this test I found a few minor bugs. So if you are a subsystem maintainer, I'd highly recommend using this to test your subsystem properly in isolation.
>
> This is based on the stuff that was in the subsystem maven artifact, which now in turn will be based on jboss-as-subsystem-test instead. So, if you find some problems with it try to add to the API rather than changing it, or check with me.
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev



More information about the jboss-as7-dev mailing list