Giter VIP home page Giter VIP logo

dynatest's People

Contributors

mvysny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

hazer ramipa

dynatest's Issues

Corrections regarding JUnit Jupiter parameterized test support

First and foremost, this looks like an interesting test framework, and it's always cool to see people implementing their own TestEngine for the JUnit Platform!

I read through the README and noticed a few points regarding JUnit Jupiter's support for parameterized tests which are technically incorrect.

So I'd be grateful if you could reword the following sections.

Thanks in advance!


  • The support for parametrized tests with JUnit5 is quite limited: the parameters need to be known upfront and stored in annotations, that restricts you from:

Parameters actually do not need to be known up front. They can be loaded from any source of your choosing dynamically and programmatically. You can implement a custom ArgumentsProvider or use a @MethodSource that receives parameters that are dynamically supplied by a factory method.

One can of course choose to use an annotation such as @ValueSource to define static parameters, but that is not the only choice.

  • Having the parameters created dynamically or loaded from a file;

So you could generate the parameters dynamically, load them from a file, read them from a database, etc. The world is your oyster. ๐Ÿ˜‰

  • Using more complex types - you are restricted to String and primitives.

There are literally zero restrictions on parameter types when using a @MethodSource or custom ArgumentsProvider.

Clearly mark the test() method that it crosses the test boundaries

There is no clear distinction between the code that creates tests (calls the test() method), and
the testing code itself (blocks inside of test() method). However, there is a ton of difference:
those two code bases run at completely different time. Furthermore Kotlin allows to share variables
freely between those two code bases, which may create a really dangerous code which fails in mysterious ways.

That's magic which must be removed. The test() method must yell a big warning sign that the programmer is crossing code boundaries. I'm thinking about renaming the test() method to something else, but I'm not really satisfied with any of the candidates:

  • post() - not really a test
  • postTest() - too long
  • marking test() deprecated - stupid :-)

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.