New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Ant build support for the JUnit Platform #512

Closed
schauder opened this Issue Sep 15, 2016 · 19 comments

Comments

Projects
None yet
8 participants
@schauder
Contributor

schauder commented Sep 15, 2016

This question came up after a JUnit5 talk of mine:

Is anybody working on a JUnit5-Ant integration?

@sbrannen

This comment has been minimized.

Show comment
Hide comment
@sbrannen

sbrannen Sep 15, 2016

Member

Nope. Not that I'm aware of.

With that in mind, I'll reword the subject of this issue and make it "up for grabs". 😉

Member

sbrannen commented Sep 15, 2016

Nope. Not that I'm aware of.

With that in mind, I'll reword the subject of this issue and make it "up for grabs". 😉

@sbrannen sbrannen changed the title from Is there an ANT integration? to Introduce ANT build support for the JUnit Platform Sep 15, 2016

@sbrannen sbrannen changed the title from Introduce ANT build support for the JUnit Platform to Introduce Ant build support for the JUnit Platform Sep 15, 2016

@sbrannen sbrannen added this to the General Backlog milestone Sep 15, 2016

@SqAutoTestTeam

This comment has been minimized.

Show comment
Hide comment
@SqAutoTestTeam

SqAutoTestTeam Oct 11, 2016

As users of JUnit5 we can say.
The project we work with is built with Ant.
Actually Ant compiles, runs tests, checks code, checks project files, and does many other things.
Now we consider migrating to Junit5 because we find it a modern tool that takes into account mistakes made in past. Although Ant is an old framework that seems to be at the point of extinction, it is still required and we need Ant support as much as we need air to breathe. We are sure that we are not alone.

Later we're going to migrate to gradle (or maven). But at this moment we find it difficult to do both things at the same time - migrate to Junit5 and to gradle (or maven). So it would be very nice if you implement this feature.

SqAutoTestTeam commented Oct 11, 2016

As users of JUnit5 we can say.
The project we work with is built with Ant.
Actually Ant compiles, runs tests, checks code, checks project files, and does many other things.
Now we consider migrating to Junit5 because we find it a modern tool that takes into account mistakes made in past. Although Ant is an old framework that seems to be at the point of extinction, it is still required and we need Ant support as much as we need air to breathe. We are sure that we are not alone.

Later we're going to migrate to gradle (or maven). But at this moment we find it difficult to do both things at the same time - migrate to Junit5 and to gradle (or maven). So it would be very nice if you implement this feature.

@marcphilipp

This comment has been minimized.

Show comment
Hide comment
@marcphilipp

marcphilipp Oct 11, 2016

Member

It's been a long time since I've used Ant. I believe it shouldn't be too hard to write an adapter for ConsoleLauncher in Ant, right?

Member

marcphilipp commented Oct 11, 2016

It's been a long time since I've used Ant. I believe it shouldn't be too hard to write an adapter for ConsoleLauncher in Ant, right?

@vvelrath

This comment has been minimized.

Show comment
Hide comment
@vvelrath

vvelrath May 19, 2017

Our team has been using ANT to run the junit tests. Now that I am upgrading to junit 5 to try out dynamic tests with the @testfactory annotation, and the ANT task is failing with the following exception
[junit] Testcase: initializationError took 0.003 sec
[junit] Caused an ERROR
[junit] No runnable methods
[junit] java.lang.Exception: No runnable methods
[junit] at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

Is there any other tool apart from ANT that I can try out?? Any help is appreciated.

Thanks and Regards
Vivekanandh Vel Rathinam

vvelrath commented May 19, 2017

Our team has been using ANT to run the junit tests. Now that I am upgrading to junit 5 to try out dynamic tests with the @testfactory annotation, and the ANT task is failing with the following exception
[junit] Testcase: initializationError took 0.003 sec
[junit] Caused an ERROR
[junit] No runnable methods
[junit] java.lang.Exception: No runnable methods
[junit] at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

Is there any other tool apart from ANT that I can try out?? Any help is appreciated.

Thanks and Regards
Vivekanandh Vel Rathinam

@sormuras

This comment has been minimized.

Show comment
Hide comment
@sormuras

sormuras May 19, 2017

Member

@vvelrath You could use the Console Launcher standalone JAR from within ANT as a work-around. For example, configure an ANT java task to try out @TestFactory. Here is a Gradle example: junit-platform-standalone.gradle

Member

sormuras commented May 19, 2017

@vvelrath You could use the Console Launcher standalone JAR from within ANT as a work-around. For example, configure an ANT java task to try out @TestFactory. Here is a Gradle example: junit-platform-standalone.gradle

