A fuzzer for testing. This implements mutation fuzzing, in which an expect input is mutated (changed) many times in order to trigger unexpected behavior or crashes.
npm install fuzzer
Generate a mutated version of an object. This does not modify the object directly, but returns a modified copy. This mutation will increment and decrement numbers, randomize arrays, remove properties, and more.
Generate a mutated version of a string, with reversed, removed, and added characters.
Seed the random number generator random-js
that determines mutations.
By calling this function with the same number, you can generate the same
mutations consistently.
If you install this globally it provides a single cli utility called fuzz-get
.
npm install -g fuzzer
fuzz-get "./bin/fuzz-get "http://localhost:8889/foo/bar/your/rest/api"
This will run mutated requests against your server continously - it will mutate the path requested into other incorrect requests, and log in the form:
HTTP200:/foo/bar/your/rest/api
HTTP404:/foo/baryour/rest/api
So you can pipe into | grep "HTTP500"
if you wish.
var test = require('tap').test,
fuzzer = require('fuzzer');
fuzzer.seed(0);
test('something', function(t) {
var generator = fuzzer.mutate.object(yourTestingInput);
for (var i = 0; i < 1000; i++) {
t.doesNotThrow(function() {
yourLibrary(generator());
});
}
});
fuzzer's People
Forkers
fgcarto xkwangy victorb mikeralphson iamspid3r ltoscano testbigorg jdrew1303 paulvollmer magnologan rubythonode shuixi2013 0-ali pgoudreau isabella232fuzzer's Issues
seed by default
write test-regenerate code
small changes change all tests. should automate this
fuzz xml
this would be super useful for togeojson. not sure if this should be clientside only - it should probably use treewalker or something.
string fuzzing
Will the fuzzer ever test for integer overflow?
If I understand your source correctly overflows will not be checked for, since values are updated by adding
a random number between -1000 and 1000 on copies of the original.
I think the fuzzer should randomly throw in values which might cause overflows in JavaScript or backend Java code. Maybe add a flag that makes sure it tries overflowng each number atleast once.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.