Arquillian Launch Modes

I'm trying to wrap my head around Arkillian and just don't fundamentally understand the difference between in-containermode vs. as-client.

I understand that with Arquillian / ShrinkWrap:

  • You create an archive that contains only those components that you want to integrate and test with
  • You transfer this archive into memory in the actual container (deploying it).
  • You run the archive as a test inside the container
  • You make a statement about what will happen as a result of this test.

So, from my point of view, everything just “feels”, as if it always will be in-container, since tests are always performed inside the container.

Please help me understand the differences between the two modes and what types of integration tests are suitable for both modes. Bonus points for providing a specific code example (not the blurry lines from the Guide! Link), which explain why / how you run tests in both modes. Thanks in advance!

+5
source share
1 answer
  • in container: use for white box, integration testing
  • as-client: use for black box, functional testing

.. UI/ ( "" "" ) as-client @RunAsClient. ( , " " ), in-container.

ShrinkWrap Arquillian (JAR/WAR/EAR) ( JBoss-homegrown streaming protocol), , , .

+1

All Articles