@veita

This comment has been minimized.

Show comment
Hide comment
@veita

veita Sep 22, 2017

Console Launcher is not an option for us since it would require non-trivial changes on a huge amount of build scripts or even project structures. Let alone interoperability with other task like e.g. code coverage determination.

veita commented Sep 22, 2017

Console Launcher is not an option for us since it would require non-trivial changes on a huge amount of build scripts or even project structures. Let alone interoperability with other task like e.g. code coverage determination.

@jaikiran

This comment has been minimized.

Show comment
Hide comment
@jaikiran

jaikiran Jan 27, 2018

Contributor

Support for JUnit5 in Ant is currently being implemented. More details here https://www.mail-archive.com/dev@ant.apache.org/msg46487.html and there's a issue in Ant's issue tracker that you can keep a watch on to be notified when the feature is available https://bz.apache.org/bugzilla/show_bug.cgi?id=61796

Contributor

jaikiran commented Jan 27, 2018

Support for JUnit5 in Ant is currently being implemented. More details here https://www.mail-archive.com/dev@ant.apache.org/msg46487.html and there's a issue in Ant's issue tracker that you can keep a watch on to be notified when the feature is available https://bz.apache.org/bugzilla/show_bug.cgi?id=61796

@sormuras

This comment has been minimized.

Show comment
Hide comment
@sormuras

sormuras Jan 27, 2018

Member

This is great news, @jaikiran

Did you see the PR by @dhilario https://github.com/junit-team/junit5/pull/624/files ? If I remember correctly, it was almost ready to run.

Member

sormuras commented Jan 27, 2018

This is great news, @jaikiran

Did you see the PR by @dhilario https://github.com/junit-team/junit5/pull/624/files ? If I remember correctly, it was almost ready to run.

@jaikiran

This comment has been minimized.

Show comment
Hide comment
@jaikiran

jaikiran Feb 16, 2018

Contributor

Hi @sormuras, I hadn't seen that PR before. I had a look at it now. The approach I followed in my effort to build this integration is a bit different than what's there in the PR you pointed to.

In the approach that I followed, the new junitlauncher task (which is what I call it) is a bit more "native" to Ant. What I mean by that is, it follows/uses existing Ant constructs that users who are familiar with Ant (and junit task) would, I think, feel more used to. For example, Ant has the concept of resource collections which allows users to specify/filter files that they want to provide for test execution. Furthermore, one of the related goals of my efforts was to try and have a similar kind of test result reporting that previous junit task used to provide.

The approach in the linked PR is different to this. It's neither wrong nor bad and has its own pros. It seems to act as a wrapper over JUnit 5 constructs and more closer to it and uses Ant mostly like a pass-through mechanism for constructing the test requests. Again, this isn't a bad thing - I'm just noting the difference in the approach.

To give a better picture of how the proposed junitlauncher task is going to look like, here's a WIP user manual for it (the link is temporary) [1]. More use cases (like specifying package selectors) will be addressed as we go along and this current state is the initial version of what I had in mind.

[1] https://home.apache.org/~jaikiran/temp_workspace/manual/Tasks/junitlauncher.html

Contributor

jaikiran commented Feb 16, 2018

Hi @sormuras, I hadn't seen that PR before. I had a look at it now. The approach I followed in my effort to build this integration is a bit different than what's there in the PR you pointed to.

In the approach that I followed, the new junitlauncher task (which is what I call it) is a bit more "native" to Ant. What I mean by that is, it follows/uses existing Ant constructs that users who are familiar with Ant (and junit task) would, I think, feel more used to. For example, Ant has the concept of resource collections which allows users to specify/filter files that they want to provide for test execution. Furthermore, one of the related goals of my efforts was to try and have a similar kind of test result reporting that previous junit task used to provide.

The approach in the linked PR is different to this. It's neither wrong nor bad and has its own pros. It seems to act as a wrapper over JUnit 5 constructs and more closer to it and uses Ant mostly like a pass-through mechanism for constructing the test requests. Again, this isn't a bad thing - I'm just noting the difference in the approach.

To give a better picture of how the proposed junitlauncher task is going to look like, here's a WIP user manual for it (the link is temporary) [1]. More use cases (like specifying package selectors) will be addressed as we go along and this current state is the initial version of what I had in mind.

[1] https://home.apache.org/~jaikiran/temp_workspace/manual/Tasks/junitlauncher.html

@sbrannen

This comment has been minimized.

Show comment
Hide comment
@sbrannen

sbrannen Feb 16, 2018

Member

