I am new to Karaf IT testing within the karaf container. I created a small practice project
Practice OSGI project. All the bundles are running fine as I am able to run them in karaf container(3.0.8) and able to make a rest hit to manually test it out. But Now I am trying to test it via integration tests. I wrote a testcase as well, but when I try to execute it, the maven says, no tests to build. Here my objective is to run a simple command like mvn clean install
or mvn clean test
so that it builds the complete project and in end test it using integration test(deploy karaf container, deploy bundles and execute the test cases, and bring the container down).
I hope I am able to explain my objective and question well.
Any help will be greatly appreciated.
Your test code is in the wrong directory. It is in src/test/main/java
while it should be in src/test/java
.
After this change the test runs but produces an exception. So there is more to fix but I guess this already helps you a bit.
Btw. I saw that your maven projects all have version 0.1 this is not a good idea in maven. You should always use a SNAPSHOT version. Release version should only be built and deployed once as they can not be overwritten in a remote maven repo.