0 Replies Latest reply on Nov 14, 2017 2:32 AM by Christian Wansart

    Does Arquillians JaCoCo Plugin support blackbox testing (@RunAsClient and ClientBuilder)?

    Christian Wansart Newbie



      I have a project that has the following structure:



        -> parent

        -> build-tools

        -> service1

        -> service2

        -> service3 ...


      The parent holds information for versions, plugins, etc. Now I have integration tests inside the services that fail when I run them together with @RunAsClient. I created a minimal rest endpoint and a test to check that:

      public class CcTestResource {
        public Response getVersion() {
          return Response.ok("Hello World").build();


      The integration test looks like this:

      public class CcTestResourceIT {
        public static Archive<?> createDeployment() {
          PomEquippedResolveStage pomFile = Maven.resolver().loadPomFromFile("pom.xml");
          WebArchive archive = ShrinkWrap.create(WebArchive.class)
              .addClasses(JaxRsActivator.class, CcTestResource.class)
              .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
          return archive;
        private URL baseURI;
        public void getArticlesByEan() throws Exception {
          Response response = ClientBuilder.newClient()
        private URI getCcTestResourceURI() throws URISyntaxException {
          return UriBuilder.fromUri(baseURI.toURI()).path("api").path("cc").build();


      The problem is: tests that use the ClientBuilder and @RunAsClient result in 0% coverage. When I remove @RunAsClient it works.


      Is there a way to keep @RunAsClient and use the ClientBuilder?


      Thanks in advance.