From 553f891665f467b82cd50ac6506d700faf1f35ba Mon Sep 17 00:00:00 2001 From: Robert Wallach Date: Tue, 20 Feb 2018 12:56:35 -0600 Subject: [PATCH] Update contract-testing.md --- articles/testing/contract-testing.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/articles/testing/contract-testing.md b/articles/testing/contract-testing.md index 16666e8..1f8fc68 100644 --- a/articles/testing/contract-testing.md +++ b/articles/testing/contract-testing.md @@ -9,6 +9,17 @@ Scenarios makes it easy to incorporate your OAS / Swagger API specification into > If you don't have an API specification yet, you can create one using the Stoplight modeling tool! +## Connecting The Spec + +The first thing you need to do to get started with contract testing is connect your API spec to the Scenarios Collection. + +1. Create a new (or open an existing) **Scenario file** in the Stoplight editor +2. Select **Swagger/OAS Coverage** in the Scenarios menu to the left +3. Open **Contract Test Settings** +4. Click **+ Add Spec** +5. Select a file from either **This Project** or an **External URL** +6. You are all set! You can now test against an API spec. + ## Using the Coverage Report The coverage report gives you a quick overview of which parts of the connected specs are covered by test assertions in the current Scenario Collection.