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

JUnit 5 Support #55

Open
AustinShalit opened this Issue Oct 2, 2017 · 13 comments

Comments

7 participants
@AustinShalit

AustinShalit commented Oct 2, 2017

Just seeing if there are any plans to support JUnit 5 right now.

@stefanbirkner

This comment has been minimized.

Owner

stefanbirkner commented Oct 7, 2017

Yes, I create a JUnit Jupiter extension at the end of October. I post updates here.

@kn9wBP2JX

This comment has been minimized.

kn9wBP2JX commented Oct 12, 2017

@stefanbirkner What can you suggest to use with JUnit 5 for stdout capturing?

@stefanbirkner

This comment has been minimized.

Owner

stefanbirkner commented Oct 14, 2017

Pleased wait for my JUnit Jupiter extension. I start development tomorrow.

@sbrannen

This comment has been minimized.

sbrannen commented Oct 14, 2017

I start development tomorrow.

Awesome. Looking forward to it! 👍

... b/c I otherwise might have to put something together myself. 😉

@sbrannen

This comment has been minimized.

sbrannen commented Oct 14, 2017

BTW, I've been meaning to show the Spring Boot team how to migrate their OutputCapture rule for JUnit 4 to JUnit Jupiter for a long time, so I just did it...

https://twitter.com/sam_brannen/status/919230917129981953

Not that you, @stefanbirkner, plan to do it the same way, but perhaps it serves as inspiration for you. 😉

@deepakab03

This comment has been minimized.

deepakab03 commented Apr 2, 2018

Hello Stefan,
I find the system-rules lib very useful and easy to use, thanks to you all!
Any idea when you intend to release support for JUnit 5, so that we can do away with JUnit 4 as a dependency?

@stefanbirkner

This comment has been minimized.

Owner

stefanbirkner commented Apr 4, 2018

Currently I'm working on two things:

I cannot estimate a release date because it depends very much on the amount of free time that I'm able to spend on System Rules. I started mid October last year and I'm still not finished :-(

@stefanbirkner

This comment has been minimized.

Owner

stefanbirkner commented Apr 25, 2018

The rewrite of the tests is finished. After fixing #61 I create a library that is independent of JUnit 4.

@stefanbirkner

This comment has been minimized.

Owner

stefanbirkner commented Apr 26, 2018

I started to create a library called System Lambda that solves the same testing problems like System Rules but without a dependency to a test framework. There may be a JUnit Lambda extension afterwards, but I start with an independent library because it can be used by TestNG users, too.

@syhily

This comment has been minimized.

syhily commented May 28, 2018

https://gist.github.com/syhily/1ae31ba0394668eb040917387a698449
Implemented a JUnit5 based ExpectedSystemExit

@davidkarlsen

This comment has been minimized.

davidkarlsen commented Aug 8, 2018

The lambda stuff for sftp is really nice, but sometimes the port is needed before at the class initialization level, so that it can be injected into systemproperties for spring-boot to pick it up before initialization. This is not possible when I cannot control the lifecycle myself.

@stefanbirkner

This comment has been minimized.

Owner

stefanbirkner commented Aug 8, 2018

I think you are talking about Fake SFTP Server Lambda. Can you create an issue here and describe what you are looking for.

@davidkarlsen

This comment has been minimized.

davidkarlsen commented Aug 8, 2018

Well - not really the lambda case. I've migrated from junit4 to junit5, see stefanbirkner/fake-sftp-server-rule#11 for the initial issue.
Since junit4 rules are not junit5 compatible (except in the cases where the migration trick from junit is used - and that requires the junit-rules to be based on certain base-classes) I looked at using the lamba-based library instead - but that comes with it sets of problems, since I need the port - so that I can set this in a system property - so that the port is read by the spring-configuration - and that needs to happen before spring-test initializes.

WDYT?

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