1- Automated testing tool based on RAML-0.8
2-
31# Abao
42
3+ RAML-based automated testing tool
4+
55[ ![ Build Status] [ Travis-Abao-badge ]] [ Travis-Abao ]
6- [ ![ Dependency Status] [ David -AbaoDep-badge]] [ David -AbaoDep]
7- [ ![ devDependency Status] [ David -AbaoDevDep-badge]] [ David -AbaoDevDep]
6+ [ ![ Dependency Status] [ DavidDM -AbaoDep-badge]] [ DavidDM -AbaoDep]
7+ [ ![ devDependency Status] [ DavidDM -AbaoDevDep-badge]] [ DavidDM -AbaoDevDep]
88[ ![ Coverage Status] [ Coveralls-Abao-badge ]] [ Coveralls-Abao ]
99[ ![ Gitter] [ Gitter-Abao-badge ]] [ Gitter-Abao ]
1010[ ![ CII Best Practices] [ BestPractices-Abao-badge ]] [ BestPractices-Abao ]
@@ -20,13 +20,13 @@ is valid or not.
2020
2121## Features
2222
23- - Verify that each endpoint defined in RAML exists in service
24- - Verify that URL params for each endpoint defined in RAML are supported in service
25- - Verify that the required query parameters defined in RAML are supported in service
26- - Verify that HTTP request headers for each endpoint defined in RAML are supported in service
27- - Verify that HTTP request body for each endpoint defined in RAML is supported in service, via [ JSONSchema] [ ] validation
28- - Verify that HTTP response headers for each endpoint defined in RAML are supported in service
29- - Verify that HTTP response body for each endpoint defined in RAML is supported in service, via [ JSONSchema] [ ] validation
23+ * Verify that each endpoint defined in RAML exists in service
24+ * Verify that URL params for each endpoint defined in RAML are supported in service
25+ * Verify that the required query parameters defined in RAML are supported in service
26+ * Verify that HTTP request headers for each endpoint defined in RAML are supported in service
27+ * Verify that HTTP request body for each endpoint defined in RAML is supported in service, via [ JSONSchema] [ ] validation
28+ * Verify that HTTP response headers for each endpoint defined in RAML are supported in service
29+ * Verify that HTTP response body for each endpoint defined in RAML is supported in service, via [ JSONSchema] [ ] validation
3030
3131## RAML Support
3232
@@ -93,12 +93,12 @@ the RAML. You can print a list of the generated names with the `--names` flag.
9393
9494### Example
9595
96- The RAML file used in the examples below can be found [ here] ( ../master/test/fixtures/single-get .raml ) .
96+ The RAML file used in the examples below can be found [ here] ( ../master/test/fixtures/machines-single_get .raml ) .
9797
9898Get Names:
9999
100100``` bash
101- $ abao single-get .raml --names
101+ $ abao machines-single_get .raml --names
102102GET /machines -> 200
103103```
104104
@@ -108,7 +108,7 @@ response code for each path.
108108``` bash
109109$ ABAO_HOME=" /path/to/node_modules/abao"
110110$ TEMPLATE=" ${ABAO_HOME} /templates/hookfile.js"
111- $ abao single-get .raml --generate-hooks --template=" ${TEMPLATE} " > test_machines_hooks.js
111+ $ abao machines-single_get .raml --generate-hooks --template=" ${TEMPLATE} " > test_machines_hooks.js
112112
113113```
114114
@@ -155,7 +155,7 @@ after 'GET /machines -> 200', (test, done) ->
155155Run validation with * JavaScript* hookfile (from above):
156156
157157``` bash
158- $ abao single-get .raml --hookfiles=test_machines_hooks.js
158+ $ abao machines-single_get .raml --hookfiles=test_machines_hooks.js
159159```
160160
161161You can also specify what tests ** Abao** should skip:
@@ -208,24 +208,27 @@ test 'GET /machines -> 200', (response, body, done) ->
208208
209209### test.request
210210
211- - ` server ` - Server address, provided from command line.
212- - ` path ` - API endpoint path, parsed from RAML.
213- - ` method ` - HTTP method, parsed from RAML request method (e.g., ` get ` ).
214- - ` params ` - URI parameters, parsed from RAML request ` uriParameters ` [ default: ` {} ` ] .
215- - ` query ` - Object containing querystring values to be appended to the ` path ` ,parsed from RAML ` queryParameters ` section [ default: ` {} ` ] .
216- - ` headers ` - HTTP headers, parsed from RAML ` headers ` [ default: ` {} ` ] .
217- - ` body ` - Entity body for POST, PUT, and PATCH requests. Must be a JSON-serializable object. Parsed from RAML ` example ` [ default: ` {} ` ] .
211+ * ` server ` - Server address, provided by command line option or parsed from
212+ RAML ` baseUri ` .
213+ * ` path ` - API endpoint path, parsed from RAML.
214+ * ` method ` - HTTP method, parsed from RAML request method (e.g., ` get ` ).
215+ * ` params ` - URI parameters, parsed from RAML request ` uriParameters ` [ default: ` {} ` ] .
216+ * ` query ` - Object containing querystring values to be appended to the ` path ` .
217+ Parsed from RAML ` queryParameters ` section [ default: ` {} ` ] .
218+ * ` headers ` - HTTP headers, parsed from RAML ` headers ` [ default: ` {} ` ] .
219+ * ` body ` - Entity body for POST, PUT, and PATCH requests. Must be a
220+ JSON-serializable object. Parsed from RAML ` example ` [ default: ` {} ` ] .
218221
219222### test.response
220223
221- - ` status ` - Expected HTTP response code, parsed from RAML response status.
222- - ` schema ` - Expected schema of HTTP response body, parsed from RAML response ` schema ` .
223- - ` headers ` - Object containing HTTP response headers from server [ default: ` {} ` ] .
224- - ` body ` - HTTP response body (JSON-format) from server [ default: ` null ` ] .
224+ * ` status ` - Expected HTTP response code, parsed from RAML response status.
225+ * ` schema ` - Expected schema of HTTP response body, parsed from RAML response ` schema ` .
226+ * ` headers ` - Object containing HTTP response headers from server [ default: ` {} ` ] .
227+ * ` body ` - HTTP response body (JSON-format) from server [ default: ` null ` ] .
225228
226229## Command Line Options
227230
228- ```
231+ ``` console
229232Usage:
230233 abao </path/to/raml> [OPTIONS]
231234
@@ -273,6 +276,11 @@ $ npm test
273276** Abao** is always looking for new ideas to make the codebase useful.
274277If you think of something that would make life easier, please submit an issue.
275278
279+ ``` bash
280+ $ npm issues abao
281+ ```
282+
283+
276284[ // ] : # ( Cross reference section )
277285
278286[ RAML ] : https://raml.org/
@@ -285,10 +293,10 @@ If you think of something that would make life easier, please submit an issue.
285293
286294[ Travis-Abao ] : https://travis-ci.org/cybertk/abao/
287295[ Travis-Abao-badge ] : https://img.shields.io/travis/cybertk/abao.svg?style=flat
288- [ David -AbaoDep] : https://david-dm.org/cybertk/abao/
289- [ David -AbaoDep-badge] : https://david-dm.org/cybertk/abao/status.svg
290- [ David -AbaoDevDep] : https://david-dm.org/cybertk/abao?type=dev
291- [ David -AbaoDevDep-badge] : https://david-dm.org/cybertk/abao/dev-status.svg
296+ [ DavidDM -AbaoDep] : https://david-dm.org/cybertk/abao/
297+ [ DavidDM -AbaoDep-badge] : https://david-dm.org/cybertk/abao/status.svg
298+ [ DavidDM -AbaoDevDep] : https://david-dm.org/cybertk/abao?type=dev
299+ [ DavidDM -AbaoDevDep-badge] : https://david-dm.org/cybertk/abao/dev-status.svg
292300[ Coveralls-Abao ] : https://coveralls.io/r/cybertk/abao/
293301[ Coveralls-Abao-badge ] : https://img.shields.io/coveralls/cybertk/abao.svg
294302[ Gitter-Abao ] : https://gitter.im/cybertk/abao/
@@ -298,4 +306,3 @@ If you think of something that would make life easier, please submit an issue.
298306[ NPM-Abao ] : https://npmjs.org/package/abao/
299307[ NPM-Abao-badge ] : https://nodei.co/npm/abao.png?downloads=true&downloadRank=true&stars=true
300308
301-
0 commit comments