@jaikiran, that's looking quite good!

So, your work will be the official Ant support for the JUnit Platform -- is that correct?

If so, I'll close this issue.

Member

sbrannen commented Feb 16, 2018

@jaikiran, that's looking quite good!

So, your work will be the official Ant support for the JUnit Platform -- is that correct?

If so, I'll close this issue.

@jaikiran

This comment has been minimized.

Show comment
Hide comment
@jaikiran

jaikiran Feb 16, 2018

Contributor

So, your work will be the official Ant support for the JUnit Platform -- is that correct?

Yes, that's correct. We currently have a dev discussion going on and a PR [1] open which will be reviewed and merged, depending on some of our upcoming Ant release schedule.

[1] apache/ant#60

Contributor

jaikiran commented Feb 16, 2018

So, your work will be the official Ant support for the JUnit Platform -- is that correct?

Yes, that's correct. We currently have a dev discussion going on and a PR [1] open which will be reviewed and merged, depending on some of our upcoming Ant release schedule.

[1] apache/ant#60

@sbrannen

This comment has been minimized.

Show comment
Hide comment
@sbrannen

sbrannen Feb 16, 2018

Member

That's great news!

Thanks for the feedback, @jaikiran.

I am therefore closing this issue since an upcoming release of Ant will provide JUnit Platform support out of the box.

Member

sbrannen commented Feb 16, 2018

That's great news!

Thanks for the feedback, @jaikiran.

I am therefore closing this issue since an upcoming release of Ant will provide JUnit Platform support out of the box.

@sbrannen sbrannen closed this Feb 16, 2018

@sbrannen sbrannen removed this from the General Backlog milestone Feb 16, 2018

@sbrannen

This comment has been minimized.

Show comment
Hide comment
@sbrannen

sbrannen Feb 16, 2018

Member

@jaikiran, I couldn't find your Twitter handle... that I wanted to include in this tweet: https://twitter.com/sam_brannen/status/964476615160942592

Member

sbrannen commented Feb 16, 2018

@jaikiran, I couldn't find your Twitter handle... that I wanted to include in this tweet: https://twitter.com/sam_brannen/status/964476615160942592

@jaikiran

This comment has been minimized.

Show comment
Hide comment
@jaikiran

jaikiran Feb 16, 2018

Contributor

@sbrannen, I don't have a twitter account :) Thanks for tweeting it to a wider audience!

Contributor

jaikiran commented Feb 16, 2018

@sbrannen, I don't have a twitter account :) Thanks for tweeting it to a wider audience!

@jaikiran

This comment has been minimized.

Show comment
Hide comment
@jaikiran

jaikiran Mar 28, 2018

Contributor

@sbrannen, more of a FYI - we just released Ant 1.10.3 today which now has support for JUnit 5 https://jaitechwriteups.blogspot.in/2018/03/ant-1103-released-with-junit-5-support.html

Contributor

jaikiran commented Mar 28, 2018

@sbrannen, more of a FYI - we just released Ant 1.10.3 today which now has support for JUnit 5 https://jaitechwriteups.blogspot.in/2018/03/ant-1103-released-with-junit-5-support.html

@sbrannen

This comment has been minimized.

Show comment
Hide comment
@sbrannen

sbrannen Mar 28, 2018

Member

Awesome! 👏

Thanks for letting us know and sharing the link.

I'll tweet about it ASAP. 👍

Member

sbrannen commented Mar 28, 2018

Awesome! 👏

Thanks for letting us know and sharing the link.

I'll tweet about it ASAP. 👍

@sbrannen

This comment has been minimized.

Show comment
Hide comment
Member

sbrannen commented Mar 28, 2018

@marcphilipp marcphilipp referenced this issue Mar 31, 2018

Closed

Document Ant build support in User Guide #1352

1 of 1 task complete
@marcphilipp

This comment has been minimized.

Show comment
Hide comment
@marcphilipp

marcphilipp Mar 31, 2018

Member

I've created #1352 to add a brief subsection to our User Guide and link to the official documentation.

@jaikiran Is this something you'd be interested in documenting?

Member

marcphilipp commented Mar 31, 2018

I've created #1352 to add a brief subsection to our User Guide and link to the official documentation.

@jaikiran Is this something you'd be interested in documenting?

@jaikiran

This comment has been minimized.

Show comment
Hide comment
@jaikiran

jaikiran Apr 1, 2018

Contributor

@marcphilipp, sure I can take a look at that one this coming week and send a PR

Contributor

jaikiran commented Apr 1, 2018

@marcphilipp, sure I can take a look at that one this coming week and send a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment