1

Possible Duplicate:
Change test name of parameterized tests?

I have a JUnit 4 test case class that uses the Parameterized style. Everything runs as expected. My one complaint is that the JUnit view tab in Eclipse displays the test run like so:

[0] (0.999 s)
executeTest[0] (0.999 s)
[1] (0.123 s)
executeTest[1] (0.123 s)
[2] (0.666 s)
executeTest[2] (0.666 s)

and so on...

How can I modify either the test case class and/or my Eclipse configuration such that the test number (the [0], [1], etc.) instead displays a useful label string that I supply (perhaps from the parameterized data)?

I'm using JUnit 4.8

Community
  • 1
  • 1
Jim Tough
  • 14,843
  • 23
  • 75
  • 96
  • @oers I was hoping for a more recent solution. The question you referenced is quite old and refers to older versions of JUnit. I will edit my question to specify that version I'm using. – Jim Tough Oct 28 '11 at 12:00
  • 1
    junit didn't advance that much since 4.5 in that aspect. This answer for 4.8 will help: http://stackoverflow.com/questions/650894/change-test-name-of-parameterized-tests/4598665#4598665. – oers Oct 28 '11 at 12:02

0 Answers0