PBT

Dev tools

property-based testing library

SHOW HN2024

196points
33comments
#404of 3,515 in 2024
Top 12%of 2024 by points

How HN took it

CuriousMostly questions and neutral comments

3 positive, 8 neutral or asking, 1 mixed, 1 critical, out of 13 comments about the project. Thread score +0.15.

Execution: 2 for, 0 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Useful, clean work welcomed as an effort toward PBT in Ruby

    From 3 comments
    • Great work, looks really clean! Check out Minithesis [1] and the paper explaining internal shrinking [2]. It will strongly improve your library's shrinking capabilities and…
      hdjrkaofbdjwm on HN
    • Amazing work ! Happy to see any effort towards PBT.
      lijok on HN
    • Amazing work ! Happy to see any effort towards PBT.
      lijok on HN
  • Excited to see Ractor support

    From 1 comment
    • Excited to see libraries using Ractors as somebody who has also fallen in love with them ♡
      Lammy on HN

Objections

  • Saved seed-based cases break when generator order changes

    From 2 comments
    • (not OP but I would be surprised if the answer wasn't) yes, because you're changing the order in which the random draws are interpreted. But this isn't a problem in practice…
      tybug on HN
    • So, this means refactoring becomes potentially difficult. While the gem is still a great accomplishment and very useful, I'd have to engineer my way around this issue before…
      parentheses on HN
  • Possible slowdown of test suites

    From 1 comment
    • Very cool. Wonder how much time this adds to a test suite as you incorporate it more. Might need to have some different test targets to keep things fast.
      mberning on HN

Requests

  • Integration with Rails models

    From 1 comment
    • Interesting! I wonder how this could be applied to a Rails project (since that's what ruby is most used for). For example how would it know to test a wide selection of possible…
      jack_riminton on HN
  • Save failing examples to a file

    From 1 comment
    • So, this means refactoring becomes potentially difficult. While the gem is still a great accomplishment and very useful, I'd have to engineer my way around this issue before…
      parentheses on HN
  • Type support from RBS or Sorbet

    From 1 comment
    • Lovely stuff, thank you. It would be cool if we could eventually make use of RBS or inline Sorbet or something better than both to get the types for property testing for free.
      Lio on HN

Questions

  • Can it run alongside RSpec

    From 1 comment
    • Can this be used alongside rspec? Like have these be tests that are included in the rspec test run, and have the results alongside your other rspec tests?
      cortesoft on HN
  • How PBT handles Rails model data generation

    From 1 comment
    • Interesting! I wonder how this could be applied to a Rails project (since that's what ruby is most used for). For example how would it know to test a wide selection of possible…
      jack_riminton on HN

Alternatives named

  • Minithesis

    From 1 comment
    • Great work, looks really clean! Check out Minithesis [1] and the paper explaining internal shrinking [2]. It will strongly improve your library's shrinking capabilities and…
      hdjrkaofbdjwm on HN
  • fast-check

    From 1 comment
    • It's very basic content though, here's the slides of my presentation at RubyKaigi 2024. This also includes the PBT gems's explanations.…
      ohbarye on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/40441093)