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

Add CamelCase Display Name Generator #1595

Closed
3 tasks
sormuras opened this issue Sep 23, 2018 · 15 comments
Closed
3 tasks

Add CamelCase Display Name Generator #1595

sormuras opened this issue Sep 23, 2018 · 15 comments

Comments

@sormuras
Copy link
Member

sormuras commented Sep 23, 2018

Overview

As a follow-up from #1588 use the DisplayNameGenerator SPI to turn names of test classes and test methods using camel-case notation into human-readable display names.

Related Issues

Deliverables

  • Create and implement CamelCaseGenerator in org.junit.jupiter.api.DisplayNameGenerator
  • Integrate this new pre-defined generator into org.junit.jupiter.engine.descriptor.DisplayNameUtils
  • Extend org.junit.jupiter.api.DisplayNameGenerationTests to verify the implementation
@andreybleme
Copy link

andreybleme commented Sep 25, 2018

@sormuras are there anyone already working on this issue? I can work on it.

@sormuras
Copy link
Member Author

Hi @andreybleme sure -- but wait until #1588 was merged to master. There might be changes in the API/SPI incoming.

@andreybleme
Copy link

andreybleme commented Sep 25, 2018

@sormuras ok I'm waiting for it. Thanks.

@sormuras
Copy link
Member Author

Ready, set... Go!

The Display Name Generator SPI is now available.

zoltanersek pushed a commit to zoltanersek/junit5 that referenced this issue Oct 3, 2018
@andreybleme
Copy link

Seems that @zoltanersek already did it. I'll move to another issue.

@mitchellirvin
Copy link

is this wrapped up? Can we remove the "up for grabs" label, if so?

@marcphilipp
Copy link
Member

Before implementing such a generator, we should come up with a table of example method names and agree on what the generated display names should be. Thus, I've changed the status to blocked for the time being.

@mmerdes
Copy link
Contributor

mmerdes commented Sep 13, 2019

@Kazhuru
Copy link
Contributor

Kazhuru commented Dec 12, 2019

Hi, @marcphilipp I would like to take a step on this, I can make a table with examples for team discussion and clarification on how this should be displayed, in order to remove the blocker and finish if there are missing modifications, sounds good?

@marcphilipp
Copy link
Member

@Kazhuru Sure, that sounds good! 👍

@Kazhuru

This comment has been minimized.

@Kazhuru
Copy link
Contributor

Kazhuru commented Dec 20, 2019

Hi there, I would like to propose this kind of output activity for this generator:

Method/Class test name input Display name generator output
MyFirstJunitJupiterTests() My First Junit Jupiter Tests
JunitTestNumber12OfToday() Junit Test Number 12 Of Today
timeoutNotExceededTest() timeout Not Exceeded Test
ThrowsNullPointerException() Throws Null Pointer Exception
test1() test 1
underscore_test_here() underscore_test_here
testingastack() testingastack
OddSymbols#%-Method() Odd Symbols#%- Method

I dont' know if we could aggregate more scenarios or this is a good output?

@lsikora
Copy link

lsikora commented Feb 22, 2020

Couldn't this be at least integrated into https://github.com/junit-pioneer/junit-pioneer in form that @Kazhuru suggested instead of being still blocked after 7 months :/?

lsikora added a commit to lsikora/juni5-migration-sample that referenced this issue Feb 22, 2020
@marcphilipp
Copy link
Member

Sure, that sounds like a good idea!

lsikora added a commit to lsikora/juni5-migration-sample that referenced this issue Feb 23, 2020
@marcphilipp
Copy link
Member

Team decision: Since there are so many edge cases we feel that it might be not be feasible to implement an out-of-the-box general purpose camel case generator that meets the majority of users' needs. Thus, we close this issue for now. If you need one, the API is extensible by design and you can write your own.

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

No branches or pull requests

9 participants