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

roman-numerals: make test failures easier to troubleshoot #160

Closed
1 of 2 tasks
jtigger opened this issue Oct 30, 2016 · 3 comments
Closed
1 of 2 tasks

roman-numerals: make test failures easier to troubleshoot #160

jtigger opened this issue Oct 30, 2016 · 3 comments
Labels
code good first issue Good for newcomers

Comments

@jtigger
Copy link
Contributor

jtigger commented Oct 30, 2016

roman-numerals uses the JUnit Parameterized test runner. This was done to make the test more compact (and once you learn how the mechanism works, easier to read).

However, when a test fails, the error message does not indicate which value failed. This makes it really difficult to know why the test failed.

Test failures should clearly indicate what failed.

To Do:

  • ensure that this exercise is using JUnit 4.12 or later
  • add a format string to the @Parameters annotation.

(ref: #147)

@jtigger jtigger added code good first issue Good for newcomers labels Oct 30, 2016
@jtigger jtigger changed the title roman-numerals: test failures are hard to troubleshoot roman-numerals: make test failures easier to troubleshoot Oct 30, 2016
@stkent
Copy link
Contributor

stkent commented Nov 26, 2016

Related: exercism/problem-specifications#451

@bscharm
Copy link

bscharm commented Nov 26, 2016

@jtigger is a more "documentation style" description preferred? or a more sentence style description? e.g.:

@Parameters(name = "#getRomanNumeral() for RomanNumeral({0}) should return \"{1}\"")
translates to:
[#getRomanNumeral() for RomanNumeral(3) should return "III"]

vs.

@Parameters(name = "Roman Numeral representation of {0} is \"{1}\"")
translates to:
[Roman Numeral representation of 3 is "III"]

EDIT:
just saw @stkent comment...should descriptions indicate what the test is after as opposed to what it expects?

@jtigger
Copy link
Contributor Author

jtigger commented Nov 28, 2016

Thanks for looking into this, @bscharm!

To your question: implementer's choice. Which would you find more useful as the practitioner running through the exercise?

FridaTveit added a commit to FridaTveit/java that referenced this issue Dec 21, 2016
…m#164, exercism#165 and exercism#166: Added format string to @parameters annotation in AtbashTest, BinaryTest, OctalTest, RaindropsTest and RomanNumeralsTest. Removed repeated word in format string for PiglatinTest and ScrabbleScoreTest.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants