jhtong
jhtong

Reputation: 1589

How to do tdd using junit in Apache Karaf or Fuse OSGi container

how can I use Junit to do unit testing in Apache Karaf / Fuse?

Red Hat has some documentation on doing so, using pax-exam, but these appear dated and the last version of org.apache.karaf.tooling.testing needed for tests appear to be updated in 2011.

Help?

Upvotes: 0

Views: 622

Answers (2)

Christian Schneider
Christian Schneider

Reputation: 19626

The apache karaf container for pax exam started in the karaf project. It has now moved to the pax exam project. Pax exam is still the best way to do tests for karaf deployments.

For examples you can look into the karaf integration tests as well as in the karaf tests of Apache CXF or Apache Camel.

Upvotes: 1

Alexandre Cartapanis
Alexandre Cartapanis

Reputation: 1523

Pax-exam is not outdated, and is still used for karaf and jboss fuse integration tests. You can look at pax-exam documentation, apache karaf integration tests source and apache karaf documentation.

Note that this is designed for integration testing more than for unit testing. Please look at What is the difference between integration and unit tests? for a better understanding of difference between unit and integration tests.

Upvotes: 2

Related Questions