Hello Camel community,
I’ve got some questions regarding test execution and automation. I am using Red Hat Fuse 7.7 (i.e. Camel 2.21.0 and Karaf 4.2.6 as OSGi base).
I’m interested in automated testing and therefore implemented some Unit-Tests based on CamelBlueprintTestSupport. But unfortunately, when having a bunch of tests (approx. 20), the performance of the test execution is very slow. Does anybody else have performance problems, too? Is it because of the complex process of loading PojoSR in the background?
I’ve also tried to set up integration tests with Pax-Exam. But as my projects are quite complex in general, it takes much time installing all needed features and dependent components. Is it only me who struggles with the framework? The performance is bad again and it seems to be nearly impossible to create a test set-up which allows using dependencies like camel-sql or Drools (kie) as they depend again on other artifacts like spring, etc.
What experience do you have with testing? What tools do you use to check if your integration generates the correct output for a given input?
I’ll be looking forward hearing your experience and getting in discussion. Regards
What you describe, has led to the testing pyramid.
Write loads of very fast unit-tests to test every special case you can think of - on method or class level.
But on integration test level every test takes some time to execute. Therefore you should narrow them down to the essential test cases that cannot be tested in lower test levels.
You call Camel Route tests "unit-tests", but since they need the whole application context or at least more than just a class, I would count them to a higher level in the pyramid (service-, component-tests, there are many names around). Therefore I already try to reduce them to the required minimum.
My strategies to keep Camel testing effort low are quite common: