Pax Exam 2 Milestone 1

Folks,

Today the Pax Exam 2 fork has seen its first release as Milestone 1.

Milestone 1: Call to Arms

This is not a production ready release that comes with all sorts of documentation and support.
Instead, its a "call to arms" regarding this branch that has been living for too much time.

Nevertheless this M1 release is available as "2.0.0-M1" on Maven Central.

Instead of reporting all kinds of (possible) regressions when compare it to the 1.x line i would like to focus on some specific key areas.

Native TestContainer for Felix and Equinox

One very early "feature" was the Pax Runner-less support for so called native containers using the OSGi Core 4.2 Launcher API.
This means that you lose

  • many Pax Runner configurations
  • the ability to run the tests against different frameworks and versions without much effort

However you gain:

  • speed
  • much easier debugging
  • less "stuff" running between you and your test. If you are testing very close to a specific framework this is very handy.

See the regression projects for Felix and Equinox.

Plumbing API

Have a look at BareAPITest.java and ReactorAPITest.java for an example.

As you see, this is not using the @RunWith annotation in your Test Class. Instead, it uses a default Junit4 Runner (you could also use TestNG here, or a Main Class.. if wanted) and assembles "external" Test Classes.

This is the bare bones of the higher level Junit4 Layer that also exists of cause (Example of the Junit4 Driver API).

Anyhow, the Junit4 Driver (implemented here is very minimal and does not (on purpose) implement things like:

  • propper @Before and @BeforeClass handling
  • Configuration consolidation

yet.

Review the Reactor principle

Reading this example should give you an idea what the reactor principle is about.

Have a look at the two test methods:
In one you control the TestContainer lifecycle yourself, in the other you use a mediator called "Reactor".
Currently you can chose between two radically different reactors, both can be found here:

AllConfinedStagedReactor
Launch a new TestContainer per Configuration and Test Method. This is the Pax Exam 1.x way of doing it.

EagerSingleStagedReactor
Launch a TestContainer per Configuration. This will be re-used across multiple Test Methods.

Milestone 2

Right now i would foucs on the following items for the next Milestone:

  • Get some more people and opinions into it
  • Port more Options from Pax Runner Container to Native Container (currently the latter is very limited)
  • Fix Pax Runner TestContainer regression (see regression-paxrunner module)
  • Start documenting the stable parts. E.g. Screencast?

This is of cause subject of discussion. Help and Comments are welcome!

So far, happy hacking.

Toni