Arquillian Cube and Programmatic Configuration

Hey guys

So I’m thinking of using Arquillian Cube to spin up docker containers, for running integration tests. Specifically I want to spin up Keycloak. I was wondering, how can I leverage programmatic configuration (instead of field injection) to look up configuration values for the docker host/port exposed for that container?

We make use of DeltaSpike Config in our configuration, so creating a ConfigSource that contains these values makes the integration pretty seamless.

Hello I think that what you are looking for is Notice that this approach also works with @Rule so you can use any other runner.

Notice that since Rule is set as static field you can use it to configure DeltaSpike without any problem.


That’s definitely a cool feature, however I need to execute this outside the test. I’m using Arquillian Suite Extension to deploy once and need to determine the remote server at deployment time.

But then maybe you should relay on build tool? Since now the rule just start and stops after each test class or test method.

What you want is total control over docker images, when they are started and stopped right? Can you pseudo code what is your approach you’ll like to do so we can figure out if it is possible or what changes we can do in cube?