All Projects → jeffersonmourak → jest-fuzz

jeffersonmourak / jest-fuzz

Licence: MIT license
Fuzz testing for jest

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to jest-fuzz

Aflplusplus
The fuzzer afl++ is afl with community patches, qemu 5.1 upgrade, collision-free coverage, enhanced laf-intel & redqueen, AFLfast++ power schedules, MOpt mutators, unicorn_mode, and a lot more!
Stars: ✭ 2,319 (+9562.5%)
Mutual labels:  fuzzing, fuzz-testing
Sharpfuzz
AFL-based fuzz testing for .NET
Stars: ✭ 185 (+670.83%)
Mutual labels:  fuzzing, fuzz-testing
Snodge
Randomly mutate JSON, XML, HTML forms, text and binary data for fuzz testing
Stars: ✭ 121 (+404.17%)
Mutual labels:  fuzzing, fuzz-testing
Awesome Directed Fuzzing
A curated list of awesome directed fuzzing research papers
Stars: ✭ 77 (+220.83%)
Mutual labels:  fuzzing, fuzz-testing
Trophy Case
🏆 Collection of bugs uncovered by fuzzing Rust code
Stars: ✭ 225 (+837.5%)
Mutual labels:  fuzzing, fuzz-testing
Test Each
🤖 Repeat tests. Repeat tests. Repeat tests.
Stars: ✭ 89 (+270.83%)
Mutual labels:  fuzzing, fuzz-testing
Pythonfuzz
coverage guided fuzz testing for python
Stars: ✭ 175 (+629.17%)
Mutual labels:  fuzzing, fuzz-testing
Example Go
Go Fuzzit Example
Stars: ✭ 39 (+62.5%)
Mutual labels:  fuzzing, fuzz-testing
Honggfuzz Rs
Fuzz your Rust code with Google-developed Honggfuzz !
Stars: ✭ 222 (+825%)
Mutual labels:  fuzzing, fuzz-testing
Fuzzit
CLI to integrate continuous fuzzing with Fuzzit
Stars: ✭ 220 (+816.67%)
Mutual labels:  fuzzing, fuzz-testing
Book
📖 Guides and tutorials on how to fuzz Rust code
Stars: ✭ 67 (+179.17%)
Mutual labels:  fuzzing, fuzz-testing
Grizzly
A cross-platform browser fuzzing framework
Stars: ✭ 234 (+875%)
Mutual labels:  fuzzing, fuzz-testing
Burpsuite Collections
BurpSuite收集:包括不限于 Burp 文章、破解版、插件(非BApp Store)、汉化等相关教程,欢迎添砖加瓦---burpsuite-pro burpsuite-extender burpsuite cracked-version hackbar hacktools fuzzing fuzz-testing burp-plugin burp-extensions bapp-store brute-force-attacks brute-force-passwords waf sqlmap jar
Stars: ✭ 1,081 (+4404.17%)
Mutual labels:  fuzzing, fuzz-testing
Ansvif
A Not So Very Intelligent Fuzzer: An advanced fuzzing framework designed to find vulnerabilities in C/C++ code.
Stars: ✭ 107 (+345.83%)
Mutual labels:  fuzzing, fuzz-testing
Afl.rs
🐇 Fuzzing Rust code with American Fuzzy Lop
Stars: ✭ 1,013 (+4120.83%)
Mutual labels:  fuzzing, fuzz-testing
Libdiffuzz
Custom memory allocator that helps discover reads from uninitialized memory
Stars: ✭ 147 (+512.5%)
Mutual labels:  fuzzing, fuzz-testing
Oss Fuzz
OSS-Fuzz - continuous fuzzing for open source software.
Stars: ✭ 6,937 (+28804.17%)
Mutual labels:  fuzzing, fuzz-testing
Fuzzingpaper
Recent Fuzzing Paper
Stars: ✭ 773 (+3120.83%)
Mutual labels:  fuzzing, fuzz-testing
Javafuzz
coverage guided fuzz testing for java
Stars: ✭ 193 (+704.17%)
Mutual labels:  fuzzing, fuzz-testing
Certfuzz
This project contains the source code for the CERT Basic Fuzzing Framework (BFF) and the CERT Failure Observation Engine (FOE).
Stars: ✭ 233 (+870.83%)
Mutual labels:  fuzzing, fuzz-testing

jest-fuzz

Fuzz testing for jest

Installing

use your favorite package manager

$ yarn add jest-fuzz $ npm install jest-fuzz

Using

Import the test suite in your test code.

const Fuzz = require('jest-fuzz');

...

Creating a test

First of all, you need to use the Fuzz.test instead of Jest's test and what's the difference? Basically Fuzz.test create a wrap to all random data that it will generate for your code.

Now, this is how a test has to will be described.

Fuzz.test("Name", Fuzzer, (data) => {
 //expectations
}

where,

  • Name -> String representing the name of this suite
  • Fuzzer -> A fuzzer function that you can see below
  • Callback (data) -> This callback is where your tests will be, and the data param is a random data to your test.

Fuzzers

Fuzzers are the data representation of what you need to test.

for example, if you have a function that needs a string, you can use Fuzz.string() also, pass the parameters for this string.

these are the built-in fuzzers

Fuzzer Options
Fuzz.string { length: Int (default=125), sufix: String (default=''), prefix: String (default='') }
Fuzz.int { Min: Int (default=-Infinity), max: Int (default=Infinity) }
Fuzz.float { Min: Int (default=-Infinity), max: Int (default=Infinity) }
Fuzz.bool
Fuzz.array { type: Fuzzer (default=Int), length: Int (default=300), minLength: Int (default=1) }

Creating a custom fuzzer

The custom fuzzer is a way to represent an object or other complex data.

To create you simply need to use the Fuzz.Fuzzer function

const exampleFuzzer = Fuzz.Fuzzer({
    method1: Fuzz.string(),
    method2: Fuzz.int()
});

Fuzz.test("My example", exampleFuzzer(), data => {
    // Test data.
}

Fuzz.it("My example", exampleFuzzer(), data => {
    // Test data.
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].