Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jakartaee-platform-dev] : Re: Review of Platform TCK removal of duplicate Jakarta JSON Binding tests

It might help to detail how the Batch Standalone TCK solves the problem of allowing a set of JUnit 5 tests to be executed via Arquillian. 

(This work was mostly done by Ondro and I know he was thinking it could hopefully be generalized soon to other specs.)


We first extend JUnit 5 to use Arquillian with: META-INF/services/org.junit.jupiter.api.extension.Extension

in our extension module:

(Let me stop and say this assumes your target runtime already has an Arquillian adapter which, e.g. Open Liberty does).


We then extend Arquillian to build a ShrinkWrap app using its Maven dependencies


We have another layer which allows for iterating through the “vehicles” (that term purposely copied forward from the Platform TCK) of Servlet or EJB, which translate to executing the tests in-container.

In the “Servlet” vehicle test the Batch test is invoked from an Arquillian test servlet;  in the “EJB” vehicle test the test servlet calls a local EJB then the Batch test.

You may or may not have a similar requirement with JSONB (I didn’t check).  If you can do all the tests out of a servlet that would certainly simplify things.


The iteration through the “vehicles” setting up test context is done partly via JUnit 5 “InvocationInterceptors” in :


Though we have doc in our TCK reference guide it ends up surfacing the details through the specifics of the Batch TCK.  We don’t document the extension layer in any generic way.

But hopefully this helps as a pointer and maybe further discussion point.

Scott Kurz





From: jakartaee-platform-dev <jakartaee-platform-dev-bounces@xxxxxxxxxxx> On Behalf Of Romain Manni-Bucau
Sent: Tuesday, March 1, 2022 1:01 PM
To: arjan tijms <arjan.tijms@xxxxxxxxx>
Cc: jakartaee-platform developer discussions <jakartaee-platform-dev@xxxxxxxxxxx>
Subject: Re: [jakartaee-platform-dev] [External] : Re: Review of Platform TCK removal of duplicate Jakarta JSON Binding tests




Test kit is a junit5 which means it is "standalone" by default but also means you can integrate tests with arquillian if you need registering ArquillianExtension as implicit - or what I was thinking to, a container specific extension to run embedded or remotely. I don't think it needs to be referenced in the guide since it is part of the vendor dependent setup and there is no particular TCK SPI needed but if it helps it can probably.

Romain Manni-Bucau
@rmannibucau |  Blog | Old BlogGithub | LinkedIn | Book



Le mar. 1 mars 2022 à 18:58, arjan tijms <arjan.tijms@xxxxxxxxx> a écrit :



On Tue, Mar 1, 2022 at 4:48 PM Romain Manni-Bucau <rmannibucau@xxxxxxxxx> wrote:



just to clarify that standalone tests can be ran against any server thanks the runner and without any change so I think we cover all the mentionned case already and implementations have no blocker at all as already proven by MP and EE server


Sounds good, how does that work? The user guide only seems to refer to putting a .jar on your classpath and running against that. I didn't see it mention a server, but maybe I missed it. Do you have an example of running it against an MP or EE server?




Kind regards,




Back to the top