Re: Next Generation Integration Testing for Plugins/Core

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Next Generation Integration Testing for Plugins/Core

Romain Manni-Bucau
@Tibor: do you agree we write the tests with chai (js)? It is the same to
use groovy for a java dev today since java caught up its lateness. Not
stacking layers and avoiding useless abstractions is the best way to enable
people to contribute from my experience. As soon as you add a layer which
has a step people can find blockers to go upon it will not work (to be
explicit here you add a language blocker + an API blocker + a change in
native maven conventions which is likely bad for us).
Lastly, my point about the java issues is not that it can't be fixed,
people there are good enough to fix them all releases after releases, it is
just that it delays the availability and adoption of spock which means it
is not mainstream so contributor friendly.
So picking spock woudnt hit our goal.

Le mer. 30 oct. 2019 à 16:58, Tibor Digana <[hidden email]> a
écrit :

> Romain, I am glad that you are with me.
> Attracting the contributors!
>
> I hope we all voted for Java 8 sources in Maven Core.
> And Spock is the same story.
>
> Java is the like C++ old style.
> Lambda makes this language more moderns a bit.
>
> Regarding issues with Java 14, all can be fixed, just give the Spock the
> chance!
>
>
>
> On Wed, Oct 30, 2019 at 4:52 PM Romain Manni-Bucau <[hidden email]>
> wrote:
>
> > @Tibor: one goal we should focus on on any new feature is to enable us to
> > attract more new contributors, spock has the disadvantage to not be
> > mainstream at all + to be on groovy which has some issues to support
> recent
> > java version so it will not help it to be more adopted, therefore I guess
> > jupiter is not really a question these days whatever we can think about
> it.
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <https://rmannibucau.metawerx.net/> | Old Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > <
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > >
> >
> >
> > Le mer. 30 oct. 2019 à 16:16, Tibor Digana <[hidden email]> a
> > écrit :
> >
> > > Karl, where you define CLI command in each test?
> > > Regarding the f/w you have selected. If I had to decide between JUnit5
> or
> > > Groovy/Spock, I would decide for Spock.
> > >
> > > On Tue, Oct 29, 2019 at 9:47 PM Karl Heinz Marbaise <[hidden email]
> >
> > > wrote:
> > >
> > > > Hi to all,
> > > >
> > > > I've invested some time to get a thing working in a different way
> which
> > > > nags me for a long time.
> > > >
> > > > Integration tests for maven plugins and for maven core...
> > > >
> > > > So created a prototype based on a JUnit Jupiter extension.
> > > >
> > > > The following is the JUnit Jupiter extension (currently very hacky
> > code;
> > > > not intended to win a competition for good code!)
> > > >
> > > > https://github.com/khmarbaise/maven-it-extension
> > > >
> > > > which contains some documentation which is of course not ready yet...
> > > > but the implementation and usage (see maven-ear-plugin) gives me at
> the
> > > > moment already a very good impression how easy it can be to write
> > > > integration tests for a maven plugin etc.
> > > >
> > > > Example from the docs(not 100% working like that yet):
> > > >
> > > > @MavenIT
> > > > class FirstMavenIT {
> > > >
> > > >    @MavenTest
> > > >    void the_first_test_case(MavenProjectResult result) {
> > > >      assertThat(result)
> > > >        .build()
> > > >          .isSuccessful()
> > > >        .and()
> > > >        .project()
> > > >          .hasTarget()
> > > >            .withEarFile()
> > > >              .containsOnlyOnce("META-INF/MANIFEST.MF")
> > > >          .log()
> > > >            .info().contains("Writing data to file")
> > > >        .cache()
> > > >            .withEarFile("G:A:V")
> > > >            .withPomFile("G:A:V")
> > > >            .withMetadata().contains("xxx");
> > > >    }
> > > > }
> > > >
> > > >
> > > > I created a branch "maven-it-extension" on Maven EAR Plugin which
> shows
> > > > that it can be used in combination with maven-invoker-plugin:install
> > > > goal and using maven-failsafe-plugin to run the tests for
> > > > maven-ear-plugin (some of them at the moment. Not migrated all of
> them
> > > > yet).
> > > >
> > > > Example which already works:
> > > >
> > > >
> > >
> >
> https://github.com/apache/maven-ear-plugin/blob/maven-it-extension/src/test/java/org/apache/maven/plugins/ear/it/EARIT.java
> > > >
> > > >
> > > > WDYT ?
> > > >
> > > > Kind regards
> > > > Karl Heinz Marbaise
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [hidden email]
> > > > For additional commands, e-mail: [hidden email]
> > > >
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Next Generation Integration Testing for Plugins/Core

Tibor Digana
am, programming language is our toy ;-)
everybody has some preferences, so i respect them and i understand that
even the Lambda would be a big jump for us nevertheless the Groovy or
Kotlin.
i saw the parameterized tests, re-runs in Groovy, log result of assertion
statements, and I spoke with Benedikt and we agreed that Spock is very
special and we like it.
i do not want to push Karl. Maybe one advice is to think about the
programming approach where these annotations and code would be easily used
in another languages too.
that's basically all from my side.

Enjoy!


On Thu, Oct 31, 2019 at 11:56 PM Vladimir Sitnikov <
[hidden email]> wrote:

> Karl>on the language features but since JDK8 I don't see any advantage
>
> What about Kotlin?
>
> There are nice things there: the language is statically compiled, great
> Java interop, there are extension functions, multiline strings, helpful
> standard library, default parameters.
> Kotlin is great for creating DSLs.
>
> It can be used with JUnit or other frameworks (e.g.
> https://github.com/kotlintest/kotlintest )
>
> Vladimir
>