Coder Social home page Coder Social logo

Comments (7)

JThoennes avatar JThoennes commented on July 21, 2024

Is this a duplicate of issue 44?

from junit4.

dsaff avatar dsaff commented on July 21, 2024

Certainly resolving issue 44 would resolve this issue. I'm not clear if issue 44 covers any possible implementation of a better naming scheme.

from junit4.

JThoennes avatar JThoennes commented on July 21, 2024

Basically, I would like to have the first parameter of a parameterized test to contain the name of the test. Then the @parameters annotation could have a setting to indicate that the first parameter is the description to be taken instead of the number. This parameter defaults to disabled for backwards compatibility.

Alternatively, a static method to create names of test parameters would be more flexible.

Did you have a look at the offered patch in issue 44?

from junit4.

ffray avatar ffray commented on July 21, 2024

I've created a little patch for this issue as I'm currently creating a larger set of tests using the Parameterized runner.

By adding an instance of a newly created class Parameterized.Name to each Object-array returned by the @parameters method, getName and testName return the name instead of the fParameterSetNumber.
So tests get named "[test-name]" and methods get named "test-method [test-name]".
The patch is included in my fork at git://github.com/ffray/junit.git, branch "names".

from junit4.

JThoennes avatar JThoennes commented on July 21, 2024

Thanks, Florian. This looks like a simple and flexible patch.

Hopefully, this will be integrated into the standard JUnit some day (not too far into the future).

from junit4.

ffray avatar ffray commented on July 21, 2024

Could somebody please review Dimitars and my changes?
Would be great to have this functionality in the official release.

from junit4.

dsaff avatar dsaff commented on July 21, 2024

As I mentioned in a recent message to [email protected], my throughput on code reviews is currently very limited, and may be through the end of 2011. I'm sorry for the delay.

from junit4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.