Skip to content

Commit 84e39dd

Browse files
committed
Adding intial documenation draft
1 parent ba4fa75 commit 84e39dd

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

.npmignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
.vscode/
33
*.DS_Store
44
.github/
5+
docs/
56
lib/
67
local/
78
test/

docs/index.md

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Just-API
2+
3+
Just-API is a robust, specification based API testing framework running on [node.js](http://nodejs.org/). Just-API takes API test specification from YAML files and runs them either in serial mode or in parallel mode as instructed by the user. Just-API reports errors and test results in several formats including HTML and JSON.
4+
Just-API allows users to test APIs without writing code.
5+
6+
7+
[![Join the chat at https://gitter.im/just-api/Lobby](https://badges.gitter.im/just-api/Lobby.svg)](https://gitter.im/just-api/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
8+
9+
10+
## Table of Contents
11+
12+
<!-- toc -->
13+
14+
- [Installation](#installation)
15+
- [Getting Started](#getting-started)
16+
17+
<!-- tocstop -->
18+
19+
## Installation
20+
21+
Install with [npm](https://npmjs.org):
22+
23+
```sh
24+
$ npm install just-api
25+
```
26+
27+
>To run Mocha, you will need Node.js v7.10.0 or newer.
28+
29+
30+
## Getting Started
31+
32+
```
33+
$ npm install just-api
34+
$ mkdir specs
35+
$ $EDITOR specs/starwars_service.yml # or open with your preferred editor
36+
```
37+
38+
In your editor (make sure yaml is properly indented)
39+
40+
```yaml
41+
meta:
42+
name: StarWars suite
43+
configuration:
44+
scheme: https
45+
host: swapi.co
46+
base_path: /api
47+
specs:
48+
- name: get "Luke Skywalker" info
49+
request:
50+
path: /people/1/
51+
method: get
52+
response:
53+
status_code: 200
54+
json_data:
55+
- path: $.name
56+
value: Luke Skywalker
57+
```
58+
59+
Back in the terminal
60+
61+
```
62+
$ ./node_modules/.bin/just-api
63+
64+
✓ get Luke Skywalker info (1516ms)
65+
66+
Done: specs/suite.yml (Passed)
67+
68+
0 skipped, 0 failed, 1 passed (1 tests)
69+
0 skipped, 0 failed, 1 passed (1 suites)
70+
Duration: 1.6s
71+
```
72+
73+

0 commit comments

Comments
 (0)