Skip to content
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 a TemporaryFolder extension #1247

Closed
sbrannen opened this Issue Jan 18, 2018 · 14 comments

Comments

@sbrannen
Copy link
Member

sbrannen commented Jan 18, 2018

Overview

See discussion at junit-team/junit5-samples#4.

Related Issues

Deliverables

  • Introduce an official TemporaryFolder extension for JUnit Jupiter analogous to the rule support in JUnit 4.
@sormuras

This comment has been minimized.

@Siedlerchr

This comment has been minimized.

Copy link

Siedlerchr commented May 5, 2018

It would really been nice to have this feature available in the next release as it is still a deal-breaker in the complete migration to junit Jupiter.

@marcphilipp marcphilipp removed this from the 5.3 Backlog milestone May 5, 2018

@marcphilipp

This comment has been minimized.

Copy link
Member

marcphilipp commented May 5, 2018

This will be done in the half-official extensions project: junit-pioneer/junit-pioneer#39.

@marcphilipp marcphilipp closed this May 5, 2018

@britter

This comment has been minimized.

Copy link
Collaborator

britter commented Jul 10, 2018

Still waiting on the first junit-pioneer release... :(

@sormuras

This comment has been minimized.

Copy link
Member

sormuras commented Jul 10, 2018

Only some more minutes...

@britter

This comment has been minimized.

Copy link
Collaborator

britter commented Jul 10, 2018

There it is! Thank you! 🙏

@wilkinsona

This comment has been minimized.

Copy link

wilkinsona commented Nov 28, 2018

Having TempDirectory be part of JUnit Pioneer has a few downsides:

  1. It requires knowledge of another dependency
  2. It requires management of another dependency version
  3. It has the unpleasant side effect of polluting the classpath with another @Test annotation

1 and 2 are only annoying when figuring out what JUnit 5's equivalent of TemporaryFolder might be. 3 is a constant annoyance when writing tests. That annoyance can be mitigated somewhat by everyone configuring their IDEs to avoid suggesting org.junitpioneer.vintage.Test.

Could the decision to move a core, and very useful, piece of JUnit 4 into a half-official extensions project please be reconsidered?

@guenhter

This comment has been minimized.

Copy link

guenhter commented Nov 28, 2018

While such features are in experimental mode, having a dedicated dependency which only contains the extension would be helpful. This can then just be included additionally to the official Junit5 dependency.

@sbrannen

This comment has been minimized.

Copy link
Member Author

sbrannen commented Nov 28, 2018

Could the decision to move a core, and very useful, piece of JUnit 4 into a half-official extensions project please be reconsidered?

Hi @wilkinsona,

I'll bring it up with the team for renewed discussion.

@sbrannen sbrannen reopened this Nov 28, 2018

@sbrannen sbrannen added this to the 5.4 M1 milestone Nov 28, 2018

@sbrannen

This comment has been minimized.

Copy link
Member Author

sbrannen commented Nov 28, 2018

Reopened and tentatively slated for 5.4 M1 for team discussion.

@shollander

This comment has been minimized.

Copy link

shollander commented Nov 29, 2018

I agree with @wilkinsona, particularly regarding point 3. The extra @Test annotation is very confusing, and does not seem to provide any benefit. JUnit Jupiter provides better methods for dealing with expected exceptions and timeout of tests. I don't really see why org.junitpioneer.vintage.Test even exists.

@mkobit

This comment has been minimized.

Copy link
Contributor

mkobit commented Nov 29, 2018

Regarding the @Test in that library, I'd recommend opening a separate issue to https://github.com/junit-pioneer/junit-pioneer/issues.

@marcphilipp

This comment has been minimized.

Copy link
Member

marcphilipp commented Nov 30, 2018

Team Decision: Add TempDirectory to junit-jupiter-api in package org.junit.jupiter.api.support.io and deprecate it in Pioneer.

@wilkinsona

This comment has been minimized.

Copy link

wilkinsona commented Nov 30, 2018

That's excellent news. Thank you for reconsidering.

@sijie123 sijie123 referenced this issue Jan 29, 2019

Open

Upgrade JUnit4 tests to JUnit5 #874

0 of 8 tasks complete

sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Feb 10, 2019

JUnit: Upgrade to JUnit 5.4.0
Currently, JUnit 5.1.0 is used to write JUnit 5 styled tests.

JUnit 5.1.0 does not support creating Temporary Folders natively, and relies on having to create a custom TemporaryFolder extension or relying on JUnit-Pioneer library [1]. Both of these solutions make it complicated to implement and understand. JUnit 5.4.0 is the first version of JUnit that supports native TemporaryFolder extension [2].

Hence, let's use JUnit 5.4.0 instead to reduce the complexity of implementing TemporaryFolder.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247

sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Feb 23, 2019

JUnit: Upgrade to JUnit 5.4.0
Currently, JUnit 5.1.0 is used to write JUnit 5 styled tests.

JUnit 5.1.0 does not support creating Temporary Folders natively, and relies on having to create a custom TemporaryFolder extension or relying on JUnit-Pioneer library [1]. Both of these solutions make it complicated to implement and understand. JUnit 5.4.0 is the first version of JUnit that supports native TemporaryFolder extension [2].

Hence, let's use JUnit 5.4.0 instead to reduce the complexity of implementing TemporaryFolder.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247

sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Feb 23, 2019

JUnit: Upgrade to JUnit 5.4.0
Currently, JUnit 5.1.0 is used to write JUnit 5 styled tests.

JUnit 5.1.0 does not support creating Temporary Folders natively, and relies on having to create a custom TemporaryFolder extension or relying on JUnit-Pioneer library [1]. Both of these solutions make it complicated to implement and understand. JUnit 5.4.0 is the first version of JUnit that supports native TemporaryFolder extension [2].

Hence, let's use JUnit 5.4.0 instead to reduce the complexity of implementing TemporaryFolder.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247

sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Feb 24, 2019

JUnit: Upgrade to JUnit 5.4.0
Currently, JUnit 5.1.0 is used to write JUnit 5 styled tests.

JUnit 5.1.0 does not support creating Temporary Folders natively, and
relies on having to create a custom TemporaryFolder extension or
relying on JUnit-Pioneer library [1]. Both of these solutions make it
complicated to implement and understand. JUnit 5.4.0 is the first
version of JUnit that supports native TemporaryFolder extension [2].

Hence, let's use JUnit 5.4.0 instead to reduce the complexity of
implementing TemporaryFolder.

[1]
https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247

sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Feb 24, 2019

JUnit: Upgrade to JUnit 5.4.0
Currently, JUnit 5.1.0 is used to write JUnit 5 styled tests.

JUnit 5.1.0 does not support creating Temporary Folders natively, and
relies on having to create a custom TemporaryFolder extension or
relying on JUnit-Pioneer library [1]. Both of these solutions make it
complicated to implement and understand. JUnit 5.4.0 is the first
version of JUnit that supports native TemporaryFolder extension [2].

Hence, let's use JUnit 5.4.0 instead to reduce the complexity of
implementing TemporaryFolder.

[1]
https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247

sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Mar 16, 2019

JUnit: Upgrade to JUnit 5.4.0
Currently, JUnit 5.1.0 is used to write JUnit 5 styled tests.

JUnit 5.1.0 does not support creating Temporary Folders natively, and
relies on having to create a custom TemporaryFolder extension or
relying on JUnit-Pioneer library [1]. Both of these solutions make it
complicated to implement and understand. JUnit 5.4.0 is the first
version of JUnit that supports native TemporaryFolder extension [2].

Hence, let's use JUnit 5.4.0 instead to reduce the complexity of
implementing TemporaryFolder.

[1]
https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247

sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Mar 16, 2019

JUnit: Upgrade to JUnit 5.4.0
Currently, JUnit 5.1.0 is used to write JUnit 5 styled tests.

JUnit 5.1.0 does not support creating Temporary Folders natively, and
relies on having to create a custom TemporaryFolder extension or
relying on JUnit-Pioneer library [1]. Both of these solutions make it
complicated to implement and understand. JUnit 5.4.0 is the first
version of JUnit that supports native TemporaryFolder extension [2].

Hence, let's use JUnit 5.4.0 instead to reduce the complexity of
implementing TemporaryFolder.

[1]
https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.