# swagger-tester

> Swagger testing framework and command-line tool

Latest version **1.1.3** (published 2016-01-14) · MIT license · 0 weekly downloads

## Install

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

Provides the command `swagger-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.3 |
| Published | 2016-01-14 |
| First published | 2015-12-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| Author | Sergey Yarotskiy |
| Maintainers | metasergey |
| Keywords | swagger, test, documentation, tester, api |

## Links

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

## Dependencies (8)

- [co](https://npm.io/package/co.md) ^4.6.0
- [co-fs](https://npm.io/package/co-fs.md) ^1.2.0
- [colors](https://npm.io/package/colors.md) ^1.1.2
- [lodash](https://npm.io/package/lodash.md) ^3.10.1
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [json-refs](https://npm.io/package/json-refs.md) ^1.3.0
- [co-request](https://npm.io/package/co-request.md) ^1.0.0
- [request-debug](https://npm.io/package/request-debug.md) ^0.2.0

## 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.3 (latest) — 2016-01-14
- 1.1.2 — 2016-01-13
- 1.1.1 — 2016-01-12
- 1.1.0 — 2016-01-12
- 1.0.1 — 2015-12-24
- 1.0.0 — 2015-12-24
- 0.0.1 — 2015-12-23

## README

# swagger-tester

A framework for testing your swagger 2.0 specifications. 
Easily can be used as an additional step in Continious Integration.
This module is a command line tool. It exits with code 1 if any of the tests fails. And code 0 if all fine.  

## Installation
`npm install -g swagger-tester`

## Usage
`node swagger-tester --specs=./swagger.json --tests=./examples/tests`

You will need to provide command line arguments: 
* [Required] Swagger specification file with `--specs` option. Valid options are:
  * any http or https remote file: `https://somebucket.s3.amazonaws.com/somePublicSpecs.json`  
  * any absolute path: `/opt/projects/swagger.json`
  * any relative path: `../../specs.json`
* [Required] Path to file or folder with tests with `--tests <path>` option:
  * `../tests/`
  * `tests/myapi.js` 
* [Optional] Server base url including api version (if any) with `--server <your server url>`. This, if specified, will override corresponding values in specification. 
   * `https://api.server.com/v2` 

## Tests
For tests examples take a look into examples folder.  
 
## Notes 
At the moment only NO SECURITY and JWT SECURITY supported. So you will have to provide api token if you are using JWT. 
Add `--token=<JWT TOKEN HERE>` option when launching app to specify token.

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