Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jakartabatch-dev] Batch TCK discussion continued - Junit 5, Arquillian, etc.

Hi,

Yes Scott, I will rebase my PR onto master. I just waited until people here are interested in such a solution.

To clarify my proposal again and the options we have with TestNG / JUnit 5 / Arquillian

  • We could continue with Test NG and just add Arquillian, but it's a cumbersome and JUnit 5 offers more flexibility and a modern toolkit
  • We could migrate to JUnit 5 and then just add Arquillian as Arjan suggested, but that would require some standard packaging of the test application like WAR. However, JBatch doesn't require implementations to support WAR so it adds extra burden for them to add an Arquillian extension to repackage the test application. We could also create plain JAR packages but then implementations that require WAR would need to repackage the app
  • The solution I propose in [1] allows running the tests with JUnit 5 on the current classpath without Arquillian. To run the the tests inside a container like Jakarta EE server, it provides a stockplugin for Arquillian to package all the classes and resources on the classpath into a WAR. Implementors can add the JUnit 5 Arquillian extension and use our plugin for Arquillian to package the test apps as WARs. But, in theory, they can also use any other mechanism to package the apps and run the test with it, so it's probably even possible to reuse the existing Jakarta EE TCK porting package to deploy the tests on an application server.
Of course, it would be nice to have a standard way to package a test application but even Arquillian doesn't abstract well enough here. It uses Shrinkwrap to create a specific type of archive (WAR or JAR), which might not be suitable for some runtimes.

For Batch we don't even need to have any packaging because it's OK to have everything on the classpath for all tests. It's OK to run the tests with plain JUnit 5 and it's also OK to assemble all classes and resources in a single test app (e.g. WAR) used by all the tests. I demonstrated how to automate the latter for Arquillian with a simple plugin for Arquillian.

I can see that for other specs, it's needed to package only a subset of the classpath for tests. Then it would be nice to have some standard and abstract way to set up the contents of the package, e.g. by some annotations or a simple API. Arquillian or any other test framework could then adopt such an API and use it to package the test application as needed (e.g. as WAR).

But first, I'll follow up with rebasing my PR against the master branch so that we can discuss about it in the PR. When we have a good solution for Batch, we can raise a proposal on the TCK project level and propose it as a standard approach that can be easily adopted by other standalone TCKs.

Ondro



st 2. 6. 2021 o 14:47 Scott Kurz <skurz@xxxxxxxxxx> napísal(a):

So steering back to the Batch TCK, it seems we should move forward with Ondro's:  https://github.com/OndroMih/batch-tck/pull/3 as a next step, converting to JUnit 5.
From there a further step would be to add Arq adapter runners, etc.

Ondro graciously offered to merge on the latest master.   (I know we've reformatted since but without formalizing via checkstyle.)    

(Also I see we don't have a SNAPSHOT version set.. feel free anyone to improve project shortcomings like these).

But if we're good with this as a high level plan, Ondro, can you please do that when you get a chance and reply here with the updated PR for anyone who wants to do a code review?


Thanks,
------------------------------------------------------
Scott Kurz
WebSphere / Open Liberty Batch and Developer Experience
skurz@xxxxxxxxxx
--------------------------------------------------------


Inactive hide details for arjan tijms ---05/29/2021 07:23:18 AM---Hi, On Fri, May 28, 2021 at 11:08 PM Romain Manni-Bucau <rmanarjan tijms ---05/29/2021 07:23:18 AM---Hi, On Fri, May 28, 2021 at 11:08 PM Romain Manni-Bucau <rmannibucau@xxxxxxxxx>

From: arjan tijms <arjan.tijms@xxxxxxxxx>
To: jakartabatch developer discussions <jakartabatch-dev@xxxxxxxxxxx>
Date: 05/29/2021 07:23 AM
Subject: [EXTERNAL] Re: [jakartabatch-dev] Batch TCK discussion continued - Junit 5, Arquillian, etc.
Sent by: "jakartabatch-dev" <jakartabatch-dev-bounces@xxxxxxxxxxx>





Hi, On Fri, May 28, 2021 at 11:08 PM Romain Manni-Bucau <rmannibucau@xxxxxxxxx> wrote: This is what arquillian is and it is adopted. Another api wouldnt get as much traction - tomcat wouldnt be under radar for ex - until it is done by
Hi,

On Fri, May 28, 2021 at 11:08 PM Romain Manni-Bucau <rmannibucau@xxxxxxxxx> wrote:
    This is what arquillian is and it is adopted. Another api wouldnt get as much traction - tomcat wouldnt be under radar for ex - until it is done by the api creator.
    So personally i wouldnt invest in it or ewpect vendors to follow and redo arquillian already work so we would end up with another arquillian bridge i think.
    Arquillian was bringing a simpler way to write tck tests, a standard arquillian would bring a vendor neutral way, less value IMHO.

Maybe, anyway, I just wanted to put the idea out there. Perhaps, if Red Hat would be open to it, donating Arquillian core (without the forest of extensions) to EE4J and/or the TCK project, might be worth considering.

Kind regards,
Arjan
 _______________________________________________
jakartabatch-dev mailing list
jakartabatch-dev@xxxxxxxxxxx
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jakartabatch-dev




_______________________________________________
jakartabatch-dev mailing list
jakartabatch-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jakartabatch-dev

Back to the top