Skip to content
On this page

Empower Your Test Results with AI-Powered Insights ->

fuzz

Creates an instance to fuzz object that supports to build invalid requests.

Syntax

js
fuzz()

API

MethodDescription
onSwaggerswagger json url
withHeadersadditional headers to be passed
withBatchSizeno. of requests to be sent in parallel
useInteractionmock interactions to be added
inspectprints request & response details
toss (optional)runs all specs & returns a promise

Usage

โœ… Correct Usage

js
// url to the swagger json
await fuzz()
  .onSwagger('/api/swagger.json');
js
// with authentication
await fuzz()
  .onSwagger('/api/swagger.json')
  .withHeaders('Authorization', 'Basic abc');

Notes

Under the hood, it uses openapi-fuzzer-core to generate requests & it partially supports swagger v2 open-api specification.

See Also

Released under the MIT License.