Giter Site home page Giter Site logo

Comments (6)

BurntSushi avatar BurntSushi commented on June 23, 2024

@Wilfred To clarify, have you seen the tests method? http://burntsushi.net/rustdoc/quickcheck/struct.QuickCheck.html#method.tests Or are you specifically asking for this to be settable via an environment variable?

from quickcheck.

astahfrom avatar astahfrom commented on June 23, 2024

It would be nice to be able to control this when using the #[quickcheck] attribute also.

from quickcheck.

Wilfred avatar Wilfred commented on June 23, 2024

I think my use case is probably the same as Andreas: I have a load of tests using the #[quickcheck] attribute and I can't change the number of tests run. It would probably make more sense if it could be controlled per-test, so I could increase the number for tests which I've observed to find failures occasionally.

from quickcheck.

remexre avatar remexre commented on June 23, 2024

I think this is already implemented: https://github.com/remexre/quickcheck/blame/master/src/tester.rs#L20

Close as fixed?

from quickcheck.

Wilfred avatar Wilfred commented on June 23, 2024

That's certainly helpful, because users can explicitly re-run a single test and set QUICKCHECK_TESTS to explore more test cases if they wish.

However, it doesn't meet the following usecases:

  • If I have a test that runs slowly, I might want to lower the number of test cases attempted
  • If I have a fast test and a large test case space (so my tests occasionally fail when doing TDD), I might want to increase the number of test cases attempted

In both of these cases, I want to change the number of test cases per test, and make a permanent change.

That's my usecase at least. If you think the current functionality is sufficient for quickcheck's goals, I understand.

from quickcheck.

remexre avatar remexre commented on June 23, 2024

It'd be "probably not too hard" to change the quickcheck! macro to allow a per-test #[quickcheck_tests = 1234] attribute as well; if you want to try that, feel free, otherwise I might play around with it if I have a free weekend.

from quickcheck.

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.