JQF
fast-check
JQF | fast-check | |
---|---|---|
3 | 21 | |
629 | 4,107 | |
- | - | |
6.3 | 9.8 | |
7 months ago | 3 days ago | |
Java | TypeScript | |
BSD 2-clause "Simplified" License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
JQF
-
CS 6120: Advanced Compilers: The Self-Guided Online Course
We are working on projects related with cybersecurity and compilers. A reference we look at is [1] and [2]. I think we can publish the results in the coming months.
[1] https://github.com/rohanpadhye/jqf/wiki/Fuzzing-a-Compiler
[2] https://news.ycombinator.com/item?id=36373410
-
GitHub Copilot for JetBrains and Neovim
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/
-
Jazzer brings modern fuzz testing to the JVM
If you are interested in fuzzing your Java code, you should also have a look at the JQF project which directly integrates with junit tests: https://github.com/rohanpadhye/JQF
fast-check
-
The 5 principles of Unit Testing
Libraries like JSVerify or Fast-Check offer essential tools to facilitate property-based testing.
-
How to Survive Your Project's First 100k Lines
Strong agree!
For JavaScript, I suggest folks check out fast-check [0] and this introduction to property-based testing that uses fast-check [1].
This is broadly useful, but one specific place I've found it helpful was to check redux reducers against generated lists of actions to find unchecked edge cases and data assumptions.
[0] https://github.com/dubzzz/fast-check
-
Master property-based testing in JavaScript: A step-by-step tutorial
Brilliant, this is a massive improvement. Previously I was fumbling around in https://github.com/dubzzz/fast-check/tree/main/packages/fast-check/documentation for info.
- Bring the power of property based testing framework fast-check into Vitest
-
[AskJS] Should I be generating random data for parameters when unit testing?
There's a library for exactly that: FastCheck.
-
Integrate Jest and fast-check together
It makes @fast-check/jest, the best option to integrate Jest and fast-check, as it provides an abstraction over both to ease their mutual integration.
- I Created an API to Generate Mock Information
-
Generating dummy entities with random data for tests based on types
The closest that I know of (and I have not used this) is zod-fast-check. It generates fast-check “arbitraries” (test data generators) for property-based testing based on zod schemas. Of course, this requires that you use zod to define your types, which has some downsides. Fortunately there is another tool, ts-to-zod, (which I also have not used) which will codegen zod schemas based on TS type definitions. If you thread these four libraries together you should end up with the ability to write random tests on generated data with very little overhead. In theory.
-
Best practice where to test validation?
For something like this, I might break out fast-check for testing. It’s good at generating a wide range of values for a given type, and could help you get good test coverage without having to hand-author a lot of repetitive error inputs.
- Fast-check: How it works
What are some alternatives?
jqwik - Property-Based Testing on the JUnit Platform
Unexpected - Unexpected - the extensible BDD assertion toolkit
junit-quickcheck - Property-based testing, JUnit-style
jest - Delightful JavaScript Testing.
fuzzing - Tutorials, examples, discussions, research proposals, and other resources related to fuzzing
tape - tap-producing test harness for node and browsers
copilot-docs - Documentation for GitHub Copilot
trevor - 🚦 Your own mini Travis CI to run tests locally
fuzzcheck-rs - Modular, structure-aware, and feedback-driven fuzzing engine for Rust functions
test-each - 🤖 Repeat tests. Repeat tests. Repeat tests.
copilot.vim - Neovim plugin for GitHub Copilot
nyc - the Istanbul command line interface