From 58a868b8e80fb2b55423edd3f2eb0480add45d51 Mon Sep 17 00:00:00 2001 From: apidesigner Date: Fri, 26 May 2017 11:54:38 +0000 Subject: [PATCH] Updates api-testing-with-dredd/a.md Auto commit by GitBook Editor --- SUMMARY.md | 1 - api-testing-with-dredd/a.md | 67 +++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/SUMMARY.md b/SUMMARY.md index 0526de2..3cda007 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -48,7 +48,6 @@ * [API Clients](clients/README.md) * [Loose Coupling](clients/loose-coupling.md) * [Miscellaneous](miscellaneous.md) -* [Guides](guides.md) * [Guides](api-testing-with-dredd.md) * [API Testing with Dredd](api-testing-with-dredd/a.md) * [Acknowledgements](acknowledgements.md) diff --git a/api-testing-with-dredd/a.md b/api-testing-with-dredd/a.md index e69de29..2f96930 100644 --- a/api-testing-with-dredd/a.md +++ b/api-testing-with-dredd/a.md @@ -0,0 +1,67 @@ +# API Testing with Dredd + +1. Ruby + + ``` + $ ruby -v + ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16] + ``` + +2. Node.js + + ``` + $ node -v + v7.5.0 + ``` + +3. Install Apiary CLI + + ``` + $ gem install apiaryio + ``` + + ``` + $ apiary version + 0.8.0 + ``` + + +4. Install Dredd + + ``` + $ npm install -g dredd@stable --no-optional + ``` + + ``` + $ dredd --version + dredd v2.2.5 (Darwin 16.4.0; x64) + ``` + +5. Fetch API Description (Swagger) from Apiary + + + + + + ``` + $ APIARY_API_KEY= apiary fetch --api-name="" --output="swagger.yaml" + ``` + + EXAMPLE: `API_NAME=bomapi3`, `APIARY_API_KEY=122131212121212112` + + +6. Run Tests + + ``` + $ dredd swagger.yaml + ``` + + EXAMPLE: `HOST=deheremap7336.emea.adsint.biz:8004` + +7. Run Tests (The preferred alternative connected to Apiary) + + NOTE: You have to have a `dredd.yml` generated before hand: `$ dredd init -r apiary -j apiaryApiKey: -j apiaryApiName:`. + + ``` + $ dredd + ``` \ No newline at end of file