Git Product home page Git Product logo

Comments (10)

ysusuk avatar ysusuk commented on June 8, 2024

Hi guys,
can you pls elaborate on this a bit? I am happy to help!

from testz.

jdegoes avatar jdegoes commented on June 8, 2024

@ysusuk I think the main tasks are:

  1. Import over scalaprops into this library, since Kenji has donated it to Scalaz 8 (we should take care to preserve copyright notice and credit).
  2. Port features from Scala Hedgehog into the imported scalaprops, but remove dependency on Scalaz type classes.

In the end, the interface will be similar to scalaprops, but with "free shrinking".

Then separate tickets can add other features like "free mutations", etc.

from testz.

edmundnoble avatar edmundnoble commented on June 8, 2024

I don't exactly want to do what hedgehog does. I'd much prefer to generate data in order of increasing size, so that we never have to shrink at all.

from testz.

jdegoes avatar jdegoes commented on June 8, 2024

Because there are infinitely many examples at any size, even if you generate examples with increasing size, if you find a failure, it’s still very likely you can minimize it. I.e. the fact you generated with increasing size does not lower the odds you can shrink failures.

from testz.

edmundnoble avatar edmundnoble commented on June 8, 2024

Right, agreed up to a point. Shrinking is necessary, but I do think it will certainly lower the odds that we need to shrink a lot.

from testz.

ktonga avatar ktonga commented on June 8, 2024

Hey guys, @charleso and I are thinking about resuming the work on the scala port and I thought we could use some input from you so all the work done can be shared with testz. The general idea would be to design it in a way that it exposes a few core building blocks to be combined as required instead of trying to solve the whole thing ala framework.

From a chat with Ed we have:

I do like shrinking, but I'd also like to have generators generate in a way which gradually increases data size
And I'd like all tests to begin with the same seed
Tweakable, but by default all the same seed

And I think @alexknvl might have something to say too

from testz.

charleso avatar charleso commented on June 8, 2024

Just for context, I was the one who hacked together scala-hedgehog in a weekend, and it was an exact 1:1 with the current haskell-hedgehog API (which led to all sorts of fun type-inference problems with the monad transformers). Just in case you haven't seen it there is also sonic which was done around the same time, but I haven't spoken to the author at all.

EDIT: I haven't touched scala-hedgehog since that first weekend

From my perspective I don't really see the value in having multiple versions of the same concept (in particular "free shrinking"). Or at least I won't personally be putting any more effort there if there is more effort/focus elsewhere. I would happily push to delete scala-hedgehog (or perhaps redirect here) if it achieves the same goal.

Please let me know if there's anything I can do to help.

from testz.

charleso avatar charleso commented on June 8, 2024

@edmundnoble Apologies if you already know all of the context for Hedgehog, but Jacob who started the library did an excellent talk last year about it.

https://www.youtube.com/watch?v=AIv_9T0xKEo

from testz.

dwijnand avatar dwijnand commented on June 8, 2024

Why not more simply provide the necessary (if any) support to ergonomically use scala-hedgehog with testz?

With regards to tweaking the generation strategy perhaps that could be a feature request for scala-hedgehog.

from testz.

sideeffffect avatar sideeffffect commented on June 8, 2024

there's also another approach: validity
this article compares it with QuickCheck and Hedgehog: QuickCheck, Hedgehog, Validity.

from testz.

Related Issues (8)

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.