Hi,
Le 06/12/2018 à 18:50, Max Spring a écrit :
For testing purpose I like to trigger Karaf console commands in a test
container brought up through Pax Exam in Junit, so that the command's
output could be grabbed for validation.
Would someone know a good example to start with?
I already have a rich set of test cases using Pax Exam, but not for
running Karaf commands.
I had written such tests on a former project.
And if I remember correctly, I had found an example in Karaf's source code.
You can take a look at this class [0].
The execution of the Karaf command starts at line 230.
I hope it helps.
Regards,
Vincent.
[ 0 ] :
https://github.com/roboconf/roboconf-platform/blob/master/miscellaneous/roboconf-integration-tests-dm/src/test/java/net/roboconf/integration/tests/dm/DelayedInstallationOfTargetHandlerTest.java