# swagger-api-tester

> Generates lightweight mocha smoke tests against HTTP APIs using swagger docs to inform validations.

Latest version **1.1.0** (published 2016-07-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install swagger-api-tester
pnpm add swagger-api-tester
yarn add swagger-api-tester
bun add swagger-api-tester
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2016-07-24 |
| First published | 2016-06-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 11 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | diosmosis |
| Maintainers | diosmosis2 |
| Keywords | swagger, mocha, smoke, test, REST, HTTP, API |

## Links

- npm: https://www.npmjs.com/package/swagger-api-tester
- Repository: https://github.com/diosmosis/swagger-api-tester
- Homepage: https://github.com/diosmosis/swagger-api-tester#readme
- Issues: https://github.com/diosmosis/swagger-api-tester/issues
- npm.io page: https://npm.io/package/swagger-api-tester

## Dependencies (11)

- [chai](https://npm.io/package/chai.md) ^3.5.0
- [mocha](https://npm.io/package/mocha.md) ^2.5.3
- [eslint](https://npm.io/package/eslint.md) ^2.13.1
- [co-mocha](https://npm.io/package/co-mocha.md) ^1.1.2
- [valid-url](https://npm.io/package/valid-url.md) ^1.0.9
- [swagger-parser](https://npm.io/package/swagger-parser.md) ^4.0.0-beta.2
- [request-promise](https://npm.io/package/request-promise.md) ^3.0.0
- [swagger-validate](https://npm.io/package/swagger-validate.md) ^0.1.7
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ^1.9.2
- [swagger-model-validator](https://npm.io/package/swagger-model-validator.md) ^2.0.7
- [eslint-config-airbnb-base](https://npm.io/package/eslint-config-airbnb-base.md) ^3.0.1

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2016-07-24
- 1.0.4 — 2016-07-23
- 1.0.3 — 2016-06-24
- 1.0.2 — 2016-06-23
- 1.0.1 — 2016-06-23
- 1.0.0 — 2016-06-23

## README

[![Build Status](https://travis-ci.org/diosmosis/swagger-api-tester.svg?branch=master)](https://travis-ci.org/diosmosis/swagger-api-tester)

# swagger-api-tester

Create lightweight smoke tests against HTTP APIs using swagger docs to inform validations.

## Example

```
'use strict'

const Tester = require('swagger-api-tester')

describe('My API', function () {
  const test = new Tester('http://petstore.swagger.io/v2/swagger.json')

  test.post('/pet', pet).respondsWith(200, 'Pet')
  test.put('/pet', pet).respondsWith(200)

  test.get('/pet/20').respondsWith(200)
})
```

---
_Source: https://npm.io/package/swagger-api-tester · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
