question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide JUnit 5 GrpcTestExtension

See original GitHub issue

What version of gRPC are you using?

1.18.0

What did you expect to see?

In order to be able to test with JUnit 5 I would like to have a comparable solution like GrpcCleanupRule but as JUnit 5 extension.

Example

In my PoC project mmichaelis/poc-grpc you may see an example, which is very similar to your GrpcCleanupRule (because that was my intention 😄): In module grpc-test you will find the class GrpcTestExtension and an example usage in HelloServiceImplTest.

Help wanted?

I may assist in adding this to the grpc-java project, but there are several questions:

  • First of all: Do you like the extension?
  • Where to place the JUnit 5 extension? Into testing module? Or an extra module?
  • And if it is an extra module: How to share code? My intention would be to refactor GrpcCleanupRule, so that GrpcTestExtension and the JUnit 4 rule share as much code as possible.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:23
  • Comments:21 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
creamsoupcommented, Feb 7, 2019

personally i would like to use junit5. but, internally we only have junit 4.12. junit5 requires pretty big change, so unfortunately it won’t happen any time in near future.

2reactions
asarkarcommented, Aug 3, 2020

@marcphilipp Added to the “JUnit Jupiter Extensions” section.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - Provide JUnit 5 GrpcTestExtension -
In order to be able to test with JUnit 5 I would like to have a comparable solution like GrpcCleanupRule but as JUnit...
Read more >
JUnit 5 User Guide
The goal of this document is to provide comprehensive reference documentation for programmers writing tests, extension authors, and engine ...
Read more >
A Guide to JUnit 5 Extensions - Baeldung
In this article, we're going to take a look at the extension model in the JUnit 5 testing library. As the name suggests,...
Read more >
A Comprehensive Guide On JUnit 5 Extensions - LambdaTest
JUnit Jupiter: Provides an annotation-based API to write JUnit 5 unit tests, along with a test engine that lets you run them. JUnit...
Read more >
Building Your First Junit 5 Test - Java Unit Testing with JUnit 5
This lesson provides step by step hands-on approach to run JUnit 5 test case on Eclipse IDE.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found