property-based-testing

Open-source projects categorized as property-based-testing Edit details

Top 23 property-based-testing Open-Source Projects

  • hypothesis

    Hypothesis is a powerful, flexible, and easy to use library for property-based testing.

    Project mention: Was muss man als nicht-technischer Quereinsteiger in Data Science *wirklich* können? | reddit.com/r/de_EDV | 2022-09-13
  • fast-check

    Property based testing framework for JavaScript (like QuickCheck) written in TypeScript

    Project mention: I Created an API to Generate Mock Information | reddit.com/r/node | 2022-08-09
  • talent.io

    Download talent.io’s Tech Salary Report. Median salaries, most in-demand technologies, state of the remote work... all you need to know your worth on the market by tech recruitment platform talent.io

  • functionaljava

    Functional programming in Java

    Project mention: How to write this (3) Java lines in a functional style? | reddit.com/r/functionalprogramming | 2022-06-21

    A few side-notes about this code: - you need some sort of "wrapper" or "container" in order to use functional methods like map/flatMap/filter/etc on some object - here I used Optionalfor testing because it's available in standard Java: Optional describes an object that may or may not be available. - A more suitable "wrapper" for this use-case could have been Try which describes the result of an execution that may succeed or fail, see vavr has a Try for example, functionaljava has Either - map transforms A -> B (would make sense for your mapToUser) whereas flatMap transforms A -> Optional (or whichever "wrapper", would make sense for your userService.save if suppose the saving operation can fail) - Here is a working example for you :) - practise exercises: 1- replace the "wrapper" Optional with List, there is almost no change of code, this now gives you the ability to process lists of users 2- import vavr and replace the "wrapper" Optional with Try, there is almost no change of code, this now gives you the ability to process operations that may fail - Enjoy functional programming, you'll find java is rather verbose and quickly gets clunky for FP, consider switching to another language

  • Schemathesis

    Run thousands of randomly generated test scenarios based on your API specification and always be sure your API works as expected.

    Project mention: API-first development maturity framework | dev.to | 2022-09-06

    In this approach, you produce an API specification first, then you build the API against the specification, and then you validate your implementation against the specification using automated API testing tools. This is the most reliable approach for building API servers, since it’s the only one that holds the server accountable and validates the implementation against the source of truth. Unfortunately, this approach isn’t as common as it should be. One of the reasons why it isn’t so common is because it requires you to produce the API specification first, which, as we saw earlier, puts off many developers who don’t know how to work with OpenAPI. However, like I said before, generating OpenAPI specifications doesn’t need to be painful since you can use tools for that. In this approach, you use automated API testing tools to validate your implementation. Tools like Dredd and schemathesis. These tools work by parsing your API specification and automatically generating tests that ensure your implementation complies with the specification. They look at every aspect of your API implementation, including use of headers, status codes, compliance with schemas, and so on. The most advanced of these tools at the moment is schemathesis, which I highly encourage you to check out.

  • SwiftCheck

    QuickCheck for Swift

  • junit-quickcheck

    Property-based testing, JUnit-style

    Project mention: Coding Challenge | reddit.com/r/functionalprogramming | 2022-03-23

    Thank you for the insightful reply. I did struggle to convert the original algorithm I wrote (with while loops / continue / break) to a more functional style using unfold, and also faced an issue with the type signatures when I tried to break down the contents of Stream.unfoldRight to multiple functions, which is reflected to the messy state you mentioned. Regarding property based testing, I used junit-quickcheck and the "symmetry" property check was one I meant to write but wasn't quite sure how to create a generator for it. I created an issue to track my attempt to incorporate your suggestions in case you are interested in following this. Thanks again!

  • StreamData

    Data generation and property-based testing for Elixir. 🔮

  • Scout APM

    Truly a developer’s best friend. Scout APM is great for developers who want to find and fix performance issues in their applications. With Scout, we'll take care of the bugs so you can focus on building great things 🚀.

  • deepstate

    A unit test-like interface for fuzzing and symbolic execution

  • Norm

    Data specification and generation

    Project mention: Pattern matching and guards as a form of natural type specification? | reddit.com/r/elixir | 2022-01-24

    Forget the typespecs. Have a boundary layer where you check the shape of things and their types as they enter your system and possibly convert them to some type you need inside your system. Norm is great for this.

  • hedgehog

    Release with confidence, state-of-the-art property testing for Haskell.

    Project mention: Monthly Hask Anything (May 2022) | reddit.com/r/haskell | 2022-05-03

    I've had some PRs open on hedgehog for one and two months respectively. It looks like the maintainer isn't currently very active, which is fair enough. This isn't about criticizing him, and I'm not trying to take over the repo.

  • Expecto

    A smooth testing lib for F#. APIs made for humans! Strong testing methodologies for everyone!

    Project mention: Das.Test - an opinionated unit testing library written in F# for F# | reddit.com/r/fsharp | 2022-02-06

    Beside, did you try Expecto? https://github.com/haf/expecto

  • gopter

    GOlang Property TestER

    Project mention: Property-Based Testing In Go | dev.to | 2022-01-12

    But others have found more ways to use this paradigm. If you want to learn more about property-based testing, then gopter, the GOlang Property TestER, is worth taking a look at. Amir Saeid, who’s good at this technique, recommends this book full of examples, and this blog.

  • JQF

    JQF + Zest: Coverage-guided semantic fuzzing for Java.

    Project mention: GitHub Copilot for JetBrains and Neovim | news.ycombinator.com | 2021-10-27

    QuickcCheck-type tools (generators for tests that know about the edge cases of a domain - e. g. for the domain of numbers considering things like 0, the infinities, various almost-and-just-over powers of two, NaN and mantissas for floats, etc.):

    * QuickCheck: https://hackage.haskell.org/package/QuickCheck

    * Hypothesis: https://hypothesis.readthedocs.io/en/latest/

    * JUnit QuickCheck: https://github.com/pholser/junit-quickcheck

    Fuzz testing tools (tools which mutate the inputs to a program in order to find interesting / failing states in that program). Generally paired with code coverage:

    * American Fuzzy Lop (AFL): https://github.com/google/AFL

    * JQF: https://github.com/rohanpadhye/JQF

    Mutation / Fault based test tools (review your existing unit coverage and try to introduce changes to your _production_ code that none of your tests catch)

    * PITest: https://pitest.org/

  • Deal

    Design by contract for Python. Write bug-free code. Add a few decorators, get static analysis and tests for free.

    Project mention: deal: Design by contract for Python. Write bug-free code. Add a few decorators, get static analysis and tests for free. | reddit.com/r/pythoncoding | 2022-05-26
  • elixir-type_check

    TypeCheck: Fast and flexible runtime type-checking for your Elixir projects.

    Project mention: What is the Elixir language used for ? | reddit.com/r/programming | 2022-07-04

    Because Elixir has TypeScript types build in. It has strong types in runtime. 42 != "42", try doing this in TypeScript. Plus there's a library for runtime type checking. https://github.com/Qqwy/elixir-type_check

  • fuzzcheck-rs

    Modular, structure-aware, and feedback-driven fuzzing engine for Rust functions

    Project mention: Fuzzcheck (a structure-aware Rust fuzzer) | reddit.com/r/rust | 2022-02-26

    Fuzzcheck is a structure-aware fuzzer for rust. "Fuzzing" means feeding large amounts of data into a program and checking for crashes (Fuzzcheck also checks to make sure that all the properties your program should uphold – e.g. a sorting algorithm applied to a list of n items should always return a list of n items – are upheld). Fuzzcheck is an "evolutionary" fuzzer – this means that it generates a set of random inputs, sees what percentage of the program is executed for each input, and keeps inputs which have high levels of percentage of program executed. It then "mutates" these inputs – whereas fuzzers such as AFL/Hongfuzz/etc mutate raw bytes in place (e.g. they swap bytes at different positions, or insert a random byte at a given position to generate inputs similar to the chosen "high coverage" inputs), Fuzzcheck works directly on the Rust types (so it might swap the order of two items in a vec, or randomly insert a new item). It's a really powerful tool for finding lots of bugs.

  • scalaprops

    property based testing library for Scala

  • fsharp-hedgehog

    Release with confidence, state-of-the-art property testing for .NET.

  • Nyaya

    Random Data Generation and/or Property Testing in Scala & Scala.JS.

  • smallcheck

    Test your Haskell code by exhaustively checking its properties

    Project mention: [ANN] LeanCheck v1.0.0 – Enumerative Property Testing | reddit.com/r/haskell | 2022-08-22

    Could you compare with https://hackage.haskell.org/package/smallcheck in particular the smallcheck ability "to verify properties for all test cases up to some depth"?

  • fitspec

    refine properties for testing Haskell programs

  • jsf

    Creates fake JSON files from a JSON schema

  • leancheck

    enumerative property-based testing for Haskell

    Project mention: [ANN] LeanCheck v1.0.0 – Enumerative Property Testing | reddit.com/r/haskell | 2022-08-22

    You can take a look at the following section of LeanCheck's FAQ:

  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2022-09-13.

property-based-testing related posts

Index

What are some of the best open-source property-based-testing projects? This list will help you:

Project Stars
1 hypothesis 6,239
2 fast-check 3,236
3 functionaljava 1,528
4 Schemathesis 1,484
5 SwiftCheck 1,388
6 junit-quickcheck 910
7 StreamData 734
8 deepstate 716
9 Norm 658
10 hedgehog 635
11 Expecto 579
12 gopter 534
13 JQF 494
14 Deal 446
15 elixir-type_check 423
16 fuzzcheck-rs 389
17 scalaprops 272
18 fsharp-hedgehog 238
19 Nyaya 183
20 smallcheck 126
21 fitspec 73
22 jsf 73
23 leancheck 41
Find remote jobs at our new job board 99remotejobs.com. There are 8 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.
Build time-series-based applications quickly and at scale.
InfluxDB is the Time Series Data Platform where developers build real-time applications for analytics, IoT and cloud-native services in less time with less code.
www.influxdata.com