简体   繁体   中英

OSGI Integration test in karaf container

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM