did someone ever tried to run PaxExam Junit tests with Bndtools and can give me some advices? I've tried it by myself, but without Maven it's a pain to download all the dependencies.
What I've done so far:
- Download PaxExam dependencies from Central Maven (are there any more easier ways?)
- Create property containing all dependencies in cnf/bnd.bnd
- Add property to buildpath where I want to write tests
- Executing tests fails, bc more dependencies are missing so back to 1. :D
I want to use PaxExam, bc its easier to use with Ant Junit task as the Integration Test of Bndtools since they only produce test reports but they are not really "Junit Tests".
Later scenario:
- Building projects with Hudson and Ant
- Hudson should also execute Junit Ant Task where failed tests should stop the building process as well
The above scenario already works with normal Junit4 tests without running an OSGi environment, but now I want to do integretion tests.
Can someone help me?
Greetings.
Even though you don't use Maven for building your project, you can still use it to download maven-artifacts and their transitive dependencies. To do this, you first have to install Maven. Then, you create an empty directory, and inside that directory, you create a file called
pom.xml
. For Pax Exam, this should look like this:I have taken the list of dependencies from the Pax Exam documentation. Then, you open the command-line, navigate to the directory in which you created your
pom.xml
, and execute the following command:(this assumes that you have installed Maven such that the command
mvn
is available form the command-line). Now maven will fetch all transitive dependencies of the dependencies you have specified in thepom.xml
, and store them intarget/dependency
by default.