6 Replies Latest reply: Jul 4, 2012 2:12 PM by Bartosz Majsak RSS

In-Container vs. As-Client: Differences and Applications

Zac Harvey Newbie

I'm trying to wrap my head around Arquilian and am just not fundamentally understanding the difference between in-container mode vs. as-client mode. My understanding is that, with Arquilian/ShrinkWrap:

 

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

 

So, from my perspective, everything just "feels" like it would always be in-container, since the tests are always executing inside a container.

 

Please help me understand the differences between these two modes and what types of integration tests both modes are suited for. A concrete code example that explains why/how you run the tests in both modes would be enormously appreciated!  Thanks in advance!