From b7b76c4849479e9769fbfc96a3daee08714ccda0 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Wed, 23 Aug 2017 12:31:48 +0800 Subject: [PATCH] fix docs links --- docs/extraction-and-validation.md | 22 +++++++++++++++------- docs/quickstart.md | 14 +++++++------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/docs/extraction-and-validation.md b/docs/extraction-and-validation.md index d76b80a2..798ed9c4 100644 --- a/docs/extraction-and-validation.md +++ b/docs/extraction-and-validation.md @@ -31,16 +31,24 @@ For instance, if we want to get `Content-Type` in response headers, then we can There might be slight difference on list, cos we can use index to locate list item. For example, `Guangzhou` in response content can be specified by `content.person.cities.0`. ```text -{"resp_status_code": "status_code"}, -{"resp_headers_content_type": "headers.content-type"}, -{"resp_content_body_success": "body.success"}, -{"resp_content_content_success": "content.success"}, -{"resp_content_text_success": "text.success"}, -{"resp_content_person_first_name": "content.person.name.first_name"}, -{"resp_content_cities_1": "content.person.cities.1"} +# get status code +status_code + +# get headers field +headers.content-type + +# get content field +body.success +content.success +text.success +content.person.name.first_name +content.person.cities.1 ``` ```yaml +extract_binds: + - content_type: headers.content-type + - first_name: content.person.name.first_name validators: - {"check": "status_code", "comparator": "eq", "expected": 200} - {"check": "headers.content-type", "expected": "application/json"} diff --git a/docs/quickstart.md b/docs/quickstart.md index 9b626d99..376e6cae 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -327,14 +327,14 @@ Great! The test case runs successfully and generates a `HTML` test report. This is just a starting point, see the `advanced guide` for the advanced features. - templating -- [`data extraction and validation`](extraction-and-validation) +- [`data extraction and validation`][extraction-and-validation] - [`comparator`][comparator] [requests]: http://docs.python-requests.org/en/master/ [requests.request]: http://docs.python-requests.org/en/master/api/#requests.request -[comparator]: docs/comparator.md -[extraction-and-validation]: docs/extraction-and-validation.md -[quickstart-demo-rev-0]: examples/quickstart-demo-rev-0.yml -[quickstart-demo-rev-1]: examples/quickstart-demo-rev-1.yml -[quickstart-demo-rev-2]: examples/quickstart-demo-rev-2.yml -[quickstart-demo-rev-3]: examples/quickstart-demo-rev-3.yml +[comparator]: comparator.md +[extraction-and-validation]: extraction-and-validation.md +[quickstart-demo-rev-0]: ../examples/quickstart-demo-rev-0.yml +[quickstart-demo-rev-1]: ../examples/quickstart-demo-rev-1.yml +[quickstart-demo-rev-2]: ../examples/quickstart-demo-rev-2.yml +[quickstart-demo-rev-3]: ../examples/quickstart-demo-rev-3.yml