I am reading this tutorial on how to write integration tests using failsafe plugin
its good. but I need to write test setup hooks. in these hooks I will provision docker containers. I also need to write tear-down hooks where the containers will be shutdown.
I found this code where there is logic for create, start of container, and shutdown of container.
https://github.com/wouterd/hippo-docker/blob/master/myhippoproject/integrationtests/pom.xml
but I am not sure how will the test run and how will these goals defined in the XML get called in the right order for the integration test to run.
Basically, I need first the build-images to get called, then start-containers, then the test has to be run and finally stop-and-cleanup.
Can someone help me in connecting these dots. (these may be obvious).