diff --git a/.github/workflows/accept-pull-request.yml b/.github/workflows/accept-pull-request.yml index 7d336161436..86a6032d548 100644 --- a/.github/workflows/accept-pull-request.yml +++ b/.github/workflows/accept-pull-request.yml @@ -31,7 +31,7 @@ jobs: pr_detail_file="pr_detail.json" gh api repos/"${OWNER}"/"${REPO}"/pulls/"${PR_NUMBER}" > "${pr_detail_file}" jq . "${pr_detail_file}" - echo ${{ github.event.issue.title }} + echo "github.event.issue.title: ${{ github.event.issue.title }}" HEAD_REPO_FULL_NAME=$(jq -rc .head.repo.full_name ${pr_detail_file}) BASE_REPO_FULL_NAME=$(jq -rc .base.repo.full_name ${pr_detail_file}) if [ "${HEAD_REPO_FULL_NAME}" = "${BASE_REPO_FULL_NAME}" ] ; then diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 45cf6195e4a..7c3f50ea685 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,29 +2,30 @@ Thank you for investing time in our project! -## Issues +## 🐛 Issues Whether you have discovered a bug, want a new feature in Hurl, or change code, [please fill an issue] before any PR. We like to discuss things before implementation and want to be sure that: -- Any new features is coherent with Hurl core values +- Any new features are coherent with Hurl core values - You don't waste time on a feature that will not fit Hurl - All options have been considered if possible +- We try to minimize dependencies and import new crates parsimoniously -## Pull Requests +## 🥳 Pull Requests - Commits have to be signed. - All tests must be green before merge. - Hurl git history is linear, so we ask to rebase your PR before final merge. -## Hurl Core Values +## ❤️ Hurl Core Values - Hurl is a first class citizen CLI tool, fast and reliable - Hurl is a cherry on the top of curl. What you can do with curl, you could do it with Hurl - Hurl file format is text plain, loosely based on HTTP - Hurl is multiplatform, working on Linux, macOS, Windows -## How Can You Help ? +## 👀 How Can You Help ? - Installing / Packet managers: bundle Hurl for a particular packet manager is welcome. Currently, we built binaries for Linux, macOS, Windows and we support a narrow set of packet manager. [More would be better!] @@ -33,10 +34,61 @@ integrated way to run Hurl file would be cool also - [Documentation] is a never finished work and could be always improve. Don't hesitate to clarify, fix typos etc... - Report bugs: if possible some simple repro steps with the Hurl version, name of the platform etc... +## 🤯 Build and Test +Hurl is a Rust project, so you will need the Rust toolchain to build it. You can check the [Hurl build documentation] to +see how to build locally the latest version (master branch). +Once your setup is ready, just build the project: + +```shell +$ cargo build + Compiling hurl_core v2.0.0-SNAPSHOT (/Users/jc/Documents/Dev/hurl/packages/hurl_core) + ... + Compiling hurlfmt v2.0.0-SNAPSHOT (/Users/jc/Documents/Dev/hurl/packages/hurlfmt) + Compiling hurl v2.0.0-SNAPSHOT (/Users/jc/Documents/Dev/hurl/packages/hurl) + Finished dev [unoptimized + debuginfo] target(s) in 2.53s +``` + +Hurl unit and integration tests need Python 3.6+ to be run. You can use a [virtual environment] and install the dependencies needed +by the tests suite: + +```shell +$ python3 -m venv .venv +$ source .venv/bin/activate +$ pip3 install --requirement bin/requirements-frozen.txt +``` + +Then, you can launch our local server (used to test Hurl features): + +```shell +$ cd integration +$ python3 server.py >server.log 2>&1 & +$ python3 ssl/server.py >server-ssl.log 2>&1 & +$ mitmdump --listen-host 127.0.0.1 --listen-port 8888 --modify-header "/From-Proxy/Hello" >mitmdump.log 2>&1 & +$ jobs +[1] running python3 server.py > server.log 2>&1 +[2] - running python3 ssl/server.py > server-ssl.log 2>&1 +[3] + running mitmdump --listen-host 127.0.0.1 --listen-port 8888 --modify-header > 2>&1 +``` + +You can check [`bin/test/test_prerequisites.sh`] and [`bin/test/test_prerequisites.ps1`] for more details. + +Now, you can follow these steps when you make changes: + +1. Build `cargo build` +2. Run Clippy `cargo clippy` +3. Format `cargo fmt` +4. Run units tests `cargo test` +5. Run integration tests `cd integration && python3 integration.py` + +Et voilà 🎉! [please fill an issue]: https://github.com/Orange-OpenSource/hurl/issues [More would be better!]: https://github.com/BurntSushi/ripgrep#installation [Documentation]: https://github.com/BurntSushi/ripgrep#installation +[Hurl build documentation]: https://hurl.dev/docs/installation.html#building-from-sources +[`bin/test/test_prerequisites.sh`]: /bin/test/test_prerequisites.sh +[`bin/test/test_prerequisites.ps1`]: /bin/test/test_prerequisites.ps1 +[virtual environment]: https://docs.python.org/3/tutorial/venv.html \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index b162e490951..8bcb136b13d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -495,6 +495,15 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +[[package]] +name = "html-escape" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15315cfa9503e9aa85a477138eff76a1b203a430703548052c330b69d8d8c205" +dependencies = [ + "utf8-width", +] + [[package]] name = "hurl" version = "2.0.0-SNAPSHOT" @@ -512,6 +521,7 @@ dependencies = [ "glob", "hex", "hex-literal", + "html-escape", "hurl_core", "indexmap", "libflate", @@ -1182,6 +1192,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf8-width" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5190c9442dcdaf0ddd50f37420417d219ae5261bbf5db120d0f9bab996c9cba1" + [[package]] name = "vcpkg" version = "0.2.15" diff --git a/contrib/vim/syntax/hurl.vim b/contrib/vim/syntax/hurl.vim index b501c73a649..662398c28e8 100644 --- a/contrib/vim/syntax/hurl.vim +++ b/contrib/vim/syntax/hurl.vim @@ -26,7 +26,7 @@ syntax keyword operator == != > >= < <= not syntax keyword query status url header cookie body jsonpath xpath regex variable duration sha256 md5 bytes syntax keyword predicate startsWith endsWith matches exists includes isInteger isFloat isBoolean isString isCollection syntax match predicate "contains" -syntax keyword filter count regex urlEncode urlDecode +syntax keyword filter count regex urlEncode urlDecode htmlEscape htmlUnescape syntax match escapeNumberSign "\\#" syntax match escapeQuote "\\\"" syntax region string start='"' end='"' contains=escapeQuote diff --git a/docs/spec/hurl.grammar b/docs/spec/hurl.grammar index 20de21401ee..801edca222d 100644 --- a/docs/spec/hurl.grammar +++ b/docs/spec/hurl.grammar @@ -428,8 +428,11 @@ url-encode-filter: "urlEncode" url-decode-filter: "urlDecode" -to-int: "toInt" +html-encode-filter: "htmlEscape" + +html-decode-filter: "htmlUnescape" +to-int: "toInt" # Lexical Grammar diff --git a/integration/report/html/index.html b/integration/report/html/index.html deleted file mode 100644 index 63cda73703e..00000000000 --- a/integration/report/html/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Hurl Report

Hurl Report

Mon, 08 Nov 2021 11:39:15 +0100
total: 85 (100%)
failure: 34 (40.0%)
success: 51 (60.0%)
filenamestatusduration
tests/assert_base64.hurlsuccess0.005s
tests/assert_header.hurlsuccess0.009s
tests/assert_json.hurlsuccess0.028s
tests/assert_match.hurlsuccess0.018s
tests/assert_regex.hurlsuccess0.009s
tests/assert_status_code.hurlsuccess0.014s
tests/assert_xpath.hurlsuccess0.004s
tests/basic_authentication.hurlsuccess0.006s
tests/bom.hurlsuccess0.009s
tests/bytes.hurlsuccess0.008s
tests/capture_and_assert.hurlsuccess0.006s
tests/captures.hurlsuccess0.019s
tests/color.hurlsuccess0s
tests/compressed.hurlsuccess0.035s
tests/cookie_file.hurlsuccess0.004s
tests/cookies.hurlsuccess0.036s
tests/cookie_storage.hurlsuccess0.007s
tests/delete.hurlsuccess0.007s
tests/empty.hurlsuccess0s
tests/encoding.hurlsuccess0.008s
tests/error_assert_base64.hurlfailure0.005s
tests/error_assert_bytearray.hurlfailure0.015s
tests/error_assert_content_encoding.hurlfailure0.007s
tests/error_assert_decompress.hurlfailure0.007s
tests/error_assert_file.hurlfailure0.01s
tests/error_assert_header_not_found.hurlfailure0.01s
tests/error_assert_header_value.hurlfailure0.005s
tests/error_assert_http_version.hurlfailure0.004s
tests/error_assert_invalid_predicate_type.hurlfailure0.006s
tests/error_assert_match_utf8.hurlfailure0.006s
tests/error_assert_query_cookie.hurlfailure0.008s
tests/error_assert_query_invalid_regex.hurlfailure0.006s
tests/error_assert_query_invalid_xpath.hurlfailure0.009s
tests/error_assert_status.hurlfailure0.004s
tests/error_assert_template_variable_not_found.hurlfailure0.013s
tests/error_assert_value_error.hurlfailure0.011s
tests/error_assert_variable.hurlfailure0.015s
tests/error_assert_xpath.hurlfailure0.006s
tests/error_body_json.hurlfailure0s
tests/error_connect_timeout.hurlfailure1.003s
tests/error_file_read_access.hurlfailure0s
tests/error_http_connection.hurlfailure0.03s
tests/error_invalid_jsonpath.hurlfailure0.008s
tests/error_invalid_url.hurlfailure0s
tests/error_invalid_xml.hurlfailure0.011s
tests/error_max_redirect.hurlfailure0.028s
tests/error_multipart_form_data.hurlfailure0s
tests/error_predicate.hurlfailure0.016s
tests/error_query_header_not_found.hurlfailure0.007s
tests/error_query_invalid_json.hurlfailure0.005s
tests/error_query_invalid_utf8.hurlfailure0.006s
tests/error_template_variable_not_found.hurlfailure0s
tests/error_template_variable_not_renderable.hurlfailure0.006s
tests/error_timeout.hurlfailure1.003s
tests/expect.hurlsuccess0.011s
tests/follow_redirect.hurlsuccess0.018s
tests/form_params.hurlsuccess0.013s
tests/headers.hurlsuccess0.038s
tests/hello.hurlsuccess0.025s
tests/ignore_asserts.hurlsuccess0.006s
tests/include.hurlsuccess0.006s
tests/large.hurlsuccess8.161s
tests/multilines.hurlsuccess0.011s
tests/multipart_form_data.hurlsuccess0.017s
tests/no_entry.hurlsuccess0s
tests/non_utf8.hurlsuccess0.006s
tests/output.hurlsuccess0.009s
tests/patch.hurlsuccess0.01s
tests/post_base64.hurlsuccess0.005s
tests/post_bytes.hurlsuccess0.004s
tests/post_file.hurlsuccess0.008s
tests/post_json.hurlsuccess0.034s
tests/post_multilines.hurlsuccess0.018s
tests/post_xml.hurlsuccess0.015s
tests/predicates-string.hurlsuccess0.018s
tests/proxy.hurlsuccess0.034s
tests/put.hurlsuccess0.005s
tests/querystring_params.hurlsuccess0.016s
tests/redirect.hurlsuccess0.01s
tests/subquery_count.hurlsuccess0.008s
tests/test_mode.hurlsuccess0.004s
tests/url.hurlsuccess0.012s
tests/user_in_url.hurlsuccess0.005s
tests/utf8.hurlsuccess0.004s
tests/variables.hurlsuccess0.006s
\ No newline at end of file diff --git a/integration/report/html/report.css b/integration/report/html/report.css deleted file mode 100644 index 230ccb327ad..00000000000 --- a/integration/report/html/report.css +++ /dev/null @@ -1,27 +0,0 @@ -.date { - margin-bottom: 10px; -} - -thead { - font-weight: bolder; -} - -td { - padding: 3px 5px; -} - -.summary { - padding: 10px; -} -.success, .success a { - color: green; -} - -.failure, .failure a { - color: red; -} - - - - - diff --git a/integration/report/html/tests/assert_base64.hurl.html b/integration/report/html/tests/assert_base64.hurl.html deleted file mode 100644 index 0f8848a49c0..00000000000 --- a/integration/report/html/tests/assert_base64.hurl.html +++ /dev/null @@ -1,100 +0,0 @@ - -Hurl File -
# Test body response with line ending LF and CRLF.
-# We receive the text body "line1\nline2\r\nline3\n"
-#
-# $ printf "line1\nline2\r\nline3\n" | base64
-# bGluZTEKbGluZTINCmxpbmUzCg==
-
-
-GET http://localhost:8000/assert-base64
-HTTP 200
-base64,bGluZTEKbGluZTINCmxpbmUzCg==;
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/assert_header.hurl.html b/integration/report/html/tests/assert_header.hurl.html deleted file mode 100644 index a4aab6b2813..00000000000 --- a/integration/report/html/tests/assert_header.hurl.html +++ /dev/null @@ -1,102 +0,0 @@ - -Hurl File -
GET http://localhost:8000/assert-header
-HTTP 200
-Content-Type: text/html; charset=utf-8
-Set-Cookie: cookie1=value1; Path=/
-Set-Cookie: cookie2=value2; Path=/
-[Asserts]
-header "Custom" not exists
-header "Content-Type" exists
-header "Header1" equals "value1"
-header "ETag" equals "\"33a64df551425fcc55e4d42a148795d9f25f89d4\""
-header "Set-Cookie" exists
-header "Set-Cookie" count == 3
-header "Set-Cookie" includes "cookie1=value1; Path=/"
-header "Set-Cookie" not includes "cookie4=value4; Path=/"
- \ No newline at end of file diff --git a/integration/report/html/tests/assert_json.hurl.html b/integration/report/html/tests/assert_json.hurl.html deleted file mode 100644 index 4d76f3c3a2a..00000000000 --- a/integration/report/html/tests/assert_json.hurl.html +++ /dev/null @@ -1,155 +0,0 @@ - -Hurl File -
GET http://localhost:8000/assert-json
-HTTP 200
-[Asserts]
-jsonpath "$.count" equals 5
-jsonpath "$.count" == 5
-jsonpath "$.count" equals 5.0
-jsonpath "$.count" notEquals 4
-jsonpath "$.count" != 4
-jsonpath "$.count" greaterThan 1
-jsonpath "$.count" greaterThan 1.0
-jsonpath "$.count" >= 1.0
-jsonpath "$.success" equals false
-jsonpath "$.success" not equals null
-jsonpath "$.success" exists
-jsonpath "$.success" isBoolean
-jsonpath "$.errors" count == 2
-jsonpath "$.errors" isCollection
-jsonpath "$.warnings" count == 0
-jsonpath "$.toto" not exists
-jsonpath "$.warnings" exists
-jsonpath "$.warnings" exists
-jsonpath "$.errors[0]" exists
-jsonpath "$.errors[0]" isCollection
-jsonpath "$.errors[0].id" equals "error1"
-jsonpath "$.errors[0]['id']" equals "error1"
-jsonpath "$.errors[*].id" includes "error1"
-jsonpath "$.errors[?(@.id=='error1')].id" equals "error1"
-jsonpath "$.duration" equals 1.5
-jsonpath "$.duration" lessThanOrEquals 2.0
-jsonpath "$.duration" <= 2.0
-jsonpath "$.duration" lessThan 2
-jsonpath "$.duration" < 2
-jsonpath "$.duration" isFloat
-jsonpath "$.duration" not isInteger
-jsonpath "$.nullable" equals null
-
-{
-  "count": 5,
-  "success": false,
-  "errors": [{"id":"error1"},{"id":"error2"}],
-  "warnings": [],
-  "duration": 1.5,
-  "tags": ["test"],
-  "nullable": null
-}
-
-GET http://localhost:8000/assert-json/index
-HTTP 200
-[Captures]
-index: body
-
-GET http://localhost:8000/assert-json
-HTTP 200
-[Asserts]
-jsonpath "$.errors[{{index}}].id" equals "error2"
-jsonpath "$.tags" includes "test"
-jsonpath "$.tags" not includes "prod"
-jsonpath "$.tags" not includes null
-
-
-GET http://localhost:8000/assert-json/list
-HTTP 200
-[Asserts]
-jsonpath "$" count == 2
-jsonpath "$.[0].name" equals "Bob"
-jsonpath "$[0].name" equals "Bob"
-
- \ No newline at end of file diff --git a/integration/report/html/tests/assert_match.hurl.html b/integration/report/html/tests/assert_match.hurl.html deleted file mode 100644 index 8d9f5196117..00000000000 --- a/integration/report/html/tests/assert_match.hurl.html +++ /dev/null @@ -1,96 +0,0 @@ - -Hurl File -
GET http://localhost:8000/assert-match
-HTTP 200
-[Asserts]
-jsonpath "$.date1" matches "\\d{4}-\\d{2}-\\d{2}"
-jsonpath "$.date2" matches "\\d{4}-\\d{2}-\\d{2}"
-jsonpath "$.date1" matches "^\\d{4}-\\d{2}-\\d{2}$"
-jsonpath "$.date2" not matches "^\\d{4}-\\d{2}-\\d{2}$"
-
- \ No newline at end of file diff --git a/integration/report/html/tests/assert_regex.hurl.html b/integration/report/html/tests/assert_regex.hurl.html deleted file mode 100644 index ac5c79fc8e9..00000000000 --- a/integration/report/html/tests/assert_regex.hurl.html +++ /dev/null @@ -1,95 +0,0 @@ - -Hurl File -
GET http://localhost:8000/assert-regex
-
-HTTP 200
-[Asserts]
-regex "Hello ([0-9]+)!" not exists
-regex "Hello ([a-zA-Z]+)!" equals "World"
-
- \ No newline at end of file diff --git a/integration/report/html/tests/assert_status_code.hurl.html b/integration/report/html/tests/assert_status_code.hurl.html deleted file mode 100644 index 335213a0650..00000000000 --- a/integration/report/html/tests/assert_status_code.hurl.html +++ /dev/null @@ -1,105 +0,0 @@ - -Hurl File -
GET http://localhost:8000/assert-status-code
-HTTP 201
-
-# simply check that the status code is not 200
-# do not run implicit assert of http response version and code
-GET http://localhost:8000/assert-status-code
-HTTP *
-[Asserts]
-status not equals 200
-
-
-# simply check that the status code is OK
-GET http://localhost:8000/assert-status-code
-HTTP *
-[Asserts]
-status greaterThanOrEquals 200
-status lessThan 300
- \ No newline at end of file diff --git a/integration/report/html/tests/assert_xpath.hurl.html b/integration/report/html/tests/assert_xpath.hurl.html deleted file mode 100644 index 43199217a94..00000000000 --- a/integration/report/html/tests/assert_xpath.hurl.html +++ /dev/null @@ -1,98 +0,0 @@ - -Hurl File -
GET http://localhost:8000/assert-xpath
-
-HTTP 200
-[Asserts]
-xpath "normalize-space(//data)" equals "café"
-xpath "normalize-space(//data)" equals "caf\u{00e9}"
-xpath "//toto" not exists
-
-<data>café</data>
-
- \ No newline at end of file diff --git a/integration/report/html/tests/basic_authentication.hurl.html b/integration/report/html/tests/basic_authentication.hurl.html deleted file mode 100644 index bc7a1dd2b4d..00000000000 --- a/integration/report/html/tests/basic_authentication.hurl.html +++ /dev/null @@ -1,94 +0,0 @@ - -Hurl File -
GET http://localhost:8000/basic-authentication
-HTTP 200
-```You are authenticated```
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/bom.hurl.html b/integration/report/html/tests/bom.hurl.html deleted file mode 100644 index b1f41cc88f7..00000000000 --- a/integration/report/html/tests/bom.hurl.html +++ /dev/null @@ -1,94 +0,0 @@ - -Hurl File -
GET http://localhost:8000/utf8_bom
-
-HTTP 200
-```Hello World!```
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/bytes.hurl.html b/integration/report/html/tests/bytes.hurl.html deleted file mode 100644 index 9caddde2d8b..00000000000 --- a/integration/report/html/tests/bytes.hurl.html +++ /dev/null @@ -1,101 +0,0 @@ - -Hurl File -
GET http://localhost:8000/bytes
-HTTP 200
-Content-Type: application/octet-stream
-[Asserts]
-bytes equals hex,010203;
-bytes equals base64,AQID;
-bytes count == 3
-bytes startsWith hex,01;
-bytes endsWith hex,03;
-bytes contains hex,02;
-sha256 equals hex,039058c6f2c0cb492c533b0a4d14ef77cc0f78abccced5287d84a1a2011cfb81;
-md5 equals hex,5289df737df57326fcdd22597afb1fac;
-
- \ No newline at end of file diff --git a/integration/report/html/tests/capture_and_assert.hurl.html b/integration/report/html/tests/capture_and_assert.hurl.html deleted file mode 100644 index 5f888fbe9b4..00000000000 --- a/integration/report/html/tests/capture_and_assert.hurl.html +++ /dev/null @@ -1,97 +0,0 @@ - -Hurl File -
GET http://localhost:8000/capture-and-assert
-HTTP 200
-[Captures]
-content_type: header "content-type"
-[Asserts]
-header "content-type" equals "{{content_type}}"
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/captures.hurl.html b/integration/report/html/tests/captures.hurl.html deleted file mode 100644 index 2ae5edbd456..00000000000 --- a/integration/report/html/tests/captures.hurl.html +++ /dev/null @@ -1,129 +0,0 @@ - -Hurl File -
GET http://localhost:8000/captures
-
-HTTP 200
-[Captures]
-param1: header "header1"
-param2: header "header2" regex "Hello (.*)!"
-[Asserts]
-variable "param1" equals "value1"
-variable "param2" equals "Bob"
-
-GET http://localhost:8000/captures-check
-[QueryStringParams]
-param1: {{param1}}
-param2: {{param2}}
-
-HTTP 200
-
-
-GET http://localhost:8000/captures-json
-HTTP 200
-[Captures]
-an_object:  jsonpath "$['an_object']"
-a_list:     jsonpath "$['a_list']"
-a_null:     jsonpath "$['a_null']"
-an_integer: jsonpath "$['an_integer']"
-a_float:    jsonpath "$['a_float']"
-a_bool:     jsonpath "$['a_bool']"
-a_string:   jsonpath "$['a_string']"
-all:        jsonpath "$"
-[Asserts]
-variable "a_null" exists
-variable "undefined" not exists
-variable "a_null" equals {{a_null}}
-variable "an_integer" equals {{an_integer}}
-variable "a_float" equals {{a_float}}
-variable "a_bool" equals {{a_bool}}
-variable "a_string" equals {{a_string}}
-variable "a_list" equals {{a_list}}
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/color.hurl.html b/integration/report/html/tests/color.hurl.html deleted file mode 100644 index 2c1eeb63adf..00000000000 --- a/integration/report/html/tests/color.hurl.html +++ /dev/null @@ -1,89 +0,0 @@ - -Hurl File -
- \ No newline at end of file diff --git a/integration/report/html/tests/compressed.hurl.html b/integration/report/html/tests/compressed.hurl.html deleted file mode 100644 index 5b1e9f6e9cb..00000000000 --- a/integration/report/html/tests/compressed.hurl.html +++ /dev/null @@ -1,122 +0,0 @@ - -Hurl File -
# -- COMPRESSED HAS NO EFFECT ON NON-COMPRESSED
-GET http://localhost:8000/compressed/none
-HTTP 200
-Content-Length: 12
-Content-Type: text/html; charset=utf-8
-```Hello World!```
-
-GET http://localhost:8000/compressed/gzip
-HTTP 200
-Content-Length: 32
-Content-Encoding: gzip
-Content-Type: text/html; charset=utf-8
-```Hello World!```
-
-GET http://localhost:8000/compressed/zlib
-HTTP 200
-Content-Length: 20
-Content-Encoding: deflate
-Content-Type: text/html; charset=utf-8
-```Hello World!```
-
-GET http://localhost:8000/compressed/brotli
-HTTP 200
-Content-Length: 17
-Content-Encoding: br
-Content-Type: text/html; charset=utf-8
-```Hello World!```
-
-GET http://localhost:8000/compressed/brotli_identity
-HTTP 200
-Content-Length: 17
-Content-Encoding: br, identity
-Content-Type: text/html; charset=utf-8
-```Hello World!```
- \ No newline at end of file diff --git a/integration/report/html/tests/cookie_file.hurl.html b/integration/report/html/tests/cookie_file.hurl.html deleted file mode 100644 index 03e72f9a668..00000000000 --- a/integration/report/html/tests/cookie_file.hurl.html +++ /dev/null @@ -1,91 +0,0 @@ - -Hurl File -
GET http://localhost:8000/cookie_file
-HTTP 200
-
- \ No newline at end of file diff --git a/integration/report/html/tests/cookie_storage.hurl.html b/integration/report/html/tests/cookie_storage.hurl.html deleted file mode 100644 index 05521820496..00000000000 --- a/integration/report/html/tests/cookie_storage.hurl.html +++ /dev/null @@ -1,103 +0,0 @@ - -Hurl File -
#
-# experimental feature
-# manage cookie store
-#
-
-# @cookie_storage_set: localhost    FALSE   /   FALSE   0   cookie1 valueA
-GET http://localhost:8000/cookie-storage/assert-that-cookie1-is-valueA
-HTTP 200
-
-# @cookie_storage_clear
-GET http://localhost:8000/cookie-storage/assert-that-cookie1-is-not-in-session
-HTTP 200
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/cookies.hurl.html b/integration/report/html/tests/cookies.hurl.html deleted file mode 100644 index 9e48ae0643d..00000000000 --- a/integration/report/html/tests/cookies.hurl.html +++ /dev/null @@ -1,152 +0,0 @@ - -Hurl File -
# Request Cookie
-
-GET http://localhost:8000/cookies/set-request-cookie1-valueA
-[Cookies]
-cookie1: valueA
-HTTP 200
-
-# The cookie is not added in the cookie storage
-GET http://localhost:8000/cookies/assert-that-cookie1-is-not-in-session
-HTTP 200
-
-GET http://localhost:8000/cookies/set-multiple-request-cookies
-[Cookies]
-user1: Bob
-user2: Bill
-HTTP 200
-
-
-# Session Cookie
-
-GET http://localhost:8000/cookies/set-session-cookie2-valueA
-HTTP 200
-[Asserts]
-cookie "cookie2" equals "valueA"
-
-GET http://localhost:8000/cookies/assert-that-cookie2-is-valueA
-HTTP 200
-
-GET http://localhost:8000/cookies/assert-that-cookie2-is-valueA-and-valueB
-[Cookies]
-cookie2: valueB
-HTTP 200
-
-
-GET http://localhost:8000/cookies/delete-cookie2
-HTTP 200
-[Asserts]
-cookie "cookie2" equals ""
-cookie "cookie2[Max-Age]" equals 0
-
-GET http://localhost:8000/cookies/assert-that-cookie2-is-not-in-session
-HTTP 200
-
-GET http://localhost:8000/cookies/set
-HTTP 200
-Set-Cookie: LSID=DQAAAKEaem_vYg; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly; Path=/accounts
-Set-Cookie: HSID=AYQEVnDKrdst; Domain=.localhost; Expires=Wed, 13 Jan 2021 22:23:01 GMT; HttpOnly; Path=/
-Set-Cookie: SSID=Ap4PGTEq; Domain=.localhost; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly; Path=/
-
-[Asserts]
-header "Set-Cookie" count == 3
-cookie "LSID" equals "DQAAAKEaem_vYg"
-cookie "LSID[Value]" equals "DQAAAKEaem_vYg"
-cookie "LSID[Expires]" exists
-cookie "LSID[Expires]" equals "Wed, 13 Jan 2021 22:23:01 GMT"
-cookie "LSID[Max-Age]" not exists
-cookie "LSID[Domain]" not exists
-cookie "LSID[Path]" equals "/accounts"
-cookie "LSID[Secure]" exists
-cookie "LSID[HttpOnly]" exists
-cookie "LSID[SameSite]" not exists
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/delete.hurl.html b/integration/report/html/tests/delete.hurl.html deleted file mode 100644 index 40f676bae83..00000000000 --- a/integration/report/html/tests/delete.hurl.html +++ /dev/null @@ -1,92 +0,0 @@ - -Hurl File -
DELETE http://localhost:8000/delete
-HTTP 200
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/empty.hurl.html b/integration/report/html/tests/empty.hurl.html deleted file mode 100644 index 2c1eeb63adf..00000000000 --- a/integration/report/html/tests/empty.hurl.html +++ /dev/null @@ -1,89 +0,0 @@ - -Hurl File -
- \ No newline at end of file diff --git a/integration/report/html/tests/encoding.hurl.html b/integration/report/html/tests/encoding.hurl.html deleted file mode 100644 index 43bf87f0b09..00000000000 --- a/integration/report/html/tests/encoding.hurl.html +++ /dev/null @@ -1,103 +0,0 @@ - -Hurl File -
GET http://localhost:8000/encoding/utf8
-HTTP 200
-Content-Type: text/html; charset=utf-8
-[Asserts]
-body equals "caf\u{e9}"
-
-
-GET http://localhost:8000/encoding/latin1
-HTTP 200
-Content-Type: text/html; charset=ISO-8859-1
-[Asserts]
-body equals "caf\u{e9}"
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_assert_base64.hurl.html b/integration/report/html/tests/error_assert_base64.hurl.html deleted file mode 100644 index 3b9307d2e10..00000000000 --- a/integration/report/html/tests/error_assert_base64.hurl.html +++ /dev/null @@ -1,102 +0,0 @@ - -Hurl File -
# Test body response with line ending LF and CRLF.
-# We receive the text body "line1\nline2\r\nline3\n"
-# and not "line1\nline2\nline3\n"
-
-#
-# $ printf "line1\nline2\nline3\n" | base64
-# bGluZTEKbGluZTIKbGluZTMK
-
-
-GET http://localhost:8000/assert-base64
-HTTP 200
-base64,bGluZTEKbGluZTIKbGluZTMK;
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_assert_bytearray.hurl.html b/integration/report/html/tests/error_assert_bytearray.hurl.html deleted file mode 100644 index 82b1b197118..00000000000 --- a/integration/report/html/tests/error_assert_bytearray.hurl.html +++ /dev/null @@ -1,94 +0,0 @@ - -Hurl File -
GET http://localhost:8000/error-assert-bytearray
-HTTP 200
-[Asserts]
-bytes equals hex,00;
-sha256 equals hex,a8100ae6aa1940d0b663bb31cd466142ebbdbd5187131b92d93818987832eb88;
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_assert_content_encoding.hurl.html b/integration/report/html/tests/error_assert_content_encoding.hurl.html deleted file mode 100644 index 98275df274e..00000000000 --- a/integration/report/html/tests/error_assert_content_encoding.hurl.html +++ /dev/null @@ -1,93 +0,0 @@ - -Hurl File -
# Return an unsupported content encoding
-GET http://localhost:8000/error/content-encoding
-HTTP 200
-```Hello World!```
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_assert_decompress.hurl.html b/integration/report/html/tests/error_assert_decompress.hurl.html deleted file mode 100644 index 8ab03717bdd..00000000000 --- a/integration/report/html/tests/error_assert_decompress.hurl.html +++ /dev/null @@ -1,93 +0,0 @@ - -Hurl File -
GET http://localhost:8000/error-assert-decompress
-HTTP 200
-```Hello World!```
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_assert_file.hurl.html b/integration/report/html/tests/error_assert_file.hurl.html deleted file mode 100644 index a1ae0f9eaa6..00000000000 --- a/integration/report/html/tests/error_assert_file.hurl.html +++ /dev/null @@ -1,98 +0,0 @@ - -Hurl File -
# Test body response with file assertion.
-# We receive the body "Hello" and not "Hello World!"
-
-
-
-GET http://localhost:8000/error-assert-file
-HTTP 200
-file,data.txt;
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_assert_header_not_found.hurl.html b/integration/report/html/tests/error_assert_header_not_found.hurl.html deleted file mode 100644 index 5dfb27e1fda..00000000000 --- a/integration/report/html/tests/error_assert_header_not_found.hurl.html +++ /dev/null @@ -1,92 +0,0 @@ - -Hurl File -
GET http://localhost:8000/error-assert-header-not-found
-HTTP 200
-Custom: ???
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_assert_header_value.hurl.html b/integration/report/html/tests/error_assert_header_value.hurl.html deleted file mode 100644 index 1b6bb0ec956..00000000000 --- a/integration/report/html/tests/error_assert_header_value.hurl.html +++ /dev/null @@ -1,95 +0,0 @@ - -Hurl File -
GET http://localhost:8000/error-assert-header-value
-HTTP 200
-Content-Type: ???
-
-GET http://localhost:8000/error-assert-header-value
-HTTP 200
-Content-Type: ???
- \ No newline at end of file diff --git a/integration/report/html/tests/error_assert_http_version.hurl.html b/integration/report/html/tests/error_assert_http_version.hurl.html deleted file mode 100644 index c8b8c1777f4..00000000000 --- a/integration/report/html/tests/error_assert_http_version.hurl.html +++ /dev/null @@ -1,92 +0,0 @@ - -Hurl File -
GET http://localhost:8000/error-assert/http-version
-HTTP/2 200
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_assert_invalid_predicate_type.hurl.html b/integration/report/html/tests/error_assert_invalid_predicate_type.hurl.html deleted file mode 100644 index 470b3be63fe..00000000000 --- a/integration/report/html/tests/error_assert_invalid_predicate_type.hurl.html +++ /dev/null @@ -1,94 +0,0 @@ - -Hurl File -
GET http://localhost:8000/error-assert-invalid-predicate-type
-HTTP 200
-[Asserts]
-header "content-type" equals 1
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_assert_match_utf8.hurl.html b/integration/report/html/tests/error_assert_match_utf8.hurl.html deleted file mode 100644 index d66aed3621e..00000000000 --- a/integration/report/html/tests/error_assert_match_utf8.hurl.html +++ /dev/null @@ -1,94 +0,0 @@ - -Hurl File -
GET http://localhost:8000/error-assert/match-utf8
-HTTP 200
-[Asserts]
-body matches ".*"
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_assert_query_cookie.hurl.html b/integration/report/html/tests/error_assert_query_cookie.hurl.html deleted file mode 100644 index 75be93f649b..00000000000 --- a/integration/report/html/tests/error_assert_query_cookie.hurl.html +++ /dev/null @@ -1,104 +0,0 @@ - -Hurl File -
GET http://localhost:8000/error-assert-query-cookie
-HTTP 200
-
-[Asserts]
-
-cookie "cookie1[Secure]" not exists
-cookie "cookie1[Secure]" equals false      # This is not valid, Secure attribute exists or not but does have a value
-cookie "cookie1[Secure]" not equals true
-
-cookie "cookie2[Secure]" exists
-cookie "cookie2[Secure]" equals true       # This is not valid, Secure attribute exists or not but does have a value
-cookie "cookie2[Secure]" not equals true   # This is not valid, Secure attribute exists or not but does have a value
-
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_assert_query_invalid_regex.hurl.html b/integration/report/html/tests/error_assert_query_invalid_regex.hurl.html deleted file mode 100644 index 0a354099a4e..00000000000 --- a/integration/report/html/tests/error_assert_query_invalid_regex.hurl.html +++ /dev/null @@ -1,93 +0,0 @@ - -Hurl File -
GET http://localhost:8000/error-assert-query-invalid-regex
-HTTP 200
-[Asserts]
-regex "[x" exists
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_assert_query_invalid_xpath.hurl.html b/integration/report/html/tests/error_assert_query_invalid_xpath.hurl.html deleted file mode 100644 index 1a4d9872a36..00000000000 --- a/integration/report/html/tests/error_assert_query_invalid_xpath.hurl.html +++ /dev/null @@ -1,93 +0,0 @@ - -Hurl File -
GET http://localhost:8000/utf8
-HTTP 200
-[Asserts]
-xpath "//" equals 1
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_assert_status.hurl.html b/integration/report/html/tests/error_assert_status.hurl.html deleted file mode 100644 index 769679a04d6..00000000000 --- a/integration/report/html/tests/error_assert_status.hurl.html +++ /dev/null @@ -1,92 +0,0 @@ - -Hurl File -
GET http://localhost:8000/not_found
-HTTP 200
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_assert_template_variable_not_found.hurl.html b/integration/report/html/tests/error_assert_template_variable_not_found.hurl.html deleted file mode 100644 index 1f0854ec2e7..00000000000 --- a/integration/report/html/tests/error_assert_template_variable_not_found.hurl.html +++ /dev/null @@ -1,94 +0,0 @@ - -Hurl File -
GET http://localhost:8000/error-assert-template-variable-not-found
-HTTP 200
-[Asserts]
-header "content-type" equals "{{content_type}}"
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_assert_value_error.hurl.html b/integration/report/html/tests/error_assert_value_error.hurl.html deleted file mode 100644 index aef3f1e7fd1..00000000000 --- a/integration/report/html/tests/error_assert_value_error.hurl.html +++ /dev/null @@ -1,99 +0,0 @@ - -Hurl File -
GET http://localhost:8000/error-assert-value
-HTTP 200
-[Asserts]
-header "content-type" equals "XXX"
-header "content-type" notEquals "text/html; charset=utf-8"
-jsonpath "$.id" equals "000001"
-jsonpath "$.values" includes 100
-jsonpath "$.values" not contains "Hello"
-jsonpath "$.count" greaterThan 5
-jsonpath "$.count" isFloat
-bytes contains hex,00;
- \ No newline at end of file diff --git a/integration/report/html/tests/error_assert_variable.hurl.html b/integration/report/html/tests/error_assert_variable.hurl.html deleted file mode 100644 index 19c2af0d5b0..00000000000 --- a/integration/report/html/tests/error_assert_variable.hurl.html +++ /dev/null @@ -1,100 +0,0 @@ - -Hurl File -
GET http://localhost:8000/error-assert-variable
-HTTP 200
-[Captures]
-status: status
-length: header "content-length"
-type: header "content-type"
-[Asserts]
-variable "toto" equals "tata"
-variable "status" equals {{unknown}}
-variable "status" equals {{type}}
-variable "status" equals {{length}}
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_assert_xpath.hurl.html b/integration/report/html/tests/error_assert_xpath.hurl.html deleted file mode 100644 index 0f710c32009..00000000000 --- a/integration/report/html/tests/error_assert_xpath.hurl.html +++ /dev/null @@ -1,93 +0,0 @@ - -Hurl File -
GET http://localhost:8000/error-assert-xpath
-HTTP 200
-[Asserts]
-xpath "strong(//head/title)" equals "Welcome to Quiz!"
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_body_json.hurl.html b/integration/report/html/tests/error_body_json.hurl.html deleted file mode 100644 index 447872eb385..00000000000 --- a/integration/report/html/tests/error_body_json.hurl.html +++ /dev/null @@ -1,93 +0,0 @@ - -Hurl File -
POST unused
-{
-    "success": {{success}}
-}
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_connect_timeout.hurl.html b/integration/report/html/tests/error_connect_timeout.hurl.html deleted file mode 100644 index 5499f278a2c..00000000000 --- a/integration/report/html/tests/error_connect_timeout.hurl.html +++ /dev/null @@ -1,92 +0,0 @@ - -Hurl File -
GET http://10.0.0.0
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_file_read_access.hurl.html b/integration/report/html/tests/error_file_read_access.hurl.html deleted file mode 100644 index eefaa7c0023..00000000000 --- a/integration/report/html/tests/error_file_read_access.hurl.html +++ /dev/null @@ -1,93 +0,0 @@ - -Hurl File -
POST http://localhost:8000/error-file-read-access
-file,does_not_exist;
-
-HTTP/1.1 200
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_http_connection.hurl.html b/integration/report/html/tests/error_http_connection.hurl.html deleted file mode 100644 index 9c801ba3c77..00000000000 --- a/integration/report/html/tests/error_http_connection.hurl.html +++ /dev/null @@ -1,91 +0,0 @@ - -Hurl File -
GET http://unknown
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_invalid_jsonpath.hurl.html b/integration/report/html/tests/error_invalid_jsonpath.hurl.html deleted file mode 100644 index 6fe22da07fd..00000000000 --- a/integration/report/html/tests/error_invalid_jsonpath.hurl.html +++ /dev/null @@ -1,93 +0,0 @@ - -Hurl File -
GET http://localhost:8000/error-invalid-jsonpath
-HTTP 200
-[Asserts]
-jsonpath "" equals false
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_invalid_url.hurl.html b/integration/report/html/tests/error_invalid_url.hurl.html deleted file mode 100644 index b14db5c388f..00000000000 --- a/integration/report/html/tests/error_invalid_url.hurl.html +++ /dev/null @@ -1,91 +0,0 @@ - -Hurl File -
GET ???
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_invalid_xml.hurl.html b/integration/report/html/tests/error_invalid_xml.hurl.html deleted file mode 100644 index 10eaab8b80b..00000000000 --- a/integration/report/html/tests/error_invalid_xml.hurl.html +++ /dev/null @@ -1,93 +0,0 @@ - -Hurl File -
GET http://localhost:8000/error-invalid-xml
-HTTP 200
-[Asserts]
-xpath "xx" equals 1
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_max_redirect.hurl.html b/integration/report/html/tests/error_max_redirect.hurl.html deleted file mode 100644 index 62e189047ae..00000000000 --- a/integration/report/html/tests/error_max_redirect.hurl.html +++ /dev/null @@ -1,93 +0,0 @@ - -Hurl File -
GET http://localhost:8000/redirect/7
-HTTP 200
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_multipart_form_data.hurl.html b/integration/report/html/tests/error_multipart_form_data.hurl.html deleted file mode 100644 index b434b9bbc66..00000000000 --- a/integration/report/html/tests/error_multipart_form_data.hurl.html +++ /dev/null @@ -1,97 +0,0 @@ - -Hurl File -
POST http://localhost:8000/unused
-[MultipartFormData]
-key1: value1
-upload1: file,unknown;
-
-
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_predicate.hurl.html b/integration/report/html/tests/error_predicate.hurl.html deleted file mode 100644 index 094dd102335..00000000000 --- a/integration/report/html/tests/error_predicate.hurl.html +++ /dev/null @@ -1,105 +0,0 @@ - -Hurl File -
GET http://localhost:8000/predicate/error/type
-HTTP 200
-[Asserts]
-jsonpath "$.status" equals "true"
-#jsonpath "$.count" equals "0"
-jsonpath "$.count" equals 0
-jsonpath "$.message" equals 0
-jsonpath "$.empty" equals 0
-jsonpath "$.number" equals 1.1
-jsonpath "$.message" startsWith "hi"
-jsonpath "$.message" endsWith "hi"
-jsonpath "$.message" contains "hi"
-jsonpath "$.message" matches "hi"
-jsonpath "$.message" count == 1
-jsonpath "$.toto" exists
-jsonpath "$.message" not exists
-jsonpath "$.list" count == 2
- \ No newline at end of file diff --git a/integration/report/html/tests/error_query_header_not_found.hurl.html b/integration/report/html/tests/error_query_header_not_found.hurl.html deleted file mode 100644 index 4e725ded313..00000000000 --- a/integration/report/html/tests/error_query_header_not_found.hurl.html +++ /dev/null @@ -1,93 +0,0 @@ - -Hurl File -
GET http://localhost:8000/error-query-header-not-found
-HTTP 200
-Custom: XXX
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_query_invalid_json.hurl.html b/integration/report/html/tests/error_query_invalid_json.hurl.html deleted file mode 100644 index 8cdbcaf5da3..00000000000 --- a/integration/report/html/tests/error_query_invalid_json.hurl.html +++ /dev/null @@ -1,94 +0,0 @@ - -Hurl File -
GET http://localhost:8000/error-query-invalid-json
-HTTP 200
-[Asserts]
-jsonpath "$.errors" count == 2
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_query_invalid_utf8.hurl.html b/integration/report/html/tests/error_query_invalid_utf8.hurl.html deleted file mode 100644 index f32aa28fece..00000000000 --- a/integration/report/html/tests/error_query_invalid_utf8.hurl.html +++ /dev/null @@ -1,94 +0,0 @@ - -Hurl File -
GET http://localhost:8000/error-query-invalid-utf8
-HTTP 200
-[Asserts]
-jsonpath "$.errors" count == 2
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_template_variable_not_found.hurl.html b/integration/report/html/tests/error_template_variable_not_found.hurl.html deleted file mode 100644 index e9032377e40..00000000000 --- a/integration/report/html/tests/error_template_variable_not_found.hurl.html +++ /dev/null @@ -1,91 +0,0 @@ - -Hurl File -
GET {{url}}
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_template_variable_not_renderable.hurl.html b/integration/report/html/tests/error_template_variable_not_renderable.hurl.html deleted file mode 100644 index 2d58b1137fd..00000000000 --- a/integration/report/html/tests/error_template_variable_not_renderable.hurl.html +++ /dev/null @@ -1,99 +0,0 @@ - -Hurl File -
GET http://localhost:8000/get-list
-HTTP 200
-[Captures]
-list: jsonpath "$.values"
-
-GET http://localhost:8000/undefined
-[QueryStringParams]
-param1: {{list}}
-HTTP/1.1 200
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/error_timeout.hurl.html b/integration/report/html/tests/error_timeout.hurl.html deleted file mode 100644 index 5f500794402..00000000000 --- a/integration/report/html/tests/error_timeout.hurl.html +++ /dev/null @@ -1,92 +0,0 @@ - -Hurl File -
GET http://localhost:8000/timeout
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/expect.hurl.html b/integration/report/html/tests/expect.hurl.html deleted file mode 100644 index 31ac8192d80..00000000000 --- a/integration/report/html/tests/expect.hurl.html +++ /dev/null @@ -1,97 +0,0 @@ - -Hurl File -
POST http://localhost:8000/expect
-Expect: 100-continue
-```data```
-
-HTTP 200
-
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/follow_redirect.hurl.html b/integration/report/html/tests/follow_redirect.hurl.html deleted file mode 100644 index 49b80aebd0d..00000000000 --- a/integration/report/html/tests/follow_redirect.hurl.html +++ /dev/null @@ -1,91 +0,0 @@ - -Hurl File -
GET http://localhost:8000/follow-redirect
-HTTP 200
-```Followed redirect!```
- \ No newline at end of file diff --git a/integration/report/html/tests/form_params.hurl.html b/integration/report/html/tests/form_params.hurl.html deleted file mode 100644 index bc4fd41d5d1..00000000000 --- a/integration/report/html/tests/form_params.hurl.html +++ /dev/null @@ -1,106 +0,0 @@ - -Hurl File -
POST http://localhost:8000/form-params
-[FormParams]
-param1: value1
-param2:
-param3: a=b
-param4: a%3db
-
-HTTP 200
-
-# same version as raw
-POST http://localhost:8000/form-params
-Content-Type: application/x-www-form-urlencoded
-```param1=value1&param2=&param3=a%3db&param4=a%253db```
-
-HTTP 200
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/headers.hurl.html b/integration/report/html/tests/headers.hurl.html deleted file mode 100644 index d97d6a2d5a8..00000000000 --- a/integration/report/html/tests/headers.hurl.html +++ /dev/null @@ -1,126 +0,0 @@ - -Hurl File -
GET http://localhost:8000/default-headers
-HTTP 200
-
-GET http://localhost:8000/default-headers
-User-Agent: hurl/1.0
-Host: localhost:8000  # comment
-HTTP 200
-
-
-GET http://localhost:8000/default-headers
-User-Agent: hurl/1.0
-Host: localhost:8000  # comment
-HTTP 200
-
-GET http://localhost:8000/custom-headers
-Fruit: Raspberry
-Fruit: Apple
-Fruit: Banana
-Fruit: Grape
-Color: Green
-HTTP 200
-
-GET http://localhost:8000/custom-headers-utf8
-Beverage: café  # send the utf8 string - expected to be decoded as ascii in the server side
-HTTP 200
-
-GET http://localhost:8000/custom-headers-value
-Id: \#123       # send a hash in the value
-HTTP 200
-
-GET http://localhost:8000/custom-headers-quote
-Header1: '
-HTTP 200
-
-GET http://localhost:8000/response-headers
-HTTP 200
-Beverage: cafe  # TBC send utf8
-
- \ No newline at end of file diff --git a/integration/report/html/tests/hello.hurl.html b/integration/report/html/tests/hello.hurl.html deleted file mode 100644 index 3a00531a7a7..00000000000 --- a/integration/report/html/tests/hello.hurl.html +++ /dev/null @@ -1,104 +0,0 @@ - -Hurl File -
GET http://localhost:8000/hello
-HTTP 200
-```Hello World!```
-
-GET http://localhost:8000/hello
-HTTP 200
-file, data.txt;
-
-GET http://localhost:8000/hello
-HTTP 200
-hex, 48656c6c6f20576f726c6421;
-
-GET http://localhost:8000/hello
-HTTP 200
-base64, SGVsbG8gV29ybGQh;
-
- \ No newline at end of file diff --git a/integration/report/html/tests/ignore_asserts.hurl.html b/integration/report/html/tests/ignore_asserts.hurl.html deleted file mode 100644 index 14c4361958b..00000000000 --- a/integration/report/html/tests/ignore_asserts.hurl.html +++ /dev/null @@ -1,96 +0,0 @@ - -Hurl File -
GET http://localhost:8000/ignore_asserts
-
-HTTP 666
-[Asserts]
-body == "Whatever"
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/include.hurl.html b/integration/report/html/tests/include.hurl.html deleted file mode 100644 index 8445d4222bb..00000000000 --- a/integration/report/html/tests/include.hurl.html +++ /dev/null @@ -1,94 +0,0 @@ - -Hurl File -
GET http://localhost:8000/include
-
-HTTP 200
-```Hello```
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/large.hurl.html b/integration/report/html/tests/large.hurl.html deleted file mode 100644 index d6d876b9be8..00000000000 --- a/integration/report/html/tests/large.hurl.html +++ /dev/null @@ -1,100 +0,0 @@ - -Hurl File -
GET http://localhost:8000/large
-
-HTTP 200
-Content-Type: application/octet-stream
-Content-Length: 536870912
-
-[Asserts]
-duration lessThanOrEquals 10000   # Duration in ms
-
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/multilines.hurl.html b/integration/report/html/tests/multilines.hurl.html deleted file mode 100644 index 59d41f33dc5..00000000000 --- a/integration/report/html/tests/multilines.hurl.html +++ /dev/null @@ -1,103 +0,0 @@ - -Hurl File -
GET http://localhost:8000/multilines
-HTTP 200
-[Asserts]
-body == "line1\nline2\nline3\n"
-body == ```line1
-line2
-line3
-```
-body == ```
-line1
-line2
-line3
-```
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/multipart_form_data.hurl.html b/integration/report/html/tests/multipart_form_data.hurl.html deleted file mode 100644 index a3eb257ed0e..00000000000 --- a/integration/report/html/tests/multipart_form_data.hurl.html +++ /dev/null @@ -1,100 +0,0 @@ - -Hurl File -
POST http://localhost:8000/multipart-form-data
-[MultipartFormData]
-key1: value1
-upload1: file,data.txt;
-upload2: file,data.html;
-upload3: file,data.txt; text/html
-
-HTTP 200
-
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/no_entry.hurl.html b/integration/report/html/tests/no_entry.hurl.html deleted file mode 100644 index 1d9f8180dac..00000000000 --- a/integration/report/html/tests/no_entry.hurl.html +++ /dev/null @@ -1,91 +0,0 @@ - -Hurl File -
# all the entries
-# have been commented
-
- \ No newline at end of file diff --git a/integration/report/html/tests/non_utf8.hurl.html b/integration/report/html/tests/non_utf8.hurl.html deleted file mode 100644 index 3b0e4338e6a..00000000000 --- a/integration/report/html/tests/non_utf8.hurl.html +++ /dev/null @@ -1,92 +0,0 @@ - -Hurl File -
GET http://localhost:8000/non-utf8
-HTTP 200
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/output.hurl.html b/integration/report/html/tests/output.hurl.html deleted file mode 100644 index 2fd7e785471..00000000000 --- a/integration/report/html/tests/output.hurl.html +++ /dev/null @@ -1,97 +0,0 @@ - -Hurl File -
POST http://localhost:8000/output/endpoint1
-{ "user": "bob" }
-
-HTTP 200
-
-
-GET http://localhost:8000/output/endpoint2
-HTTP 200
-
- \ No newline at end of file diff --git a/integration/report/html/tests/patch.hurl.html b/integration/report/html/tests/patch.hurl.html deleted file mode 100644 index 38bd13507cd..00000000000 --- a/integration/report/html/tests/patch.hurl.html +++ /dev/null @@ -1,101 +0,0 @@ - -Hurl File -
# Sample from https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH
-PATCH http://localhost:8000/patch/file.txt
-Host: www.example.com
-Content-Type: application/example
-If-Match: "e0023aa4e"
-
-
-HTTP 204
-Content-Location: /file.txt
-ETag: "e0023aa4f"
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/post_base64.hurl.html b/integration/report/html/tests/post_base64.hurl.html deleted file mode 100644 index e04a89851eb..00000000000 --- a/integration/report/html/tests/post_base64.hurl.html +++ /dev/null @@ -1,95 +0,0 @@ - -Hurl File -
POST http://localhost:8000/post-base64
-base64, SGVsbG8gV29ybGQh;  # Hello World!
-
-HTTP 200
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/post_bytes.hurl.html b/integration/report/html/tests/post_bytes.hurl.html deleted file mode 100644 index 31af0a81e35..00000000000 --- a/integration/report/html/tests/post_bytes.hurl.html +++ /dev/null @@ -1,94 +0,0 @@ - -Hurl File -
POST http://localhost:8000/post-bytes
-Content-Type: application/octet-stream
-base64, AQID;  # echo -e -n '\x01\x02\x03' | base64
-
-HTTP 200
-
- \ No newline at end of file diff --git a/integration/report/html/tests/post_file.hurl.html b/integration/report/html/tests/post_file.hurl.html deleted file mode 100644 index 652375b710a..00000000000 --- a/integration/report/html/tests/post_file.hurl.html +++ /dev/null @@ -1,98 +0,0 @@ - -Hurl File -
POST http://localhost:8000/post-file
-file,data.bin;
-
-HTTP 200
-
-POST http://localhost:8000/post-file
-file,post_file_with\ space;
-
-HTTP 200
-
- \ No newline at end of file diff --git a/integration/report/html/tests/post_json.hurl.html b/integration/report/html/tests/post_json.hurl.html deleted file mode 100644 index 28cb3abc74e..00000000000 --- a/integration/report/html/tests/post_json.hurl.html +++ /dev/null @@ -1,146 +0,0 @@ - -Hurl File -
POST http://localhost:8000/post-json
-
-{
-    "name": "Bob",
-    "password": "&secret<>",
-    "age": 30,
-    "strict": true,
-    "spacing": "\n",
-    "g_clef": "\uD834\uDD1E"
-}
-
-HTTP 200
-
-POST http://localhost:8000/post-json-array
-[1,2,3]
-
-HTTP 200
-
-POST http://localhost:8000/post-json-string
-"Hello"
-
-HTTP 200
-
-POST http://localhost:8000/post-json-number
-100
-
-HTTP 200
-
-POST http://localhost:8000/post-json-numbers
-{
-    "natural": 100,
-    "negative": -1,
-    "float": "3.333333333333333",
-    "exponent": 100e100
-}
-
-
-HTTP 200
-
-POST http://localhost:8000/post-json-boolean
-true
-
-HTTP 200
-
-#
-# Use variable in your input json
-#
-GET http://localhost:8000/get-name
-HTTP 200
-[Captures]
-name: body
-
-POST http://localhost:8000/check_name
-
-{
-    "name": "{{name}}"
-}
-
- \ No newline at end of file diff --git a/integration/report/html/tests/post_multilines.hurl.html b/integration/report/html/tests/post_multilines.hurl.html deleted file mode 100644 index 0870ec99a2f..00000000000 --- a/integration/report/html/tests/post_multilines.hurl.html +++ /dev/null @@ -1,112 +0,0 @@ - -Hurl File -
POST http://localhost:8000/post-multilines
-```
-name,age
-bob,10
-bill,22
-```
-
-HTTP 200
-
-
-GET http://localhost:8000/get-bob-age
-HTTP 200
-[Captures]
-bob_age: body
-
-
-POST http://localhost:8000/post-multilines
-```
-name,age
-bob,{{bob_age}}
-bill,22
-```
-HTTP 200
-
- \ No newline at end of file diff --git a/integration/report/html/tests/post_xml.hurl.html b/integration/report/html/tests/post_xml.hurl.html deleted file mode 100644 index 47b4ba137ca..00000000000 --- a/integration/report/html/tests/post_xml.hurl.html +++ /dev/null @@ -1,103 +0,0 @@ - -Hurl File -
# POST the following XML
-# <?xml version="1.0"?>
-# <drink>café</drink>
-POST http://localhost:8000/post-xml
-<?xml version="1.0"?>
-<drink>café</drink>
-
-HTTP 200
-
-
-POST http://localhost:8000/post-xml-no-prolog
-<drink>café</drink>
-
-HTTP 200
-
- \ No newline at end of file diff --git a/integration/report/html/tests/predicates-string.hurl.html b/integration/report/html/tests/predicates-string.hurl.html deleted file mode 100644 index 14053791ab4..00000000000 --- a/integration/report/html/tests/predicates-string.hurl.html +++ /dev/null @@ -1,111 +0,0 @@ - -Hurl File -
GET http://localhost:8000/predicates-string
-
-HTTP 200
-[Asserts]
-body equals "Hello World!"
-body startsWith "Hello"
-body endsWith "!"
-body contains "llo"
-body matches "Hello [a-zA-Z]+!"
-
-
-GET http://localhost:8000/predicates-string-empty
-HTTP 200
-[Asserts]
-body equals ""
-body exists
-
-GET http://localhost:8000/predicates-string-unicode
-HTTP 200
-[Asserts]
-body equals "\u{2708}"
-bytes count equals 3
-
- \ No newline at end of file diff --git a/integration/report/html/tests/proxy.hurl.html b/integration/report/html/tests/proxy.hurl.html deleted file mode 100644 index 7f7f3886847..00000000000 --- a/integration/report/html/tests/proxy.hurl.html +++ /dev/null @@ -1,98 +0,0 @@ - -Hurl File -
# Go through proxy
-# The proxy adds header "From-Proxy:Hello" for both request and response
-# mitmproxy -p 8888 --setheader ":~q:From-Proxy:Hello" --setheader ":~s:From-Proxy:Hello"
-GET http://localhost:8000/proxy
-
-HTTP 200
-From-Proxy: Hello
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/put.hurl.html b/integration/report/html/tests/put.hurl.html deleted file mode 100644 index 0b6f8dde008..00000000000 --- a/integration/report/html/tests/put.hurl.html +++ /dev/null @@ -1,92 +0,0 @@ - -Hurl File -
PUT http://localhost:8000/put
-HTTP 200
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/querystring_params.hurl.html b/integration/report/html/tests/querystring_params.hurl.html deleted file mode 100644 index e8d9526b898..00000000000 --- a/integration/report/html/tests/querystring_params.hurl.html +++ /dev/null @@ -1,118 +0,0 @@ - -Hurl File -
GET http://localhost:8000/querystring-params
-[QueryStringParams]
-param1: value1
-param2:
-param3: a=b
-param4: 1,2,3
-HTTP 200
-
-
-# same version as raw
-GET http://localhost:8000/querystring-params?param1=value1&param2=&param3=a%3db&param4=1,2,3
-
-HTTP 200
-
-
-# combine version
-GET http://localhost:8000/querystring-params?param1=value1
-[QueryStringParams]
-param2:
-param3: a=b
-param4: 1,2,3
-HTTP 200
-
-
-# encoding slash
-GET http://localhost:8000/querystring-params-encoded?value1=/&value2=%2F
-[QueryStringParams]
-value3:/
-HTTP 200
-
- \ No newline at end of file diff --git a/integration/report/html/tests/redirect.hurl.html b/integration/report/html/tests/redirect.hurl.html deleted file mode 100644 index e1ae6a7d7c1..00000000000 --- a/integration/report/html/tests/redirect.hurl.html +++ /dev/null @@ -1,101 +0,0 @@ - -Hurl File -
GET http://localhost:8000/redirect
-HTTP 302
-Location: http://localhost:8000/redirected
-
-GET http://localhost:8000/redirected
-HTTP 200
-
-
-
-
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/subquery_count.hurl.html b/integration/report/html/tests/subquery_count.hurl.html deleted file mode 100644 index 6851fce8a42..00000000000 --- a/integration/report/html/tests/subquery_count.hurl.html +++ /dev/null @@ -1,96 +0,0 @@ - -Hurl File -
GET http://localhost:8000/subquery-count
-HTTP 200
-[Asserts]
-jsonpath "$.users" count == 3
-jsonpath "$.users" count > 1
-jsonpath "$.users" count <= 10
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/test_mode.hurl.html b/integration/report/html/tests/test_mode.hurl.html deleted file mode 100644 index 4a7d26696b5..00000000000 --- a/integration/report/html/tests/test_mode.hurl.html +++ /dev/null @@ -1,94 +0,0 @@ - -Hurl File -
GET http://localhost:8000/test-mode
-HTTP 200
-```Hello World!```
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/url.hurl.html b/integration/report/html/tests/url.hurl.html deleted file mode 100644 index fb24606d2ad..00000000000 --- a/integration/report/html/tests/url.hurl.html +++ /dev/null @@ -1,102 +0,0 @@ - -Hurl File -
GET http://localhost:8000/~user
-HTTP 200
-```user```
-
-GET http://localhost:8000/%7Euser
-HTTP 200
-```user```
-
-# TODO: add single quote (needs to be escaped in curl command-line)
-GET http://localhost:8000/!$&()*+,;=:@[]
-HTTP 200
-```weird```
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/user_in_url.hurl.html b/integration/report/html/tests/user_in_url.hurl.html deleted file mode 100644 index d0a7d1c77da..00000000000 --- a/integration/report/html/tests/user_in_url.hurl.html +++ /dev/null @@ -1,94 +0,0 @@ - -Hurl File -
GET http://bob:secret@localhost:8000/basic-authentication
-HTTP 200
-```You are authenticated```
-
-
-
- \ No newline at end of file diff --git a/integration/report/html/tests/utf8.hurl.html b/integration/report/html/tests/utf8.hurl.html deleted file mode 100644 index 411bea220da..00000000000 --- a/integration/report/html/tests/utf8.hurl.html +++ /dev/null @@ -1,95 +0,0 @@ - -Hurl File -
GET http://localhost:8000/utf8
-
-HTTP 200
-[Asserts]
-xpath "normalize-space(//data)" equals "café"
-xpath "normalize-space(//data)" equals "caf\u{e9}"
-
- \ No newline at end of file diff --git a/integration/report/html/tests/variables.hurl.html b/integration/report/html/tests/variables.hurl.html deleted file mode 100644 index aacfd9fde37..00000000000 --- a/integration/report/html/tests/variables.hurl.html +++ /dev/null @@ -1,113 +0,0 @@ - -Hurl File -
POST http://localhost:8000/variables
-Name: {{name}}
-Age: {{age}}
-Height: {{height}}
-Female: {{female}}
-Id: {{my-id}}
-A_Null: {{a_null}}
-{
-  "name": "{{name}}",
-  "age": {{age}},
-  "height": {{height}},
-  "female": {{female}},
-  "id": "{{my-id}}",
-  "a_null": {{a_null}}
-}
-
-HTTP 200
-[Asserts]
-variable "name" equals "Jennifer"
-variable "female" equals true
-variable "age" equals 30 
-variable "height" equals 1.70
-variable "a_null" equals null 
-variable "my-id" equals "123"
-
- \ No newline at end of file diff --git a/integration/report/tests.json b/integration/report/tests.json deleted file mode 100644 index b3fa122628d..00000000000 --- a/integration/report/tests.json +++ /dev/null @@ -1,9575 +0,0 @@ -[ - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 9, - "success": true - }, - { - "line": 9, - "success": true - }, - { - "line": 10, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/assert-base64" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "19" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - } - ], - "filename": "tests/assert_base64.hurl", - "success": true, - "time": 5 - }, - { - "cookies": [ - { - "domain": "localhost", - "expires": "0", - "https": "FALSE", - "include_subdomain": "FALSE", - "name": "cookie1", - "path": "/", - "value": "value1" - }, - { - "domain": "localhost", - "expires": "0", - "https": "FALSE", - "include_subdomain": "FALSE", - "name": "cookie2", - "path": "/", - "value": "value2" - }, - { - "domain": "localhost", - "expires": "0", - "https": "FALSE", - "include_subdomain": "FALSE", - "name": "cookie3", - "path": "/", - "value": "value3" - } - ], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 3, - "success": true - }, - { - "line": 4, - "success": true - }, - { - "line": 5, - "success": true - }, - { - "line": 7, - "success": true - }, - { - "line": 8, - "success": true - }, - { - "line": 9, - "success": true - }, - { - "line": 10, - "success": true - }, - { - "line": 11, - "success": true - }, - { - "line": 12, - "success": true - }, - { - "line": 13, - "success": true - }, - { - "line": 14, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/assert-header" - }, - "response": { - "cookies": [ - { - "name": "cookie1", - "path": "/", - "value": "value1" - }, - { - "name": "cookie2", - "path": "/", - "value": "value2" - }, - { - "name": "cookie3", - "path": "/", - "value": "value3" - } - ], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Header1", - "value": "value1" - }, - { - "name": "ETag", - "value": "\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" - }, - { - "name": "Set-Cookie", - "value": "cookie1=value1; Path=/" - }, - { - "name": "Set-Cookie", - "value": "cookie2=value2; Path=/" - }, - { - "name": "Set-Cookie", - "value": "cookie3=value3; Path=/" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 6 - } - ], - "filename": "tests/assert_header.hurl", - "success": true, - "time": 9 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 37, - "success": true - }, - { - "line": 4, - "success": true - }, - { - "line": 5, - "success": true - }, - { - "line": 6, - "success": true - }, - { - "line": 7, - "success": true - }, - { - "line": 8, - "success": true - }, - { - "line": 9, - "success": true - }, - { - "line": 10, - "success": true - }, - { - "line": 11, - "success": true - }, - { - "line": 12, - "success": true - }, - { - "line": 13, - "success": true - }, - { - "line": 14, - "success": true - }, - { - "line": 15, - "success": true - }, - { - "line": 16, - "success": true - }, - { - "line": 17, - "success": true - }, - { - "line": 18, - "success": true - }, - { - "line": 19, - "success": true - }, - { - "line": 20, - "success": true - }, - { - "line": 21, - "success": true - }, - { - "line": 22, - "success": true - }, - { - "line": 23, - "success": true - }, - { - "line": 24, - "success": true - }, - { - "line": 25, - "success": true - }, - { - "line": 26, - "success": true - }, - { - "line": 27, - "success": true - }, - { - "line": 28, - "success": true - }, - { - "line": 29, - "success": true - }, - { - "line": 30, - "success": true - }, - { - "line": 31, - "success": true - }, - { - "line": 32, - "success": true - }, - { - "line": 33, - "success": true - }, - { - "line": 34, - "success": true - }, - { - "line": 35, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/assert-json" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - }, - { - "name": "Content-Length", - "value": "160" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 8 - }, - { - "asserts": [ - { - "line": 48, - "success": true - }, - { - "line": 48, - "success": true - } - ], - "captures": [ - { - "name": "index", - "value": "1" - } - ], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/assert-json/index" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "1" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - }, - { - "asserts": [ - { - "line": 53, - "success": true - }, - { - "line": 53, - "success": true - }, - { - "line": 55, - "success": true - }, - { - "line": 56, - "success": true - }, - { - "line": 57, - "success": true - }, - { - "line": 58, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/assert-json" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - }, - { - "name": "Content-Length", - "value": "160" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - }, - { - "asserts": [ - { - "line": 62, - "success": true - }, - { - "line": 62, - "success": true - }, - { - "line": 64, - "success": true - }, - { - "line": 65, - "success": true - }, - { - "line": 66, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/assert-json/list" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - }, - { - "name": "Content-Length", - "value": "61" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 3 - } - ], - "filename": "tests/assert_json.hurl", - "success": true, - "time": 28 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 4, - "success": true - }, - { - "line": 5, - "success": true - }, - { - "line": 6, - "success": true - }, - { - "line": 7, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/assert-match" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - }, - { - "name": "Content-Length", - "value": "53" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 7 - } - ], - "filename": "tests/assert_match.hurl", - "success": true, - "time": 18 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 3, - "success": true - }, - { - "line": 3, - "success": true - }, - { - "line": 5, - "success": true - }, - { - "line": 6, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/assert-regex" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "12" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 6 - } - ], - "filename": "tests/assert_regex.hurl", - "success": true, - "time": 9 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/assert-status-code" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 201 - }, - "time": 8 - }, - { - "asserts": [ - { - "line": 7, - "success": true - }, - { - "line": 9, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/assert-status-code" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 201 - }, - "time": 2 - }, - { - "asserts": [ - { - "line": 14, - "success": true - }, - { - "line": 16, - "success": true - }, - { - "line": 17, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/assert-status-code" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 201 - }, - "time": 2 - } - ], - "filename": "tests/assert_status_code.hurl", - "success": true, - "time": 14 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 3, - "success": true - }, - { - "line": 3, - "success": true - }, - { - "line": 9, - "success": true - }, - { - "line": 5, - "success": true - }, - { - "line": 6, - "success": true - }, - { - "line": 7, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/assert-xpath" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "18" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 3 - } - ], - "filename": "tests/assert_xpath.hurl", - "success": true, - "time": 4 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 3, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Authorization", - "value": "Basic Ym9iOnNlY3JldA==" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/basic-authentication" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "21" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 5 - } - ], - "filename": "tests/basic_authentication.hurl", - "success": true, - "time": 6 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 3, - "success": true - }, - { - "line": 3, - "success": true - }, - { - "line": 4, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/utf8_bom" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "12" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 9 - } - ], - "filename": "tests/bom.hurl", - "success": true, - "time": 9 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 3, - "success": true - }, - { - "line": 5, - "success": true - }, - { - "line": 6, - "success": true - }, - { - "line": 7, - "success": true - }, - { - "line": 8, - "success": true - }, - { - "line": 9, - "success": true - }, - { - "line": 10, - "success": true - }, - { - "line": 11, - "success": true - }, - { - "line": 12, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/bytes" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/octet-stream" - }, - { - "name": "Content-Length", - "value": "3" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 7 - } - ], - "filename": "tests/bytes.hurl", - "success": true, - "time": 8 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 6, - "success": true - } - ], - "captures": [ - { - "name": "content_type", - "value": "text/html; charset=utf-8" - } - ], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/capture-and-assert" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "12" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 6 - } - ], - "filename": "tests/capture_and_assert.hurl", - "success": true, - "time": 6 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 3, - "success": true - }, - { - "line": 3, - "success": true - }, - { - "line": 8, - "success": true - }, - { - "line": 9, - "success": true - } - ], - "captures": [ - { - "name": "param1", - "value": "value1" - }, - { - "name": "param2", - "value": "Bob" - } - ], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/captures" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Header1", - "value": "value1" - }, - { - "name": "Header2", - "value": "Hello Bob!" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 6 - }, - { - "asserts": [ - { - "line": 16, - "success": true - }, - { - "line": 16, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [ - { - "name": "param1", - "value": "value1" - }, - { - "name": "param2", - "value": "Bob" - } - ], - "url": "http://localhost:8000/captures-check?param1=value1¶m2=Bob" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 3 - }, - { - "asserts": [ - { - "line": 20, - "success": true - }, - { - "line": 20, - "success": true - }, - { - "line": 31, - "success": true - }, - { - "line": 32, - "success": true - }, - { - "line": 33, - "success": true - }, - { - "line": 34, - "success": true - }, - { - "line": 35, - "success": true - }, - { - "line": 36, - "success": true - }, - { - "line": 37, - "success": true - }, - { - "line": 38, - "success": true - } - ], - "captures": [ - { - "name": "an_object", - "value": { - "id": "123" - } - }, - { - "name": "a_list", - "value": [ - 1, - 2, - 3 - ] - }, - { - "name": "a_null", - "value": null - }, - { - "name": "an_integer", - "value": 1 - }, - { - "name": "a_float", - "value": 1.1 - }, - { - "name": "a_bool", - "value": true - }, - { - "name": "a_string", - "value": "hello" - }, - { - "name": "all", - "value": { - "a_bool": true, - "a_float": 1.1, - "a_list": [ - 1, - 2, - 3 - ], - "a_null": null, - "a_string": "hello", - "an_integer": 1, - "an_object": { - "id": "123" - } - } - } - ], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/captures-json" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "135" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 3 - } - ], - "filename": "tests/captures.hurl", - "success": true, - "time": 19 - }, - { - "cookies": [], - "entries": [], - "filename": "tests/color.hurl", - "success": true, - "time": 0 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 3, - "success": true - }, - { - "line": 3, - "success": true - }, - { - "line": 4, - "success": true - }, - { - "line": 5, - "success": true - }, - { - "line": 6, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Accept-Encoding", - "value": "gzip, deflate, br" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/compressed/none" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "12" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 10 - }, - { - "asserts": [ - { - "line": 9, - "success": true - }, - { - "line": 9, - "success": true - }, - { - "line": 10, - "success": true - }, - { - "line": 11, - "success": true - }, - { - "line": 12, - "success": true - }, - { - "line": 13, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Accept-Encoding", - "value": "gzip, deflate, br" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/compressed/gzip" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "32" - }, - { - "name": "Content-Encoding", - "value": "gzip" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - }, - { - "asserts": [ - { - "line": 16, - "success": true - }, - { - "line": 16, - "success": true - }, - { - "line": 17, - "success": true - }, - { - "line": 18, - "success": true - }, - { - "line": 19, - "success": true - }, - { - "line": 20, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Accept-Encoding", - "value": "gzip, deflate, br" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/compressed/zlib" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "20" - }, - { - "name": "Content-Encoding", - "value": "deflate" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 6 - }, - { - "asserts": [ - { - "line": 23, - "success": true - }, - { - "line": 23, - "success": true - }, - { - "line": 24, - "success": true - }, - { - "line": 25, - "success": true - }, - { - "line": 26, - "success": true - }, - { - "line": 27, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Accept-Encoding", - "value": "gzip, deflate, br" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/compressed/brotli" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "17" - }, - { - "name": "Content-Encoding", - "value": "br" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 3 - }, - { - "asserts": [ - { - "line": 30, - "success": true - }, - { - "line": 30, - "success": true - }, - { - "line": 31, - "success": true - }, - { - "line": 32, - "success": true - }, - { - "line": 33, - "success": true - }, - { - "line": 34, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Accept-Encoding", - "value": "gzip, deflate, br" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/compressed/brotli_identity" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "17" - }, - { - "name": "Content-Encoding", - "value": "br, identity" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - } - ], - "filename": "tests/compressed.hurl", - "success": true, - "time": 35 - }, - { - "cookies": [ - { - "domain": ".localhost", - "expires": "0", - "https": "FALSE", - "include_subdomain": "TRUE", - "name": "cookie1", - "path": "/", - "value": "valueA" - } - ], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [ - { - "name": "cookie1", - "value": "valueA" - } - ], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Cookie", - "value": "cookie1=valueA" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/cookie_file" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 3 - } - ], - "filename": "tests/cookie_file.hurl", - "success": true, - "time": 4 - }, - { - "cookies": [ - { - "domain": ".localhost", - "expires": "1610576581", - "https": "FALSE", - "include_subdomain": "TRUE", - "name": "HSID", - "path": "/", - "value": "AYQEVnDKrdst" - } - ], - "entries": [ - { - "asserts": [ - { - "line": 6, - "success": true - }, - { - "line": 6, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [ - { - "name": "cookie1", - "value": "valueA" - } - ], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Cookie", - "value": "cookie1=valueA" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/cookies/set-request-cookie1-valueA" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 5 - }, - { - "asserts": [ - { - "line": 10, - "success": true - }, - { - "line": 10, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/cookies/assert-that-cookie1-is-not-in-session" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - }, - { - "asserts": [ - { - "line": 16, - "success": true - }, - { - "line": 16, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [ - { - "name": "user1", - "value": "Bob" - }, - { - "name": "user2", - "value": "Bill" - } - ], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Cookie", - "value": "user1=Bob; user2=Bill" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/cookies/set-multiple-request-cookies" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - }, - { - "asserts": [ - { - "line": 22, - "success": true - }, - { - "line": 22, - "success": true - }, - { - "line": 24, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/cookies/set-session-cookie2-valueA" - }, - "response": { - "cookies": [ - { - "name": "cookie2", - "path": "/", - "value": "valueA" - } - ], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Set-Cookie", - "value": "cookie2=valueA; Path=/" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - }, - { - "asserts": [ - { - "line": 27, - "success": true - }, - { - "line": 27, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [ - { - "name": "cookie2", - "value": "valueA" - } - ], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Cookie", - "value": "cookie2=valueA" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/cookies/assert-that-cookie2-is-valueA" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - }, - { - "asserts": [ - { - "line": 32, - "success": true - }, - { - "line": 32, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [ - { - "name": "cookie2", - "value": "valueA" - }, - { - "name": "cookie2", - "value": "valueB" - } - ], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Cookie", - "value": "cookie2=valueA; cookie2=valueB" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/cookies/assert-that-cookie2-is-valueA-and-valueB" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 3 - }, - { - "asserts": [ - { - "line": 36, - "success": true - }, - { - "line": 36, - "success": true - }, - { - "line": 38, - "success": true - }, - { - "line": 39, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [ - { - "name": "cookie2", - "value": "valueA" - } - ], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Cookie", - "value": "cookie2=valueA" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/cookies/delete-cookie2" - }, - "response": { - "cookies": [ - { - "expires": "Mon, 08 Nov 2021 10:38:54 GMT", - "max_age": "0", - "name": "cookie2", - "path": "/", - "value": "" - } - ], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Set-Cookie", - "value": "cookie2=; Expires=Mon, 08 Nov 2021 10:38:54 GMT; Max-Age=0; Path=/" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - }, - { - "asserts": [ - { - "line": 42, - "success": true - }, - { - "line": 42, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/cookies/assert-that-cookie2-is-not-in-session" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - }, - { - "asserts": [ - { - "line": 45, - "success": true - }, - { - "line": 45, - "success": true - }, - { - "line": 46, - "success": true - }, - { - "line": 47, - "success": true - }, - { - "line": 48, - "success": true - }, - { - "line": 51, - "success": true - }, - { - "line": 52, - "success": true - }, - { - "line": 53, - "success": true - }, - { - "line": 54, - "success": true - }, - { - "line": 55, - "success": true - }, - { - "line": 56, - "success": true - }, - { - "line": 57, - "success": true - }, - { - "line": 58, - "success": true - }, - { - "line": 59, - "success": true - }, - { - "line": 60, - "success": true - }, - { - "line": 61, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/cookies/set" - }, - "response": { - "cookies": [ - { - "expires": "Wed, 13 Jan 2021 22:23:01 GMT", - "httponly": true, - "name": "LSID", - "path": "/accounts", - "secure": true, - "value": "DQAAAKEaem_vYg" - }, - { - "domain": ".localhost", - "expires": "Wed, 13 Jan 2021 22:23:01 GMT", - "httponly": true, - "name": "HSID", - "path": "/", - "value": "AYQEVnDKrdst" - }, - { - "domain": ".localhost", - "expires": "Wed, 13 Jan 2021 22:23:01 GMT", - "httponly": true, - "name": "SSID", - "path": "/", - "secure": true, - "value": "Ap4PGTEq" - } - ], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Set-Cookie", - "value": "LSID=DQAAAKEaem_vYg; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly; Path=/accounts" - }, - { - "name": "Set-Cookie", - "value": "HSID=AYQEVnDKrdst; Domain=.localhost; Expires=Wed, 13 Jan 2021 22:23:01 GMT; HttpOnly; Path=/" - }, - { - "name": "Set-Cookie", - "value": "SSID=Ap4PGTEq; Domain=.localhost; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly; Path=/" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 3 - } - ], - "filename": "tests/cookies.hurl", - "success": true, - "time": 36 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 8, - "success": true - }, - { - "line": 8, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [ - { - "name": "cookie1", - "value": "valueA" - } - ], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Cookie", - "value": "cookie1=valueA" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/cookie-storage/assert-that-cookie1-is-valueA" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - }, - { - "asserts": [ - { - "line": 12, - "success": true - }, - { - "line": 12, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/cookie-storage/assert-that-cookie1-is-not-in-session" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - } - ], - "filename": "tests/cookie_storage.hurl", - "success": true, - "time": 7 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "DELETE", - "queryString": [], - "url": "http://localhost:8000/delete" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:54 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 6 - } - ], - "filename": "tests/delete.hurl", - "success": true, - "time": 7 - }, - { - "cookies": [], - "entries": [], - "filename": "tests/empty.hurl", - "success": true, - "time": 0 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 3, - "success": true - }, - { - "line": 5, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/encoding/utf8" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "5" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:55 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - }, - { - "asserts": [ - { - "line": 9, - "success": true - }, - { - "line": 9, - "success": true - }, - { - "line": 10, - "success": true - }, - { - "line": 12, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/encoding/latin1" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=ISO-8859-1" - }, - { - "name": "Content-Length", - "value": "4" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:55 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - } - ], - "filename": "tests/encoding.hurl", - "success": true, - "time": 8 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 11, - "success": true - }, - { - "line": 11, - "success": true - }, - { - "line": 12, - "message": "Assert Body Value\n --> tests/error_assert_base64.hurl:12:8\n |\n12 | base64,bGluZTEKbGluZTIKbGluZTMK;\n | ^^^^^^^^^^^^^^^^^^^^^^^^ actual value is \n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/assert-base64" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "19" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:55 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - } - ], - "filename": "tests/error_assert_base64.hurl", - "success": false, - "time": 5 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 4, - "message": "Assert Failure\n --> tests/error_assert_bytearray.hurl:4:0\n |\n 4 | bytes equals hex,00;\n | actual: byte array \n | expected: byte array <00>\n |", - "success": false - }, - { - "line": 5, - "message": "Assert Failure\n --> tests/error_assert_bytearray.hurl:5:0\n |\n 5 | sha256 equals hex,a8100ae6aa1940d0b663bb31cd466142ebbdbd5187131b92d93818987832eb88;\n | actual: byte array \n | expected: byte array \n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/error-assert-bytearray" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/octet-stream" - }, - { - "name": "Content-Length", - "value": "1" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:55 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 12 - } - ], - "filename": "tests/error_assert_bytearray.hurl", - "success": false, - "time": 15 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 3, - "success": true - }, - { - "line": 3, - "success": true - }, - { - "line": 4, - "message": "Decompression Error\n --> tests/error_assert_content_encoding.hurl:4:1\n |\n 4 | ```Hello World!```\n | ^ Compression unknown is not supported\n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/error/content-encoding" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Encoding", - "value": "unknown" - }, - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "5" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:55 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 5 - } - ], - "filename": "tests/error_assert_content_encoding.hurl", - "success": false, - "time": 7 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 3, - "message": "Decompression Error\n --> tests/error_assert_decompress.hurl:3:1\n |\n 3 | ```Hello World!```\n | ^ Could not uncompress response with gzip\n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Accept-Encoding", - "value": "gzip, deflate, br" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/error-assert-decompress" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Encoding", - "value": "gzip" - }, - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "5" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:55 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 6 - } - ], - "filename": "tests/error_assert_decompress.hurl", - "success": false, - "time": 7 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 7, - "success": true - }, - { - "line": 7, - "success": true - }, - { - "line": 8, - "message": "Assert Body Value\n --> tests/error_assert_file.hurl:8:1\n |\n 8 | file,data.txt;\n | ^ actual value is \n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/error-assert-file" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "5" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:55 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 9 - } - ], - "filename": "tests/error_assert_file.hurl", - "success": false, - "time": 10 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 3, - "message": "Header not Found\n --> tests/error_assert_header_not_found.hurl:3:1\n |\n 3 | Custom: ???\n | ^^^^^^ This header has not been found in the response\n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/error-assert-header-not-found" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "12" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:55 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 8 - } - ], - "filename": "tests/error_assert_header_not_found.hurl", - "success": false, - "time": 10 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 3, - "message": "Assert Header Value\n --> tests/error_assert_header_value.hurl:3:15\n |\n 3 | Content-Type: ???\n | ^^^ actual value is \n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/error-assert-header-value" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "12" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:55 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - } - ], - "filename": "tests/error_assert_header_value.hurl", - "success": false, - "time": 5 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "message": "Assert Http Version\n --> tests/error_assert_http_version.hurl:2:6\n |\n 2 | HTTP/2 200\n | ^ actual value is <1.0>\n |", - "success": false - }, - { - "line": 2, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/error-assert/http-version" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:55 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - } - ], - "filename": "tests/error_assert_http_version.hurl", - "success": false, - "time": 4 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 4, - "message": "Assert Failure\n --> tests/error_assert_invalid_predicate_type.hurl:4:0\n |\n 4 | header \"content-type\" equals 1\n | actual: string \n | expected: int <1>\n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/error-assert-invalid-predicate-type" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:55 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 5 - } - ], - "filename": "tests/error_assert_invalid_predicate_type.hurl", - "success": false, - "time": 6 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 4, - "message": "Invalid Decoding\n --> tests/error_assert_match_utf8.hurl:4:1\n |\n 4 | body matches \".*\"\n | ^^^^ The body can not be decoded with charset 'utf-8'\n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/error-assert/match-utf8" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "1" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:55 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 5 - } - ], - "filename": "tests/error_assert_match_utf8.hurl", - "success": false, - "time": 6 - }, - { - "cookies": [ - { - "domain": "localhost", - "expires": "0", - "https": "FALSE", - "include_subdomain": "FALSE", - "name": "cookie1", - "path": "/", - "value": "value1" - } - ], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 6, - "success": true - }, - { - "line": 7, - "message": "Assert Failure\n --> tests/error_assert_query_cookie.hurl:7:0\n |\n 7 | cookie \"cookie1[Secure]\" equals false # This is not valid, Secure attribute exists or not but does have a value\n | actual: none\n | expected: bool \n |", - "success": false - }, - { - "line": 8, - "success": true - }, - { - "line": 10, - "success": true - }, - { - "line": 11, - "message": "Assert Failure\n --> tests/error_assert_query_cookie.hurl:11:0\n |\n11 | cookie \"cookie2[Secure]\" equals true # This is not valid, Secure attribute exists or not but does have a value\n | actual: unit\n | expected: bool \n | >>> types between actual and expected are not consistent\n |", - "success": false - }, - { - "line": 12, - "message": "Assert Failure\n --> tests/error_assert_query_cookie.hurl:12:0\n |\n12 | cookie \"cookie2[Secure]\" not equals true # This is not valid, Secure attribute exists or not but does have a value\n | actual: unit\n | expected: not bool \n | >>> types between actual and expected are not consistent\n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/error-assert-query-cookie" - }, - "response": { - "cookies": [ - { - "name": "cookie1", - "path": "/", - "value": "value1" - }, - { - "name": "cookie2", - "path": "/", - "secure": true, - "value": "value2" - } - ], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Set-Cookie", - "value": "cookie1=value1; Path=/" - }, - { - "name": "Set-Cookie", - "value": "cookie2=value2; Secure; Path=/" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:55 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 5 - } - ], - "filename": "tests/error_assert_query_cookie.hurl", - "success": false, - "time": 8 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 4, - "message": "Invalid regex\n --> tests/error_assert_query_invalid_regex.hurl:4:7\n |\n 4 | regex \"[x\" exists\n | ^^^^ Regex expression is not valid\n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/error-assert-query-invalid-regex" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:55 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 5 - } - ], - "filename": "tests/error_assert_query_invalid_regex.hurl", - "success": false, - "time": 6 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 4, - "message": "Invalid xpath expression\n --> tests/error_assert_query_invalid_xpath.hurl:4:7\n |\n 4 | xpath \"//\" equals 1\n | ^^^^ The xpath expression is not valid\n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/utf8" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "18" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:55 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 8 - } - ], - "filename": "tests/error_assert_query_invalid_xpath.hurl", - "success": false, - "time": 9 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "message": "Assert Status\n --> tests/error_assert_status.hurl:2:10\n |\n 2 | HTTP/1.0 200\n | ^^^ actual value is <404>\n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/not_found" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "232" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:55 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 404 - }, - "time": 4 - } - ], - "filename": "tests/error_assert_status.hurl", - "success": false, - "time": 4 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 4, - "message": "Undefined Variable\n --> tests/error_assert_template_variable_not_found.hurl:4:33\n |\n 4 | header \"content-type\" equals \"{{content_type}}\"\n | ^^^^^^^^^^^^ You must set the variable content_type\n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/error-assert-template-variable-not-found" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:55 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 12 - } - ], - "filename": "tests/error_assert_template_variable_not_found.hurl", - "success": false, - "time": 13 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 4, - "message": "Assert Failure\n --> tests/error_assert_value_error.hurl:4:0\n |\n 4 | header \"content-type\" equals \"XXX\"\n | actual: string \n | expected: string \n |", - "success": false - }, - { - "line": 5, - "message": "Assert Failure\n --> tests/error_assert_value_error.hurl:5:0\n |\n 5 | header \"content-type\" notEquals \"text/html; charset=utf-8\"\n | actual: string \n | expected: string \n |", - "success": false - }, - { - "line": 6, - "message": "Assert Failure\n --> tests/error_assert_value_error.hurl:6:0\n |\n 6 | jsonpath \"$.id\" equals \"000001\"\n | actual: none\n | expected: string <000001>\n |", - "success": false - }, - { - "line": 7, - "message": "Assert Failure\n --> tests/error_assert_value_error.hurl:7:0\n |\n 7 | jsonpath \"$.values\" includes 100\n | actual: [int <1>, int <2>, int <3>]\n | expected: includes int <100>\n |", - "success": false - }, - { - "line": 8, - "message": "Assert Failure\n --> tests/error_assert_value_error.hurl:8:0\n |\n 8 | jsonpath \"$.values\" not contains \"Hello\"\n | actual: [int <1>, int <2>, int <3>]\n | expected: not contains string \n | >>> types between actual and expected are not consistent\n |", - "success": false - }, - { - "line": 9, - "message": "Assert Failure\n --> tests/error_assert_value_error.hurl:9:0\n |\n 9 | jsonpath \"$.count\" greaterThan 5\n | actual: int <2>\n | expected: greater than int <5>\n |", - "success": false - }, - { - "line": 10, - "message": "Assert Failure\n --> tests/error_assert_value_error.hurl:10:0\n |\n10 | jsonpath \"$.count\" isFloat\n | actual: int <2>\n | expected: float\n |", - "success": false - }, - { - "line": 11, - "message": "Assert Failure\n --> tests/error_assert_value_error.hurl:11:0\n |\n11 | bytes contains hex,00;\n | actual: byte array <7b202276616c756573223a205b312c322c335d2c2022636f756e74223a20327d>\n | expected: contains byte array <00>\n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/error-assert-value" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "32" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:56 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - } - ], - "filename": "tests/error_assert_value_error.hurl", - "success": false, - "time": 11 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 8, - "message": "Assert Failure\n --> tests/error_assert_variable.hurl:8:0\n |\n 8 | variable \"toto\" equals \"tata\"\n | actual: none\n | expected: string \n |", - "success": false - }, - { - "line": 9, - "message": "Undefined Variable\n --> tests/error_assert_variable.hurl:9:28\n |\n 9 | variable \"status\" equals {{unknown}}\n | ^^^^^^^ You must set the variable unknown\n |", - "success": false - }, - { - "line": 10, - "message": "Assert Failure\n --> tests/error_assert_variable.hurl:10:0\n |\n10 | variable \"status\" equals {{type}}\n | actual: int <200>\n | expected: string \n |", - "success": false - }, - { - "line": 11, - "message": "Assert Failure\n --> tests/error_assert_variable.hurl:11:0\n |\n11 | variable \"status\" equals {{length}}\n | actual: int <200>\n | expected: string <0>\n |", - "success": false - } - ], - "captures": [ - { - "name": "status", - "value": 200 - }, - { - "name": "length", - "value": "0" - }, - { - "name": "type", - "value": "text/html; charset=utf-8" - } - ], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/error-assert-variable" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:56 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 11 - } - ], - "filename": "tests/error_assert_variable.hurl", - "success": false, - "time": 15 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 4, - "message": "Invalid xpath expression\n --> tests/error_assert_xpath.hurl:4:7\n |\n 4 | xpath \"strong(//head/title)\" equals \"Welcome to Quiz!\"\n | ^^^^^^^^^^^^^^^^^^^^^^ The xpath expression is not valid\n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/error-assert-xpath" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "45" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:56 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 5 - } - ], - "filename": "tests/error_assert_xpath.hurl", - "success": false, - "time": 6 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [], - "captures": [], - "time": 0 - } - ], - "filename": "tests/error_body_json.hurl", - "success": false, - "time": 0 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [], - "captures": [], - "time": 0 - } - ], - "filename": "tests/error_connect_timeout.hurl", - "success": false, - "time": 1003 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [], - "captures": [], - "time": 0 - } - ], - "filename": "tests/error_file_read_access.hurl", - "success": false, - "time": 0 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [], - "captures": [], - "time": 0 - } - ], - "filename": "tests/error_http_connection.hurl", - "success": false, - "time": 30 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 4, - "message": "Invalid jsonpath\n --> tests/error_invalid_jsonpath.hurl:4:10\n |\n 4 | jsonpath \"\" equals false\n | ^^ the jsonpath expression '' is not valid\n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/error-invalid-jsonpath" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - }, - { - "name": "Content-Length", - "value": "60" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:57 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 7 - } - ], - "filename": "tests/error_invalid_jsonpath.hurl", - "success": false, - "time": 8 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [], - "captures": [], - "time": 0 - } - ], - "filename": "tests/error_invalid_url.hurl", - "success": false, - "time": 0 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 4, - "message": "Invalid XML\n --> tests/error_invalid_xml.hurl:4:1\n |\n 4 | xpath \"xx\" equals 1\n | ^^^^^^^^^^ The Http response is not a valid XML\n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/error-invalid-xml" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:57 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 8 - } - ], - "filename": "tests/error_invalid_xml.hurl", - "success": false, - "time": 11 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [], - "captures": [], - "time": 0 - } - ], - "filename": "tests/error_max_redirect.hurl", - "success": false, - "time": 28 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [], - "captures": [], - "time": 0 - } - ], - "filename": "tests/error_multipart_form_data.hurl", - "success": false, - "time": 0 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 4, - "message": "Assert Failure\n --> tests/error_predicate.hurl:4:0\n |\n 4 | jsonpath \"$.status\" equals \"true\"\n | actual: bool \n | expected: string \n |", - "success": false - }, - { - "line": 6, - "message": "Assert Failure\n --> tests/error_predicate.hurl:6:0\n |\n 6 | jsonpath \"$.count\" equals 0\n | actual: int <1>\n | expected: int <0>\n |", - "success": false - }, - { - "line": 7, - "message": "Assert Failure\n --> tests/error_predicate.hurl:7:0\n |\n 7 | jsonpath \"$.message\" equals 0\n | actual: string <0>\n | expected: int <0>\n |", - "success": false - }, - { - "line": 8, - "message": "Assert Failure\n --> tests/error_predicate.hurl:8:0\n |\n 8 | jsonpath \"$.empty\" equals 0\n | actual: string <>\n | expected: int <0>\n |", - "success": false - }, - { - "line": 9, - "message": "Assert Failure\n --> tests/error_predicate.hurl:9:0\n |\n 9 | jsonpath \"$.number\" equals 1.1\n | actual: float <1.0>\n | expected: float <1.100000000000000000>\n |", - "success": false - }, - { - "line": 10, - "message": "Assert Failure\n --> tests/error_predicate.hurl:10:0\n |\n10 | jsonpath \"$.message\" startsWith \"hi\"\n | actual: string <0>\n | expected: starts with string \n |", - "success": false - }, - { - "line": 11, - "message": "Assert Failure\n --> tests/error_predicate.hurl:11:0\n |\n11 | jsonpath \"$.message\" endsWith \"hi\"\n | actual: string <0>\n | expected: ends with string \n |", - "success": false - }, - { - "line": 12, - "message": "Assert Failure\n --> tests/error_predicate.hurl:12:0\n |\n12 | jsonpath \"$.message\" contains \"hi\"\n | actual: string <0>\n | expected: contains string \n |", - "success": false - }, - { - "line": 13, - "message": "Assert Failure\n --> tests/error_predicate.hurl:13:0\n |\n13 | jsonpath \"$.message\" matches \"hi\"\n | actual: string <0>\n | expected: matches regex \n |", - "success": false - }, - { - "line": 14, - "message": "Subquery error\n --> tests/error_predicate.hurl:14:22\n |\n14 | jsonpath \"$.message\" count == 1\n | ^^^^^ Type from query result and subquery do not match\n |", - "success": false - }, - { - "line": 15, - "message": "Assert Failure\n --> tests/error_predicate.hurl:15:0\n |\n15 | jsonpath \"$.toto\" exists\n | actual: none\n | expected: something\n |", - "success": false - }, - { - "line": 16, - "message": "Assert Failure\n --> tests/error_predicate.hurl:16:0\n |\n16 | jsonpath \"$.message\" not exists\n | actual: string <0>\n | expected: not something\n |", - "success": false - }, - { - "line": 17, - "message": "Assert Failure\n --> tests/error_predicate.hurl:17:0\n |\n17 | jsonpath \"$.list\" count == 2\n | actual: int <3>\n | expected: int <2>\n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/predicate/error/type" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "126" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:58 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 5 - } - ], - "filename": "tests/error_predicate.hurl", - "success": false, - "time": 16 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 3, - "message": "Header not Found\n --> tests/error_query_header_not_found.hurl:3:1\n |\n 3 | Custom: XXX\n | ^^^^^^ This header has not been found in the response\n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/error-query-header-not-found" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "12" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:58 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 7 - } - ], - "filename": "tests/error_query_header_not_found.hurl", - "success": false, - "time": 7 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 4, - "message": "Invalid Json\n --> tests/error_query_invalid_json.hurl:4:1\n |\n 4 | jsonpath \"$.errors\" count == 2\n | ^^^^^^^^^^^^^^^^^^^ The http response is not a valid json\n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/error-query-invalid-json" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "12" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:58 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - } - ], - "filename": "tests/error_query_invalid_json.hurl", - "success": false, - "time": 5 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 4, - "message": "Invalid Decoding\n --> tests/error_query_invalid_utf8.hurl:4:1\n |\n 4 | jsonpath \"$.errors\" count == 2\n | ^^^^^^^^^^^^^^^^^^^ The body can not be decoded with charset 'utf-8'\n |", - "success": false - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/error-query-invalid-utf8" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "1" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:58 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 5 - } - ], - "filename": "tests/error_query_invalid_utf8.hurl", - "success": false, - "time": 6 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [], - "captures": [], - "time": 0 - } - ], - "filename": "tests/error_template_variable_not_found.hurl", - "success": false, - "time": 0 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - } - ], - "captures": [ - { - "name": "list", - "value": [ - 1, - 2, - 3 - ] - } - ], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/get-list" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "18" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:58 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - }, - { - "asserts": [], - "captures": [], - "time": 0 - } - ], - "filename": "tests/error_template_variable_not_renderable.hurl", - "success": false, - "time": 6 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [], - "captures": [], - "time": 0 - } - ], - "filename": "tests/error_timeout.hurl", - "success": false, - "time": 1003 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 5, - "success": true - }, - { - "line": 5, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Expect", - "value": "100-continue" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "4" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/expect" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:59 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 10 - } - ], - "filename": "tests/expect.hurl", - "success": true, - "time": 11 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/follow-redirect" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "286" - }, - { - "name": "Location", - "value": "http://localhost:8000/following-redirect" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:59 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 302 - }, - "time": 4 - }, - { - "asserts": [], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/following-redirect" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "284" - }, - { - "name": "Location", - "value": "http://localhost:8000/followed-redirect" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:59 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 302 - }, - "time": 10 - }, - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 3, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/followed-redirect" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "18" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:59 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 3 - } - ], - "filename": "tests/follow_redirect.hurl", - "success": true, - "time": 18 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 8, - "success": true - }, - { - "line": 8, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Content-Type", - "value": "application/x-www-form-urlencoded" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "49" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/form-params" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:59 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 6 - }, - { - "asserts": [ - { - "line": 15, - "success": true - }, - { - "line": 15, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Content-Type", - "value": "application/x-www-form-urlencoded" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "49" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/form-params" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:59 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 3 - } - ], - "filename": "tests/form_params.hurl", - "success": true, - "time": 13 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/default-headers" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:59 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - }, - { - "asserts": [ - { - "line": 7, - "success": true - }, - { - "line": 7, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.0" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/default-headers" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:59 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - }, - { - "asserts": [ - { - "line": 13, - "success": true - }, - { - "line": 13, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.0" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/default-headers" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:59 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - }, - { - "asserts": [ - { - "line": 21, - "success": true - }, - { - "line": 21, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Fruit", - "value": "Raspberry" - }, - { - "name": "Fruit", - "value": "Apple" - }, - { - "name": "Fruit", - "value": "Banana" - }, - { - "name": "Fruit", - "value": "Grape" - }, - { - "name": "Color", - "value": "Green" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/custom-headers" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:59 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 6 - }, - { - "asserts": [ - { - "line": 25, - "success": true - }, - { - "line": 25, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Beverage", - "value": "café" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/custom-headers-utf8" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:59 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - }, - { - "asserts": [ - { - "line": 29, - "success": true - }, - { - "line": 29, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Id", - "value": "#123" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/custom-headers-value" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:59 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - }, - { - "asserts": [ - { - "line": 33, - "success": true - }, - { - "line": 33, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Header1", - "value": "'" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/custom-headers-quote" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:59 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 10 - }, - { - "asserts": [ - { - "line": 36, - "success": true - }, - { - "line": 36, - "success": true - }, - { - "line": 37, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/response-headers" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Beverage", - "value": "cafe" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:38:59 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 3 - } - ], - "filename": "tests/headers.hurl", - "success": true, - "time": 38 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 3, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/hello" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "12" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:00 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 10 - }, - { - "asserts": [ - { - "line": 6, - "success": true - }, - { - "line": 6, - "success": true - }, - { - "line": 7, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/hello" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "12" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:00 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - }, - { - "asserts": [ - { - "line": 10, - "success": true - }, - { - "line": 10, - "success": true - }, - { - "line": 11, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/hello" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "12" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:00 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - }, - { - "asserts": [ - { - "line": 14, - "success": true - }, - { - "line": 14, - "success": true - }, - { - "line": 15, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/hello" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "12" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:00 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 6 - } - ], - "filename": "tests/hello.hurl", - "success": true, - "time": 25 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/ignore_asserts" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "5" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:00 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 5 - } - ], - "filename": "tests/ignore_asserts.hurl", - "success": true, - "time": 6 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 3, - "success": true - }, - { - "line": 3, - "success": true - }, - { - "line": 4, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/include" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Date", - "value": "DATE" - }, - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "5" - }, - { - "name": "Server", - "value": "Flask Server" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 5 - } - ], - "filename": "tests/include.hurl", - "success": true, - "time": 6 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 3, - "success": true - }, - { - "line": 3, - "success": true - }, - { - "line": 4, - "success": true - }, - { - "line": 5, - "success": true - }, - { - "line": 8, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/large" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/octet-stream" - }, - { - "name": "Content-Length", - "value": "536870912" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:02 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 6276 - } - ], - "filename": "tests/large.hurl", - "success": true, - "time": 8161 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 4, - "success": true - }, - { - "line": 5, - "success": true - }, - { - "line": 9, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/multilines" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "18" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:12 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 10 - } - ], - "filename": "tests/multilines.hurl", - "success": true, - "time": 11 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 8, - "success": true - }, - { - "line": 8, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "627" - }, - { - "name": "Content-Type", - "value": "multipart/form-data; boundary=------------------------7fc1acc47208f0d6" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/multipart-form-data" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:12 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 15 - } - ], - "filename": "tests/multipart_form_data.hurl", - "success": true, - "time": 17 - }, - { - "cookies": [], - "entries": [], - "filename": "tests/no_entry.hurl", - "success": true, - "time": 0 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/non-utf8" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "5" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:12 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 5 - } - ], - "filename": "tests/non_utf8.hurl", - "success": true, - "time": 6 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 4, - "success": true - }, - { - "line": 4, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Content-Type", - "value": "application/json" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "17" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/output/endpoint1" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "date", - "value": "DATE1" - }, - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "19" - }, - { - "name": "Server", - "value": "Flask Server" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - }, - { - "asserts": [ - { - "line": 8, - "success": true - }, - { - "line": 8, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/output/endpoint2" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "date", - "value": "DATE2" - }, - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "19" - }, - { - "name": "Server", - "value": "Flask Server" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 3 - } - ], - "filename": "tests/output.hurl", - "success": true, - "time": 9 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 8, - "success": true - }, - { - "line": 8, - "success": true - }, - { - "line": 9, - "success": true - }, - { - "line": 10, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "www.example.com" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Content-Type", - "value": "application/example" - }, - { - "name": "If-Match", - "value": "\"e0023aa4e\"" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "PATCH", - "queryString": [], - "url": "http://localhost:8000/patch/file.txt" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Location", - "value": "/file.txt" - }, - { - "name": "ETag", - "value": "\"e0023aa4f\"" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:12 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 204 - }, - "time": 9 - } - ], - "filename": "tests/patch.hurl", - "success": true, - "time": 10 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 4, - "success": true - }, - { - "line": 4, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "12" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/post-base64" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:12 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - } - ], - "filename": "tests/post_base64.hurl", - "success": true, - "time": 5 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 5, - "success": true - }, - { - "line": 5, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Content-Type", - "value": "application/octet-stream" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "3" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/post-bytes" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:12 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 3 - } - ], - "filename": "tests/post_bytes.hurl", - "success": true, - "time": 4 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 4, - "success": true - }, - { - "line": 4, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "12" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/post-file" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 5 - }, - { - "asserts": [ - { - "line": 9, - "success": true - }, - { - "line": 9, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "12" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/post-file" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - } - ], - "filename": "tests/post_file.hurl", - "success": true, - "time": 8 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 12, - "success": true - }, - { - "line": 12, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Content-Type", - "value": "application/json" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "136" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/post-json" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 5 - }, - { - "asserts": [ - { - "line": 17, - "success": true - }, - { - "line": 17, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Content-Type", - "value": "application/json" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "7" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/post-json-array" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - }, - { - "asserts": [ - { - "line": 22, - "success": true - }, - { - "line": 22, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Content-Type", - "value": "application/json" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "7" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/post-json-string" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - }, - { - "asserts": [ - { - "line": 27, - "success": true - }, - { - "line": 27, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Content-Type", - "value": "application/json" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "3" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/post-json-number" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - }, - { - "asserts": [ - { - "line": 38, - "success": true - }, - { - "line": 38, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Content-Type", - "value": "application/json" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "101" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/post-json-numbers" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 9 - }, - { - "asserts": [ - { - "line": 43, - "success": true - }, - { - "line": 43, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Content-Type", - "value": "application/json" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "4" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/post-json-boolean" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - }, - { - "asserts": [ - { - "line": 49, - "success": true - }, - { - "line": 49, - "success": true - } - ], - "captures": [ - { - "name": "name", - "value": "Bob" - } - ], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/get-name" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "3" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 3 - }, - { - "asserts": [], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Content-Type", - "value": "application/json" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "21" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/check_name" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - } - ], - "filename": "tests/post_json.hurl", - "success": true, - "time": 34 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 8, - "success": true - }, - { - "line": 8, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "24" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/post-multilines" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - }, - { - "asserts": [ - { - "line": 12, - "success": true - }, - { - "line": 12, - "success": true - } - ], - "captures": [ - { - "name": "bob_age", - "value": "10" - } - ], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/get-bob-age" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "2" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 5 - }, - { - "asserts": [ - { - "line": 23, - "success": true - }, - { - "line": 23, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "24" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/post-multilines" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 6 - } - ], - "filename": "tests/post_multilines.hurl", - "success": true, - "time": 18 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 8, - "success": true - }, - { - "line": 8, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Content-Type", - "value": "application/xml" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "42" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/post-xml" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 8 - }, - { - "asserts": [ - { - "line": 14, - "success": true - }, - { - "line": 14, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Content-Type", - "value": "application/xml" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "20" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/post-xml-no-prolog" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 5 - } - ], - "filename": "tests/post_xml.hurl", - "success": true, - "time": 15 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 3, - "success": true - }, - { - "line": 3, - "success": true - }, - { - "line": 5, - "success": true - }, - { - "line": 6, - "success": true - }, - { - "line": 7, - "success": true - }, - { - "line": 8, - "success": true - }, - { - "line": 9, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/predicates-string" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "12" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 6 - }, - { - "asserts": [ - { - "line": 13, - "success": true - }, - { - "line": 13, - "success": true - }, - { - "line": 15, - "success": true - }, - { - "line": 16, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/predicates-string-empty" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - }, - { - "asserts": [ - { - "line": 19, - "success": true - }, - { - "line": 19, - "success": true - }, - { - "line": 21, - "success": true - }, - { - "line": 22, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/predicates-string-unicode" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "3" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - } - ], - "filename": "tests/predicates-string.hurl", - "success": true, - "time": 18 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 6, - "success": true - }, - { - "line": 6, - "success": true - }, - { - "line": 7, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Proxy-Connection", - "value": "Keep-Alive" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/proxy" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - }, - { - "name": "From-Proxy", - "value": "Hello" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 33 - } - ], - "filename": "tests/proxy.hurl", - "success": true, - "time": 34 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "PUT", - "queryString": [], - "url": "http://localhost:8000/put" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 5 - } - ], - "filename": "tests/put.hurl", - "success": true, - "time": 5 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 7, - "success": true - }, - { - "line": 7, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [ - { - "name": "param1", - "value": "value1" - }, - { - "name": "param2", - "value": "" - }, - { - "name": "param3", - "value": "a=b" - }, - { - "name": "param4", - "value": "1,2,3" - } - ], - "url": "http://localhost:8000/querystring-params?param1=value1¶m2=¶m3=a%3Db¶m4=1%2C2%2C3" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - }, - { - "asserts": [ - { - "line": 13, - "success": true - }, - { - "line": 13, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [ - { - "name": "param1", - "value": "value1" - }, - { - "name": "param2", - "value": "" - }, - { - "name": "param3", - "value": "a=b" - }, - { - "name": "param4", - "value": "1,2,3" - } - ], - "url": "http://localhost:8000/querystring-params?param1=value1¶m2=¶m3=a%3db¶m4=1,2,3" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 3 - }, - { - "asserts": [ - { - "line": 22, - "success": true - }, - { - "line": 22, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [ - { - "name": "param1", - "value": "value1" - }, - { - "name": "param2", - "value": "" - }, - { - "name": "param3", - "value": "a=b" - }, - { - "name": "param4", - "value": "1,2,3" - } - ], - "url": "http://localhost:8000/querystring-params?param1=value1¶m2=¶m3=a%3Db¶m4=1%2C2%2C3" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - }, - { - "asserts": [ - { - "line": 29, - "success": true - }, - { - "line": 29, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [ - { - "name": "value1", - "value": "/" - }, - { - "name": "value2", - "value": "/" - }, - { - "name": "value3", - "value": "/" - } - ], - "url": "http://localhost:8000/querystring-params-encoded?value1=/&value2=%2F&value3=%2F" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:13 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - } - ], - "filename": "tests/querystring_params.hurl", - "success": true, - "time": 16 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 3, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/redirect" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "270" - }, - { - "name": "Location", - "value": "http://localhost:8000/redirected" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:14 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 302 - }, - "time": 7 - }, - { - "asserts": [ - { - "line": 6, - "success": true - }, - { - "line": 6, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/redirected" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:14 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - } - ], - "filename": "tests/redirect.hurl", - "success": true, - "time": 10 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 4, - "success": true - }, - { - "line": 5, - "success": true - }, - { - "line": 6, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/subquery-count" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - }, - { - "name": "Content-Length", - "value": "39" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:14 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 7 - } - ], - "filename": "tests/subquery_count.hurl", - "success": true, - "time": 8 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 3, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/test-mode" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "12" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:14 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 3 - } - ], - "filename": "tests/test_mode.hurl", - "success": true, - "time": 4 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 3, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/~user" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "4" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:14 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 6 - }, - { - "asserts": [ - { - "line": 6, - "success": true - }, - { - "line": 6, - "success": true - }, - { - "line": 7, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/%7Euser" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "4" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:14 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 3 - }, - { - "asserts": [ - { - "line": 11, - "success": true - }, - { - "line": 11, - "success": true - }, - { - "line": 12, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/!$&()*+,;=:@[]" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "5" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:14 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 2 - } - ], - "filename": "tests/url.hurl", - "success": true, - "time": 12 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 2, - "success": true - }, - { - "line": 2, - "success": true - }, - { - "line": 3, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Authorization", - "value": "Basic Ym9iOnNlY3JldA==" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://bob:secret@localhost:8000/basic-authentication" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "21" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:14 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - } - ], - "filename": "tests/user_in_url.hurl", - "success": true, - "time": 5 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 3, - "success": true - }, - { - "line": 3, - "success": true - }, - { - "line": 5, - "success": true - }, - { - "line": 6, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - } - ], - "method": "GET", - "queryString": [], - "url": "http://localhost:8000/utf8" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "18" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:14 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 3 - } - ], - "filename": "tests/utf8.hurl", - "success": true, - "time": 4 - }, - { - "cookies": [], - "entries": [ - { - "asserts": [ - { - "line": 17, - "success": true - }, - { - "line": 17, - "success": true - }, - { - "line": 19, - "success": true - }, - { - "line": 20, - "success": true - }, - { - "line": 21, - "success": true - }, - { - "line": 22, - "success": true - }, - { - "line": 23, - "success": true - }, - { - "line": 24, - "success": true - } - ], - "captures": [], - "request": { - "cookies": [], - "headers": [ - { - "name": "Host", - "value": "localhost:8000" - }, - { - "name": "Accept", - "value": "*/*" - }, - { - "name": "Name", - "value": "Jennifer" - }, - { - "name": "Age", - "value": "30" - }, - { - "name": "Height", - "value": "1.700000000000000000" - }, - { - "name": "Female", - "value": "true" - }, - { - "name": "Id", - "value": "123" - }, - { - "name": "A_Null", - "value": "null" - }, - { - "name": "Content-Type", - "value": "application/json" - }, - { - "name": "User-Agent", - "value": "hurl/1.5.0-snapshot" - }, - { - "name": "Content-Length", - "value": "122" - } - ], - "method": "POST", - "queryString": [], - "url": "http://localhost:8000/variables" - }, - "response": { - "cookies": [], - "headers": [ - { - "name": "Content-Type", - "value": "text/html; charset=utf-8" - }, - { - "name": "Content-Length", - "value": "0" - }, - { - "name": "Server", - "value": "Flask Server" - }, - { - "name": "Date", - "value": "Mon, 08 Nov 2021 10:39:14 GMT" - } - ], - "httpVersion": "HTTP/1.0", - "status": 200 - }, - "time": 4 - } - ], - "filename": "tests/variables.hurl", - "success": true, - "time": 6 - } -] \ No newline at end of file diff --git a/integration/report/tests.xml b/integration/report/tests.xml deleted file mode 100644 index 749374c05e6..00000000000 --- a/integration/report/tests.xml +++ /dev/null @@ -1,696 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Assert Body Value - --> tests/error_assert_base64.hurl:12:8 - | -12 | base64,bGluZTEKbGluZTIKbGluZTMK; - | ^^^^^^^^^^^^^^^^^^^^^^^^ actual value is <hex, 6c696e65310a6c696e65320d0a6c696e65330a;> - | - - - - - Assert Failure - --> tests/error_assert_bytearray.hurl:4:0 - | - 4 | bytes equals hex,00; - | actual: byte array <ff> - | expected: byte array <00> - | - Assert Failure - --> tests/error_assert_bytearray.hurl:5:0 - | - 5 | sha256 equals hex,a8100ae6aa1940d0b663bb31cd466142ebbdbd5187131b92d93818987832eb88; - | actual: byte array <a8100ae6aa1940d0b663bb31cd466142ebbdbd5187131b92d93818987832eb89> - | expected: byte array <a8100ae6aa1940d0b663bb31cd466142ebbdbd5187131b92d93818987832eb88> - | - - - - - Decompression Error - --> tests/error_assert_content_encoding.hurl:4:1 - | - 4 | ```Hello World!``` - | ^ Compression unknown is not supported - | - - - - - Decompression Error - --> tests/error_assert_decompress.hurl:3:1 - | - 3 | ```Hello World!``` - | ^ Could not uncompress response with gzip - | - - - - - Assert Body Value - --> tests/error_assert_file.hurl:8:1 - | - 8 | file,data.txt; - | ^ actual value is <hex, 48656c6c6f;> - | - - - - - Header not Found - --> tests/error_assert_header_not_found.hurl:3:1 - | - 3 | Custom: ??? - | ^^^^^^ This header has not been found in the response - | - - - - - Assert Header Value - --> tests/error_assert_header_value.hurl:3:15 - | - 3 | Content-Type: ??? - | ^^^ actual value is <text/html; charset=utf-8> - | - - - - - Assert Http Version - --> tests/error_assert_http_version.hurl:2:6 - | - 2 | HTTP/2 200 - | ^ actual value is <1.0> - | - - - - - Assert Failure - --> tests/error_assert_invalid_predicate_type.hurl:4:0 - | - 4 | header "content-type" equals 1 - | actual: string <text/html; charset=utf-8> - | expected: int <1> - | - - - - - Invalid Decoding - --> tests/error_assert_match_utf8.hurl:4:1 - | - 4 | body matches ".*" - | ^^^^ The body can not be decoded with charset 'utf-8' - | - - - - - Assert Body Value - --> tests/error_assert_newline.hurl:9:4 - | - 9 | ```<p>Hello</p> - | ^ actual value is <<p>Hello</p> - -> - | - - - - - Assert Failure - --> tests/error_assert_query_cookie.hurl:7:0 - | - 7 | cookie "cookie1[Secure]" equals false # This is not valid, Secure attribute exists or not but does have a value - | actual: none - | expected: bool <false> - | - Assert Failure - --> tests/error_assert_query_cookie.hurl:11:0 - | -11 | cookie "cookie2[Secure]" equals true # This is not valid, Secure attribute exists or not but does have a value - | actual: unit - | expected: bool <true> - | >>> types between actual and expected are not consistent - | - Assert Failure - --> tests/error_assert_query_cookie.hurl:12:0 - | -12 | cookie "cookie2[Secure]" not equals true # This is not valid, Secure attribute exists or not but does have a value - | actual: unit - | expected: not bool <true> - | >>> types between actual and expected are not consistent - | - - - - - Invalid regex - --> tests/error_assert_query_invalid_regex.hurl:4:7 - | - 4 | regex "[x" exists - | ^^^^ Regex expression is not valid - | - - - - - Invalid xpath expression - --> tests/error_assert_query_invalid_xpath.hurl:4:7 - | - 4 | xpath "//" equals 1 - | ^^^^ The xpath expression is not valid - | - - - - - Assert Status - --> tests/error_assert_status.hurl:2:10 - | - 2 | HTTP/1.0 200 - | ^^^ actual value is <404> - | - - - - - Undefined Variable - --> tests/error_assert_template_variable_not_found.hurl:4:33 - | - 4 | header "content-type" equals "{{content_type}}" - | ^^^^^^^^^^^^ You must set the variable content_type - | - - - - - Assert Failure - --> tests/error_assert_value_error.hurl:4:0 - | - 4 | header "content-type" equals "XXX" - | actual: string <text/html; charset=utf-8> - | expected: string <XXX> - | - Assert Failure - --> tests/error_assert_value_error.hurl:5:0 - | - 5 | header "content-type" notEquals "text/html; charset=utf-8" - | actual: string <text/html; charset=utf-8> - | expected: string <text/html; charset=utf-8> - | - Assert Failure - --> tests/error_assert_value_error.hurl:6:0 - | - 6 | jsonpath "$.id" equals "000001" - | actual: none - | expected: string <000001> - | - Assert Failure - --> tests/error_assert_value_error.hurl:7:0 - | - 7 | jsonpath "$.values" includes 100 - | actual: [int <1>, int <2>, int <3>] - | expected: includes int <100> - | - Assert Failure - --> tests/error_assert_value_error.hurl:8:0 - | - 8 | jsonpath "$.values" not contains "Hello" - | actual: [int <1>, int <2>, int <3>] - | expected: not contains string <Hello> - | >>> types between actual and expected are not consistent - | - Assert Failure - --> tests/error_assert_value_error.hurl:9:0 - | - 9 | jsonpath "$.count" greaterThan 5 - | actual: int <2> - | expected: greater than int <5> - | - Assert Failure - --> tests/error_assert_value_error.hurl:10:0 - | -10 | jsonpath "$.count" isFloat - | actual: int <2> - | expected: float - | - Assert Failure - --> tests/error_assert_value_error.hurl:11:0 - | -11 | bytes contains hex,00; - | actual: byte array <7b202276616c756573223a205b312c322c335d2c2022636f756e74223a20327d> - | expected: contains byte array <00> - | - - - - - Assert Failure - --> tests/error_assert_variable.hurl:8:0 - | - 8 | variable "toto" equals "tata" - | actual: none - | expected: string <tata> - | - Undefined Variable - --> tests/error_assert_variable.hurl:9:28 - | - 9 | variable "status" equals {{unknown}} - | ^^^^^^^ You must set the variable unknown - | - Assert Failure - --> tests/error_assert_variable.hurl:10:0 - | -10 | variable "status" equals {{type}} - | actual: int <200> - | expected: string <text/html; charset=utf-8> - | - Assert Failure - --> tests/error_assert_variable.hurl:11:0 - | -11 | variable "status" equals {{length}} - | actual: int <200> - | expected: string <0> - | - - - - - Invalid xpath expression - --> tests/error_assert_xpath.hurl:4:7 - | - 4 | xpath "strong(//head/title)" equals "Welcome to Quiz!" - | ^^^^^^^^^^^^^^^^^^^^^^ The xpath expression is not valid - | - - - - - Invalid Json - --> tests/error_body_json.hurl:3:18 - | - 3 | "success": {{success}} - | ^^^^^^^ actual value is <invalid> - | - - - - - Http Connection - --> tests/error_connect_timeout.hurl:1:5 - | - 1 | GET http://10.0.0.0 - | ^^^^^^^^^^^^^^^ (28) Connection timeout after 1001 ms - | - - - - - File ReadAccess - --> tests/error_file_read_access.hurl:2:6 - | - 2 | file,does_not_exist; - | ^^^^^^^^^^^^^^ File tests/does_not_exist can not be read - | - - - - - Http Connection - --> tests/error_http_connection.hurl:1:5 - | - 1 | GET http://unknown - | ^^^^^^^^^^^^^^ (6) Could not resolve host: unknown - | - - - - - Invalid jsonpath - --> tests/error_invalid_jsonpath.hurl:4:10 - | - 4 | jsonpath "" equals false - | ^^ the jsonpath expression '' is not valid - | - - - - - Http Connection - --> tests/error_invalid_url.hurl:1:5 - | - 1 | GET ??? - | ^^^ (3) URL using bad/illegal format or missing URL - | - - - - - Invalid XML - --> tests/error_invalid_xml.hurl:4:1 - | - 4 | xpath "xx" equals 1 - | ^^^^^^^^^^ The Http response is not a valid XML - | - - - - - Http Connection - --> tests/error_max_redirect.hurl:1:5 - | - 1 | GET http://localhost:8000/redirect/7 - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Too many redirect - | - - - - - File ReadAccess - --> tests/error_multipart_form_data.hurl:4:15 - | - 4 | upload1: file,unknown; - | ^^^^^^^ File tests/unknown can not be read - | - - - - - - - - Assert Failure - --> tests/error_predicate.hurl:4:0 - | - 4 | jsonpath "$.status" equals "true" - | actual: bool <true> - | expected: string <true> - | - Assert Failure - --> tests/error_predicate.hurl:6:0 - | - 6 | jsonpath "$.count" equals 0 - | actual: int <1> - | expected: int <0> - | - Assert Failure - --> tests/error_predicate.hurl:7:0 - | - 7 | jsonpath "$.message" equals 0 - | actual: string <0> - | expected: int <0> - | - Assert Failure - --> tests/error_predicate.hurl:8:0 - | - 8 | jsonpath "$.empty" equals 0 - | actual: string <> - | expected: int <0> - | - Assert Failure - --> tests/error_predicate.hurl:9:0 - | - 9 | jsonpath "$.number" equals 1.1 - | actual: float <1.0> - | expected: float <1.1> - | - Assert Failure - --> tests/error_predicate.hurl:10:0 - | -10 | jsonpath "$.message" startsWith "hi" - | actual: string <0> - | expected: starts with string <hi> - | - Assert Failure - --> tests/error_predicate.hurl:11:0 - | -11 | jsonpath "$.message" endsWith "hi" - | actual: string <0> - | expected: ends with string <hi> - | - Assert Failure - --> tests/error_predicate.hurl:12:0 - | -12 | jsonpath "$.message" contains "hi" - | actual: string <0> - | expected: contains string <hi> - | - Assert Failure - --> tests/error_predicate.hurl:13:0 - | -13 | jsonpath "$.message" matches "hi" - | actual: string <0> - | expected: matches regex <hi> - | - Subquery error - --> tests/error_predicate.hurl:14:22 - | -14 | jsonpath "$.message" count == 1 - | ^^^^^ Type from query result and subquery do not match - | - Assert Failure - --> tests/error_predicate.hurl:15:0 - | -15 | jsonpath "$.toto" exists - | actual: none - | expected: something - | - Assert Failure - --> tests/error_predicate.hurl:16:0 - | -16 | jsonpath "$.message" not exists - | actual: string <0> - | expected: not something - | - Assert Failure - --> tests/error_predicate.hurl:17:0 - | -17 | jsonpath "$.list" count == 2 - | actual: int <3> - | expected: int <2> - | - - - - - Header not Found - --> tests/error_query_header_not_found.hurl:3:1 - | - 3 | Custom: XXX - | ^^^^^^ This header has not been found in the response - | - - - - - Invalid Json - --> tests/error_query_invalid_json.hurl:4:1 - | - 4 | jsonpath "$.errors" count == 2 - | ^^^^^^^^^^^^^^^^^^^ The http response is not a valid json - | - - - - - Invalid Decoding - --> tests/error_query_invalid_utf8.hurl:4:1 - | - 4 | jsonpath "$.errors" count == 2 - | ^^^^^^^^^^^^^^^^^^^ The body can not be decoded with charset 'utf-8' - | - - - - - Undefined Variable - --> tests/error_template_variable_not_found.hurl:1:7 - | - 1 | GET {{url}} - | ^^^ You must set the variable url - | - - - - - Unrenderable Variable - --> tests/error_template_variable_not_renderable.hurl:8:11 - | - 8 | param1: {{list}} - | ^^^^ value [1,2,3] can not be rendered - | - - - - - Http Connection - --> tests/error_timeout.hurl:1:5 - | - 1 | GET http://localhost:8000/timeout - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (28) Operation timed out after 1001 milliseconds with 0 bytes received - | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/integration/tests_ok/filter.html b/integration/tests_ok/filter.html index 1ff6f832f7b..809228d9231 100644 --- a/integration/tests_ok/filter.html +++ b/integration/tests_ok/filter.html @@ -3,6 +3,7 @@ HTTP 200 [Captures] url: jsonpath "$.url" +html: jsonpath "$.html" [Asserts] jsonpath "$.list" count == 3 jsonpath "$.message" regex /Hello (.*)!/ == "Bob" @@ -10,6 +11,10 @@ jsonpath "$.url" urlEncode == "https%3A//mozilla.org/%3Fx%3D%D1%88%D0%B5%D0%BB%D0%BB%D1%8B" jsonpath "$.encoded_url" urlDecode == "https://mozilla.org/?x=шеллы" variable "url" urlEncode urlDecode == "{{url}}" +jsonpath "$.html" == "a > b && a < c" +jsonpath "$.html" htmlEscape == "a &gt; b &amp;&amp; a &lt; c" +jsonpath "$.encoded_html" htmlUnescape == "a > b && a < c" +variable "html" htmlEscape htmlUnescape == "{{html}}" jsonpath "$.id" toInt == 123 jsonpath "$.score" toInt == 1 { @@ -17,6 +22,8 @@ "message": "Hello Bob!", "url": "https://mozilla.org/?x=шеллы", "encoded_url": "https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B", + "html": "a > b && a < c", + "encoded_html": "a &gt; b &amp;&amp; a &lt; c", "id": "123", "score": 1.6 } diff --git a/integration/tests_ok/filter.hurl b/integration/tests_ok/filter.hurl index 6c40bb671ae..3c71a462b10 100644 --- a/integration/tests_ok/filter.hurl +++ b/integration/tests_ok/filter.hurl @@ -3,6 +3,7 @@ GET http://localhost:8000/filter HTTP 200 [Captures] url: jsonpath "$.url" +html: jsonpath "$.html" [Asserts] jsonpath "$.list" count == 3 jsonpath "$.message" regex /Hello (.*)!/ == "Bob" @@ -10,6 +11,10 @@ jsonpath "$.url" == "https://mozilla.org/?x=шеллы" jsonpath "$.url" urlEncode == "https%3A//mozilla.org/%3Fx%3D%D1%88%D0%B5%D0%BB%D0%BB%D1%8B" jsonpath "$.encoded_url" urlDecode == "https://mozilla.org/?x=шеллы" variable "url" urlEncode urlDecode == "{{url}}" +jsonpath "$.html" == "a > b && a < c" +jsonpath "$.html" htmlEscape == "a > b && a < c" +jsonpath "$.encoded_html" htmlUnescape == "a > b && a < c" +variable "html" htmlEscape htmlUnescape == "{{html}}" jsonpath "$.id" toInt == 123 jsonpath "$.score" toInt == 1 { @@ -17,6 +22,8 @@ jsonpath "$.score" toInt == 1 "message": "Hello Bob!", "url": "https://mozilla.org/?x=шеллы", "encoded_url": "https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B", + "html": "a > b && a < c", + "encoded_html": "a > b && a < c", "id": "123", "score": 1.6 } diff --git a/integration/tests_ok/filter.json b/integration/tests_ok/filter.json index 4266e986cf6..f203c5e5a71 100644 --- a/integration/tests_ok/filter.json +++ b/integration/tests_ok/filter.json @@ -1 +1 @@ -{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/filter"},"response":{"status":200,"captures":[{"name":"url","query":{"type":"jsonpath","expr":"$.url"}}],"asserts":[{"query":{"type":"jsonpath","expr":"$.list"},"filters":[{"type":"count"}],"predicate":{"type":"equal","value":3}},{"query":{"type":"jsonpath","expr":"$.message"},"filters":[{"type":"regex","expr":{"type":"regex","value":"Hello (.*)!"}}],"predicate":{"type":"equal","value":"Bob"}},{"query":{"type":"jsonpath","expr":"$.url"},"predicate":{"type":"equal","value":"https://mozilla.org/?x=шеллы"}},{"query":{"type":"jsonpath","expr":"$.url"},"filters":[{"type":"urlEncode"}],"predicate":{"type":"equal","value":"https%3A//mozilla.org/%3Fx%3D%D1%88%D0%B5%D0%BB%D0%BB%D1%8B"}},{"query":{"type":"jsonpath","expr":"$.encoded_url"},"filters":[{"type":"urlDecode"}],"predicate":{"type":"equal","value":"https://mozilla.org/?x=шеллы"}},{"query":{"type":"variable","name":"url"},"filters":[{"type":"urlEncode"},{"type":"urlDecode"}],"predicate":{"type":"equal","value":"{{url}}"}},{"query":{"type":"jsonpath","expr":"$.id"},"filters":[{"type":"toInt"}],"predicate":{"type":"equal","value":123}},{"query":{"type":"jsonpath","expr":"$.score"},"filters":[{"type":"toInt"}],"predicate":{"type":"equal","value":1}}],"body":{"type":"json","value":{"list":[1,2,3],"message":"Hello Bob!","url":"https://mozilla.org/?x=шеллы","encoded_url":"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B","id":"123","score":1.6}}}}]} +{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/filter"},"response":{"status":200,"captures":[{"name":"url","query":{"type":"jsonpath","expr":"$.url"}},{"name":"html","query":{"type":"jsonpath","expr":"$.html"}}],"asserts":[{"query":{"type":"jsonpath","expr":"$.list"},"filters":[{"type":"count"}],"predicate":{"type":"equal","value":3}},{"query":{"type":"jsonpath","expr":"$.message"},"filters":[{"type":"regex","expr":{"type":"regex","value":"Hello (.*)!"}}],"predicate":{"type":"equal","value":"Bob"}},{"query":{"type":"jsonpath","expr":"$.url"},"predicate":{"type":"equal","value":"https://mozilla.org/?x=шеллы"}},{"query":{"type":"jsonpath","expr":"$.url"},"filters":[{"type":"urlEncode"}],"predicate":{"type":"equal","value":"https%3A//mozilla.org/%3Fx%3D%D1%88%D0%B5%D0%BB%D0%BB%D1%8B"}},{"query":{"type":"jsonpath","expr":"$.encoded_url"},"filters":[{"type":"urlDecode"}],"predicate":{"type":"equal","value":"https://mozilla.org/?x=шеллы"}},{"query":{"type":"variable","name":"url"},"filters":[{"type":"urlEncode"},{"type":"urlDecode"}],"predicate":{"type":"equal","value":"{{url}}"}},{"query":{"type":"jsonpath","expr":"$.html"},"predicate":{"type":"equal","value":"a > b && a < c"}},{"query":{"type":"jsonpath","expr":"$.html"},"filters":[{"type":"htmlEscape"}],"predicate":{"type":"equal","value":"a > b && a < c"}},{"query":{"type":"jsonpath","expr":"$.encoded_html"},"filters":[{"type":"htmlUnescape"}],"predicate":{"type":"equal","value":"a > b && a < c"}},{"query":{"type":"variable","name":"html"},"filters":[{"type":"htmlEscape"},{"type":"htmlUnescape"}],"predicate":{"type":"equal","value":"{{html}}"}},{"query":{"type":"jsonpath","expr":"$.id"},"filters":[{"type":"toInt"}],"predicate":{"type":"equal","value":123}},{"query":{"type":"jsonpath","expr":"$.score"},"filters":[{"type":"toInt"}],"predicate":{"type":"equal","value":1}}],"body":{"type":"json","value":{"list":[1,2,3],"message":"Hello Bob!","url":"https://mozilla.org/?x=шеллы","encoded_url":"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B","html":"a > b && a < c","encoded_html":"a > b && a < c","id":"123","score":1.6}}}}]} diff --git a/integration/tests_ok/filter.py b/integration/tests_ok/filter.py index d53383ef76f..1a61846b09d 100644 --- a/integration/tests_ok/filter.py +++ b/integration/tests_ok/filter.py @@ -8,6 +8,8 @@ def filter(): "message": "Hello Bob!", "url": "https://mozilla.org/?x=шеллы", "encoded_url": "https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B", + "html": "a > b && a < c", + "encoded_html": "a > b && a < c", "id": "123", "score": 1.6 }""" diff --git a/packages/hurl/Cargo.toml b/packages/hurl/Cargo.toml index 63b517bb6ee..fb9f1f9a80d 100644 --- a/packages/hurl/Cargo.toml +++ b/packages/hurl/Cargo.toml @@ -29,6 +29,7 @@ float-cmp = "0.9.0" glob = "0.3.0" hex = "0.4.3" hex-literal = "0.3.4" +html-escape = "0.2.12" hurl_core = { version = "2.0.0-SNAPSHOT", path = "../hurl_core" } indexmap = "1.9.2" libflate = "1.2.0" diff --git a/packages/hurl/src/runner/body.rs b/packages/hurl/src/runner/body.rs index ffe313390e2..9ff75ebca61 100644 --- a/packages/hurl/src/runner/body.rs +++ b/packages/hurl/src/runner/body.rs @@ -46,8 +46,8 @@ pub fn eval_bytes( let value = eval_multiline(value, variables)?; Ok(http::Body::Text(value)) } - Bytes::Xml { value, .. } => Ok(http::Body::Text(value.clone())), - Bytes::Json { value, .. } => { + Bytes::Xml(value) => Ok(http::Body::Text(value.clone())), + Bytes::Json(value) => { let value = eval_json_value(value, variables)?; Ok(http::Body::Text(value)) } diff --git a/packages/hurl/src/runner/capture.rs b/packages/hurl/src/runner/capture.rs index 02a6dd20c4f..2bee86e333c 100644 --- a/packages/hurl/src/runner/capture.rs +++ b/packages/hurl/src/runner/capture.rs @@ -181,7 +181,7 @@ pub mod tests { value: QueryValue::Xpath { space0: whitespace.clone(), expr: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "//user".to_string(), encoded: "//user".to_string(), diff --git a/packages/hurl/src/runner/filter.rs b/packages/hurl/src/runner/filter.rs index 3fef102ae0b..2eb0e6589d0 100644 --- a/packages/hurl/src/runner/filter.rs +++ b/packages/hurl/src/runner/filter.rs @@ -47,6 +47,8 @@ fn eval_filter( FilterValue::Count {} => eval_count(value, &filter.source_info), FilterValue::UrlEncode { .. } => eval_url_encode(value, &filter.source_info), FilterValue::UrlDecode { .. } => eval_url_decode(value, &filter.source_info), + FilterValue::HtmlEscape { .. } => eval_html_encode(value, &filter.source_info), + FilterValue::HtmlUnescape { .. } => eval_html_decode(value, &filter.source_info), FilterValue::ToInt { .. } => eval_to_int(value, &filter.source_info), } } @@ -153,6 +155,35 @@ fn eval_url_decode(value: &Value, source_info: &SourceInfo) -> Result Result { + match value { + Value::String(value) => { + let mut enco = String::from(value); + let encoded = html_escape::encode_text_to_string(value, &mut enco); + Ok(Value::String(encoded.to_string())) + } + v => Err(Error { + source_info: source_info.clone(), + inner: RunnerError::FilterInvalidInput(v._type()), + assert: false, + }), + } +} + +fn eval_html_decode(value: &Value, source_info: &SourceInfo) -> Result { + match value { + Value::String(value) => { + let decoded = html_escape::decode_html_entities(value).to_string(); + Ok(Value::String(decoded)) + } + v => Err(Error { + source_info: source_info.clone(), + inner: RunnerError::FilterInvalidInput(v._type()), + assert: false, + }), + } +} + fn eval_to_int(value: &Value, source_info: &SourceInfo) -> Result { match value { Value::Integer(v) => Ok(Value::Integer(*v)), @@ -245,7 +276,7 @@ pub mod tests { value: FilterValue::Regex { space0: whitespace, value: RegexValue::Template(Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "Hello (.*)!".to_string(), encoded: "Hello (.*)!".to_string(), @@ -286,7 +317,7 @@ pub mod tests { value: FilterValue::Regex { space0: whitespace, value: RegexValue::Template(Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "???".to_string(), encoded: "???".to_string(), diff --git a/packages/hurl/src/runner/json.rs b/packages/hurl/src/runner/json.rs index d740c2afca1..b2b15f7e3fd 100644 --- a/packages/hurl/src/runner/json.rs +++ b/packages/hurl/src/runner/json.rs @@ -165,7 +165,7 @@ mod tests { pub fn json_hello_world_value() -> JsonValue { // "hello\u0020{{name}}!" JsonValue::String(Template { - quotes: true, + delimiter: Some('"'), elements: vec![ TemplateElement::String { value: "Hello ".to_string(), @@ -200,7 +200,7 @@ mod tests { elements: vec![JsonObjectElement { space0: "".to_string(), name: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "firstName".to_string(), encoded: "firstName".to_string(), @@ -210,7 +210,7 @@ mod tests { space1: "".to_string(), space2: " ".to_string(), value: JsonValue::String(Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "John".to_string(), encoded: "John".to_string(), @@ -304,7 +304,7 @@ mod tests { ); let template = Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { encoded: "Hi".to_string(), value: "Hi".to_string(), @@ -364,7 +364,7 @@ mod tests { assert_eq!( eval_json_value( &JsonValue::String(Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "\n".to_string(), encoded: "\\n".to_string(), @@ -384,7 +384,7 @@ mod tests { assert_eq!( eval_json_template( &Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "\n".to_string(), encoded: "\\n".to_string(), @@ -402,7 +402,7 @@ mod tests { assert_eq!( eval_json_template( &Template { - quotes: true, + delimiter: Some('"'), elements: vec![ TemplateElement::String { value: "Hello ".to_string(), diff --git a/packages/hurl/src/runner/predicate.rs b/packages/hurl/src/runner/predicate.rs index 0845e815d33..99364768b43 100644 --- a/packages/hurl/src/runner/predicate.rs +++ b/packages/hurl/src/runner/predicate.rs @@ -1171,7 +1171,7 @@ mod tests { }; let template = Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::Expression(Expr { space0: Whitespace { value: "".to_string(), @@ -1567,7 +1567,7 @@ mod tests { value: PredicateFuncValue::StartWith { space0: whitespace(), value: PredicateValue::String(Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "toto".to_string(), encoded: "toto".to_string(), diff --git a/packages/hurl/src/runner/query.rs b/packages/hurl/src/runner/query.rs index e08d4393cfe..94804bf1d04 100644 --- a/packages/hurl/src/runner/query.rs +++ b/packages/hurl/src/runner/query.rs @@ -326,7 +326,7 @@ pub mod tests { value: QueryValue::Xpath { space0: whitespace, expr: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "???".to_string(), encoded: "???".to_string(), @@ -347,7 +347,7 @@ pub mod tests { value: QueryValue::Xpath { space0: whitespace, expr: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "count(//user)".to_string(), encoded: "count(//user)".to_string(), @@ -368,7 +368,7 @@ pub mod tests { value: QueryValue::Xpath { space0: whitespace, expr: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "//user".to_string(), encoded: "/user".to_string(), @@ -415,8 +415,7 @@ pub mod tests { value: String::from("$.success"), encoded: String::from("$.success"), }], - quotes: true, - //delimiter: "".to_string(), + delimiter: Some('"'), source_info: SourceInfo::new(1, 10, 1, 19), }, }, @@ -437,8 +436,7 @@ pub mod tests { value: String::from("$.errors"), encoded: String::from("$.errors"), }], - quotes: true, - // delimiter: "".to_string(), + delimiter: Some('"'), source_info: SourceInfo::new(1, 10, 1, 18), }, }, @@ -459,8 +457,7 @@ pub mod tests { value: String::from("$.duration"), encoded: String::from("$.duration"), }], - quotes: true, - // delimiter: "".to_string(), + delimiter: Some('"'), source_info: SourceInfo::new(1, 10, 1, 18), }, }, @@ -477,7 +474,7 @@ pub mod tests { source_info: SourceInfo::new(1, 6, 1, 7), }, value: RegexValue::Template(Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "Hello ([a-zA-Z]+)!".to_string(), encoded: "Hello ([a-zA-Z]+)!".to_string(), @@ -498,7 +495,7 @@ pub mod tests { source_info: SourceInfo::new(1, 6, 1, 7), }, value: RegexValue::Template(Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "???".to_string(), encoded: "???".to_string(), @@ -539,7 +536,7 @@ pub mod tests { source_info: SourceInfo::new(1, 7, 1, 8), }, name: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "Custom".to_string(), encoded: "Custom".to_string(), @@ -569,7 +566,7 @@ pub mod tests { source_info: SourceInfo::new(1, 7, 1, 8), }, name: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "Content-Type".to_string(), encoded: "Content-Type".to_string(), @@ -614,7 +611,7 @@ pub mod tests { space0: space.clone(), expr: CookiePath { name: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "LSID".to_string(), encoded: "LSID".to_string(), @@ -639,7 +636,7 @@ pub mod tests { space0: space.clone(), expr: CookiePath { name: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "LSID".to_string(), encoded: "LSID".to_string(), @@ -668,7 +665,7 @@ pub mod tests { space0: space.clone(), expr: CookiePath { name: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "LSID".to_string(), encoded: "LSID".to_string(), @@ -697,7 +694,7 @@ pub mod tests { space0: space.clone(), expr: CookiePath { name: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "LSID".to_string(), encoded: "LSID".to_string(), @@ -863,7 +860,7 @@ pub mod tests { source_info: SourceInfo::new(1, 6, 1, 7), }, expr: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "^^^".to_string(), encoded: "^^^".to_string(), @@ -917,7 +914,7 @@ pub mod tests { value: QueryValue::Xpath { space0: whitespace, expr: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "normalize-space(/html/head/meta/@charset)".to_string(), encoded: "normalize-space(/html/head/meta/@charset)".to_string(), @@ -960,8 +957,7 @@ pub mod tests { value: String::from("xxx"), encoded: String::from("xxx"), }], - quotes: true, - // delimiter: "".to_string(), + delimiter: Some('"'), source_info: SourceInfo::new(1, 10, 1, 13), }, }, diff --git a/packages/hurl/src/runner/request.rs b/packages/hurl/src/runner/request.rs index a8f51b630cc..b7bc0d515c6 100644 --- a/packages/hurl/src/runner/request.rs +++ b/packages/hurl/src/runner/request.rs @@ -223,7 +223,7 @@ mod tests { encoded: String::from("/hello"), }, ], - quotes: false, + delimiter: None, source_info: SourceInfo::new(0, 0, 0, 0), }, line_terminator0: line_terminator, @@ -267,7 +267,7 @@ mod tests { value: String::from("http://localhost:8000/querystring-params"), encoded: String::from("http://localhost:8000/querystring-params"), }], - quotes: false, + delimiter: None, source_info: SourceInfo::new(0, 0, 0, 0), }, line_terminator0: line_terminator.clone(), @@ -285,7 +285,7 @@ mod tests { source_info: SourceInfo::new(0, 0, 0, 0), }, Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::Expression(Expr { space0: whitespace(), variable: Variable { @@ -305,7 +305,7 @@ mod tests { source_info: SourceInfo::new(0, 0, 0, 0), }, Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "a b".to_string(), encoded: "a b".to_string(), @@ -385,7 +385,7 @@ mod tests { value: String::from("http:///localhost"), encoded: String::from("http://localhost"), },], - quotes: false, + delimiter: None, source_info: SourceInfo::new(0, 0, 0, 0), }, line_terminator0: line_terminator, @@ -425,7 +425,7 @@ mod tests { value: String::from("http:///localhost"), encoded: String::from("http://localhost"), },], - quotes: false, + delimiter: None, source_info: SourceInfo::new(0, 0, 0, 0), }, line_terminator0: line_terminator, diff --git a/packages/hurl/src/runner/response.rs b/packages/hurl/src/runner/response.rs index 07c6fe65b08..56bc686325c 100644 --- a/packages/hurl/src/runner/response.rs +++ b/packages/hurl/src/runner/response.rs @@ -124,14 +124,7 @@ pub fn eval_asserts( asserts } -/// Check the body of an actual HTTP response against a spec body. -/// -/// # Arguments -/// -/// * `spec_body` - The spec HTTP response body -/// * `variables` - A map of input variables -/// * `http_response` - The actual HTTP response -/// * `context_dir` - The context directory for files +/// Check the body of an actual HTTP response against a spec body, given a set of variables. fn eval_implicit_body_asserts( spec_body: &Body, variables: &HashMap, @@ -139,7 +132,7 @@ fn eval_implicit_body_asserts( context_dir: &ContextDir, ) -> AssertResult { match &spec_body.value { - Bytes::Json { value } => { + Bytes::Json(value) => { let expected = match eval_json_value(value, variables) { Ok(s) => Ok(Value::String(s)), Err(e) => Err(e), @@ -161,7 +154,7 @@ fn eval_implicit_body_asserts( source_info: spec_body.space0.source_info.clone(), } } - Bytes::Xml { value } => { + Bytes::Xml(value) => { let expected = Ok(Value::String(value.to_string())); let actual = match http_response.text() { Ok(s) => Ok(Value::String(s)), diff --git a/packages/hurl/tests/runner.rs b/packages/hurl/tests/runner.rs index 76bb124a24c..29bfaa5462e 100644 --- a/packages/hurl/tests/runner.rs +++ b/packages/hurl/tests/runner.rs @@ -68,7 +68,7 @@ fn hello_request() -> Request { method: Method::Get, space1: whitespace.clone(), url: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "http://localhost:8000/hello".to_string(), encoded: "http://localhost:8000/hello".to_string(), @@ -92,7 +92,7 @@ fn hello_request() -> Request { space1: whitespace.clone(), space2: whitespace, value: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "test".to_string(), encoded: "test".to_string(), diff --git a/packages/hurl_core/src/ast/core.rs b/packages/hurl_core/src/ast/core.rs index ef8166c99f9..03c60163a53 100644 --- a/packages/hurl_core/src/ast/core.rs +++ b/packages/hurl_core/src/ast/core.rs @@ -556,7 +556,7 @@ pub struct File { #[derive(Clone, Debug, PartialEq, Eq)] pub struct Template { - pub quotes: bool, + pub delimiter: Option, pub elements: Vec, pub source_info: SourceInfo, } @@ -624,8 +624,8 @@ pub struct LineTerminator { #[derive(Clone, Debug, PartialEq, Eq)] pub enum Bytes { - Json { value: json::Value }, - Xml { value: String }, + Json(json::Value), + Xml(String), MultilineString(MultilineString), Base64(Base64), File(File), @@ -877,5 +877,7 @@ pub enum FilterValue { }, UrlEncode {}, UrlDecode {}, + HtmlEscape {}, + HtmlUnescape {}, ToInt {}, } diff --git a/packages/hurl_core/src/ast/display.rs b/packages/hurl_core/src/ast/display.rs index 9d28f7a3c46..6ab48454072 100644 --- a/packages/hurl_core/src/ast/display.rs +++ b/packages/hurl_core/src/ast/display.rs @@ -260,7 +260,7 @@ mod tests { fn hello_template() -> Template { Template { - quotes: false, + delimiter: None, elements: vec![ TemplateElement::String { value: "Hello ".to_string(), @@ -322,7 +322,7 @@ mod tests { assert_eq!( CookiePath { name: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "LSID".to_string(), encoded: "unused".to_string(), diff --git a/packages/hurl_core/src/ast/json.rs b/packages/hurl_core/src/ast/json.rs index 73366869b07..cee7c92cb90 100644 --- a/packages/hurl_core/src/ast/json.rs +++ b/packages/hurl_core/src/ast/json.rs @@ -191,13 +191,13 @@ impl ObjectElement { impl Template { fn encoded(&self) -> String { let mut s = "".to_string(); - if self.quotes { - s.push('"') + if let Some(d) = self.delimiter { + s.push(d) } let elements: Vec = self.elements.iter().map(|e| e.encoded()).collect(); s.push_str(elements.join("").as_str()); - if self.quotes { - s.push('"') + if let Some(d) = self.delimiter { + s.push(d) } s } @@ -241,7 +241,7 @@ mod tests { assert_eq!( "\"hello\"".to_string(), Value::String(Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "hello".to_string(), encoded: "hello".to_string(), @@ -298,7 +298,7 @@ mod tests { elements: vec![ObjectElement { space0: " ".to_string(), name: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "id".to_string(), encoded: "id".to_string(), @@ -338,7 +338,7 @@ mod tests { ); assert_eq!( Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::Expression(Expr { space0: Whitespace { value: "".to_string(), diff --git a/packages/hurl_core/src/format/html.rs b/packages/hurl_core/src/format/html.rs index 9d7687608b9..e551cd90df7 100644 --- a/packages/hurl_core/src/format/html.rs +++ b/packages/hurl_core/src/format/html.rs @@ -930,9 +930,9 @@ impl Htmlable for Bytes { Bytes::Base64(value) => format!("{}", value.to_html()), Bytes::File(value) => format!("{}", value.to_html()), Bytes::Hex(value) => format!("{}", value.to_html()), - Bytes::Json { value } => value.to_html(), + Bytes::Json(value) => value.to_html(), Bytes::MultilineString(value) => value.to_html(), - Bytes::Xml { value } => xml_html(value), + Bytes::Xml(value) => xml_html(value), } } } @@ -1083,6 +1083,12 @@ impl Htmlable for FilterValue { } FilterValue::UrlEncode {} => "urlEncode".to_string(), FilterValue::UrlDecode {} => "urlDecode".to_string(), + FilterValue::HtmlEscape {} => { + "htmlEscape".to_string() + } + FilterValue::HtmlUnescape {} => { + "htmlUnescape".to_string() + } FilterValue::ToInt {} => "toInt".to_string(), } } @@ -1120,7 +1126,7 @@ mod tests { fn test_multiline_string() { // `````` let multiline_string = MultilineString::OneLineText(Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "".to_string(), encoded: "unused".to_string(), @@ -1134,7 +1140,7 @@ mod tests { // ```hello``` let multiline_string = MultilineString::OneLineText(Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "hello".to_string(), encoded: "unused".to_string(), @@ -1166,7 +1172,7 @@ mod tests { }, }, value: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "line1\nline2\n".to_string(), encoded: "unused".to_string(), @@ -1204,7 +1210,7 @@ mod tests { elements: vec![JsonObjectElement { space0: "\n ".to_string(), name: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "id".to_string(), encoded: "id".to_string(), @@ -1226,7 +1232,7 @@ mod tests { #[test] fn test_json_encoded_newline() { let value = JsonValue::String(Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "\n".to_string(), encoded: "\\n".to_string(), diff --git a/packages/hurl_core/src/parser/bytes.rs b/packages/hurl_core/src/parser/bytes.rs index e01f4b19ffe..1a7071f0bf0 100644 --- a/packages/hurl_core/src/parser/bytes.rs +++ b/packages/hurl_core/src/parser/bytes.rs @@ -42,14 +42,14 @@ pub fn bytes(reader: &mut Reader) -> ParseResult<'static, Bytes> { fn xml_bytes(reader: &mut Reader) -> ParseResult<'static, Bytes> { match xml::parse(reader) { Err(e) => Err(e), - Ok(value) => Ok(Bytes::Xml { value }), + Ok(value) => Ok(Bytes::Xml(value)), } } fn json_bytes(reader: &mut Reader) -> ParseResult<'static, Bytes> { match parse_json(reader) { Err(e) => Err(e), - Ok(value) => Ok(Bytes::Json { value }), + Ok(value) => Ok(Bytes::Json(value)), } } @@ -79,62 +79,54 @@ mod tests { let mut reader = Reader::init("[1,2,3] "); assert_eq!( bytes(&mut reader).unwrap(), - Bytes::Json { - value: JsonValue::List { - space0: "".to_string(), - elements: vec![ - JsonListElement { - space0: "".to_string(), - value: JsonValue::Number("1".to_string()), - space1: "".to_string() - }, - JsonListElement { - space0: "".to_string(), - value: JsonValue::Number("2".to_string()), - space1: "".to_string() - }, - JsonListElement { - space0: "".to_string(), - value: JsonValue::Number("3".to_string()), - space1: "".to_string() - }, - ], - } - } + Bytes::Json(JsonValue::List { + space0: "".to_string(), + elements: vec![ + JsonListElement { + space0: "".to_string(), + value: JsonValue::Number("1".to_string()), + space1: "".to_string(), + }, + JsonListElement { + space0: "".to_string(), + value: JsonValue::Number("2".to_string()), + space1: "".to_string(), + }, + JsonListElement { + space0: "".to_string(), + value: JsonValue::Number("3".to_string()), + space1: "".to_string(), + }, + ], + }) ); assert_eq!(reader.state.cursor, 7); let mut reader = Reader::init("{ } "); assert_eq!( bytes(&mut reader).unwrap(), - Bytes::Json { - value: JsonValue::Object { - space0: " ".to_string(), - elements: vec![], - } - } + Bytes::Json(JsonValue::Object { + space0: " ".to_string(), + elements: vec![], + }) ); assert_eq!(reader.state.cursor, 3); let mut reader = Reader::init("true"); assert_eq!( bytes(&mut reader).unwrap(), - Bytes::Json { - value: JsonValue::Boolean(true) - } + Bytes::Json(JsonValue::Boolean(true)) ); assert_eq!(reader.state.cursor, 4); let mut reader = Reader::init("\"\" x"); assert_eq!( bytes(&mut reader).unwrap(), - Bytes::Json { - value: JsonValue::String(Template { - quotes: true, - elements: vec![], - source_info: SourceInfo::new(1, 2, 1, 2), - }) - } + Bytes::Json(JsonValue::String(Template { + delimiter: Some('"'), + elements: vec![], + source_info: SourceInfo::new(1, 2, 1, 2), + })) ); assert_eq!(reader.state.cursor, 2); } @@ -144,9 +136,7 @@ mod tests { let mut reader = Reader::init(""); assert_eq!( bytes(&mut reader).unwrap(), - Bytes::Xml { - value: String::from("") - } + Bytes::Xml(String::from("")) ); } @@ -189,9 +179,7 @@ mod tests { let mut reader = Reader::init("100"); assert_eq!( json_bytes(&mut reader).unwrap(), - Bytes::Json { - value: JsonValue::Number("100".to_string()) - } + Bytes::Json(JsonValue::Number("100".to_string())) ); } } diff --git a/packages/hurl_core/src/parser/cookiepath.rs b/packages/hurl_core/src/parser/cookiepath.rs index 8a8704e0114..5bd3bc20be7 100644 --- a/packages/hurl_core/src/parser/cookiepath.rs +++ b/packages/hurl_core/src/parser/cookiepath.rs @@ -93,7 +93,7 @@ mod tests { cookiepath(&mut reader).unwrap(), CookiePath { name: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "cookie1".to_string(), encoded: "cookie1".to_string(), @@ -113,7 +113,7 @@ mod tests { cookiepath(&mut reader).unwrap(), CookiePath { name: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "cookie1".to_string(), encoded: "cookie1".to_string(), @@ -143,7 +143,7 @@ mod tests { cookiepath(&mut reader).unwrap(), CookiePath { name: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::Expression(Expr { space0: Whitespace { value: String::from(""), diff --git a/packages/hurl_core/src/parser/filter.rs b/packages/hurl_core/src/parser/filter.rs index d9bba57b2f2..f5adf736fa8 100644 --- a/packages/hurl_core/src/parser/filter.rs +++ b/packages/hurl_core/src/parser/filter.rs @@ -54,6 +54,8 @@ pub fn filter(reader: &mut Reader) -> ParseResult<'static, Filter> { regex_filter, url_encode_filter, url_decode_filter, + html_encode_filter, + html_decode_filter, to_int_filter, ], reader, @@ -98,6 +100,16 @@ fn url_decode_filter(reader: &mut Reader) -> ParseResult<'static, FilterValue> { Ok(FilterValue::UrlDecode {}) } +fn html_encode_filter(reader: &mut Reader) -> ParseResult<'static, FilterValue> { + try_literal("htmlEscape", reader)?; + Ok(FilterValue::HtmlEscape {}) +} + +fn html_decode_filter(reader: &mut Reader) -> ParseResult<'static, FilterValue> { + try_literal("htmlUnescape", reader)?; + Ok(FilterValue::HtmlUnescape {}) +} + fn to_int_filter(reader: &mut Reader) -> ParseResult<'static, FilterValue> { try_literal("toInt", reader)?; Ok(FilterValue::ToInt {}) diff --git a/packages/hurl_core/src/parser/json.rs b/packages/hurl_core/src/parser/json.rs index 78397cba392..3a730fef93a 100644 --- a/packages/hurl_core/src/parser/json.rs +++ b/packages/hurl_core/src/parser/json.rs @@ -57,7 +57,7 @@ fn string_value(reader: &mut Reader) -> ParseResult<'static, JsonValue> { fn string_template(reader: &mut Reader) -> ParseResult<'static, Template> { try_literal("\"", reader)?; - let quotes = true; + let delimiter = Some('"'); let mut chars = vec![]; let start = reader.state.pos.clone(); loop { @@ -80,7 +80,7 @@ fn string_template(reader: &mut Reader) -> ParseResult<'static, Template> { let elements = templatize(encoded_string)?; let template = Template { - quotes, + delimiter, elements, source_info: SourceInfo { start, end }, }; @@ -423,7 +423,7 @@ mod tests { pub fn json_hello_world_value() -> JsonValue { // "hello\u0020{{name}}!" JsonValue::String(Template { - quotes: true, + delimiter: Some('"'), elements: vec![ TemplateElement::String { value: "Hello ".to_string(), @@ -458,7 +458,7 @@ mod tests { assert_eq!( string_value(&mut reader).unwrap(), JsonValue::String(Template { - quotes: true, + delimiter: Some('"'), elements: vec![], source_info: SourceInfo::new(1, 2, 1, 2), }) @@ -473,7 +473,7 @@ mod tests { assert_eq!( string_value(&mut reader).unwrap(), JsonValue::String(Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "{}".to_string(), encoded: "{}".to_string(), @@ -814,7 +814,7 @@ mod tests { elements: vec![JsonObjectElement { space0: "".to_string(), name: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "a".to_string(), encoded: "a".to_string() @@ -859,7 +859,7 @@ mod tests { JsonObjectElement { space0: "".to_string(), name: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "a".to_string(), encoded: "a".to_string() diff --git a/packages/hurl_core/src/parser/multiline.rs b/packages/hurl_core/src/parser/multiline.rs index 33d9677ddd1..7085730601e 100644 --- a/packages/hurl_core/src/parser/multiline.rs +++ b/packages/hurl_core/src/parser/multiline.rs @@ -106,7 +106,7 @@ fn graphql(reader: &mut Reader) -> ParseResult<'static, MultilineString> { let elements = template::templatize(encoded_string)?; let template = Template { - quotes: false, + delimiter: None, elements, source_info: SourceInfo { start, end }, }; @@ -134,7 +134,7 @@ fn graphql(reader: &mut Reader) -> ParseResult<'static, MultilineString> { let elements = template::templatize(encoded_string)?; let template = Template { - quotes: false, + delimiter: None, elements, source_info: SourceInfo { start, end }, }; @@ -253,7 +253,7 @@ fn multiline_string_value(reader: &mut Reader) -> ParseResult<'static, Template> let elements = template::templatize(encoded_string)?; Ok(Template { - quotes: false, + delimiter: None, elements, source_info: SourceInfo { start, end }, }) @@ -289,7 +289,7 @@ fn oneline_string_value(reader: &mut Reader) -> ParseResult<'static, Template> { let elements = template::templatize(encoded_string)?; Ok(Template { - quotes: false, + delimiter: None, elements, source_info: SourceInfo { start, end }, }) @@ -314,7 +314,7 @@ mod tests { source_info: SourceInfo::new(1, 4, 2, 1), }, value: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "line1\nline2\nline3\n".to_string(), encoded: "line1\nline2\nline3\n".to_string(), @@ -337,7 +337,7 @@ mod tests { source_info: SourceInfo::new(1, 13, 2, 1), }, value: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "line1\nline2\nline3\n".to_string(), encoded: "line1\nline2\nline3\n".to_string(), @@ -363,7 +363,7 @@ mod tests { source_info: SourceInfo::new(1, 8, 2, 1), }, value: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "line1\nline2\nline3\n".to_string(), encoded: "line1\nline2\nline3\n".to_string(), @@ -389,7 +389,7 @@ mod tests { source_info: SourceInfo::new(1, 11, 2, 1), }, value: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "line1\nline2\nline3\n".to_string(), encoded: "line1\nline2\nline3\n".to_string(), @@ -413,7 +413,7 @@ mod tests { source_info: SourceInfo::new(1, 17, 2, 1), }, value: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "line1\nline2\nline3\n".to_string(), encoded: "line1\nline2\nline3\n".to_string(), @@ -444,7 +444,7 @@ mod tests { assert_eq!( multiline_string(&mut reader).unwrap(), MultilineString::OneLineText(Template { - quotes: false, + delimiter: None, elements: vec![], source_info: SourceInfo::new(1, 4, 1, 4), }) @@ -463,7 +463,7 @@ mod tests { source_info: SourceInfo::new(1, 4, 2, 1), }, value: Template { - quotes: false, + delimiter: None, elements: vec![], source_info: SourceInfo::new(2, 1, 2, 1), }, @@ -482,7 +482,7 @@ mod tests { source_info: SourceInfo::new(1, 4, 2, 1), }, value: Template { - quotes: false, + delimiter: None, elements: vec![], source_info: SourceInfo::new(2, 1, 2, 1), }, @@ -496,7 +496,7 @@ mod tests { assert_eq!( multiline_string(&mut reader).unwrap(), MultilineString::OneLineText(Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "Hello World!".to_string(), encoded: "Hello World!".to_string(), @@ -512,7 +512,7 @@ mod tests { assert_eq!( multiline_string(&mut reader).unwrap(), MultilineString::OneLineText(Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "base64_inline".to_string(), encoded: "base64_inline".to_string(), @@ -537,7 +537,7 @@ mod tests { source_info: SourceInfo::new(1, 4, 2, 1), }, value: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "line1\nline2\nline3\n".to_string(), encoded: "line1\nline2\nline3\n".to_string(), @@ -563,7 +563,7 @@ mod tests { source_info: SourceInfo::new(1, 4, 2, 1), }, value: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "\n".to_string(), encoded: "\n".to_string(), @@ -587,7 +587,7 @@ mod tests { source_info: SourceInfo::new(1, 4, 2, 1), }, value: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "\r\n".to_string(), encoded: "\r\n".to_string(), @@ -635,7 +635,7 @@ mod tests { assert_eq!( multiline_string_value(&mut reader).unwrap(), Template { - quotes: false, + delimiter: None, elements: vec![], source_info: SourceInfo::new(1, 1, 1, 1), } @@ -646,7 +646,7 @@ mod tests { assert_eq!( multiline_string_value(&mut reader).unwrap(), Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "hello".to_string(), encoded: "hello".to_string(), @@ -685,7 +685,7 @@ variables { source_info: SourceInfo::new(1, 11, 2, 1), }, value: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "query Human($name: String!) {\n human(name: $name) {\n name\n height(unit: FOOT)\n}\n\n".to_string(), encoded: @@ -703,7 +703,7 @@ variables { elements: vec![JsonObjectElement { space0: "".to_string(), name: Template { - quotes: true, + delimiter: Some('"'), elements: vec![ TemplateElement::String { value: "name".to_string(), @@ -715,7 +715,7 @@ variables { space1: "".to_string(), space2: " ".to_string(), value: JsonValue::String(Template { - quotes: true, + delimiter: Some('"'), elements: vec![ TemplateElement::String { value: "Han Solo".to_string(), diff --git a/packages/hurl_core/src/parser/parsers.rs b/packages/hurl_core/src/parser/parsers.rs index 917317ee2a9..80079b0713e 100644 --- a/packages/hurl_core/src/parser/parsers.rs +++ b/packages/hurl_core/src/parser/parsers.rs @@ -227,7 +227,7 @@ fn status(reader: &mut Reader) -> ParseResult<'static, Status> { pos: start, recoverable: false, inner: ParseError::Status {}, - }) + }); } }, }; @@ -328,7 +328,7 @@ mod tests { value: String::from("http://google.fr"), encoded: String::from("http://google.fr"), }], - quotes: false, + delimiter: None, source_info: SourceInfo::new(1, 5, 1, 21), }, line_terminator0: LineTerminator { @@ -366,7 +366,7 @@ mod tests { value: String::from("http://google.fr"), encoded: String::from("http://google.fr"), }], - quotes: false, + delimiter: None, source_info: SourceInfo::new(1, 6, 1, 22), }, line_terminator0: LineTerminator { @@ -427,9 +427,9 @@ mod tests { value: String::from("Hello World!\n"), encoded: String::from("Hello World!\n"), }], - quotes: false, + delimiter: None, source_info: SourceInfo::new(3, 1, 4, 1), - } + }, })), line_terminator0: LineTerminator { space0: Whitespace { @@ -453,28 +453,26 @@ mod tests { assert_eq!(r.method, Method::Post); assert_eq!( r.body.unwrap().value, - Bytes::Json { - value: JsonValue::List { - space0: "".to_string(), - elements: vec![ - JsonListElement { - space0: "".to_string(), - value: JsonValue::Number("1".to_string()), - space1: "".to_string(), - }, - JsonListElement { - space0: "".to_string(), - value: JsonValue::Number("2".to_string()), - space1: "".to_string(), - }, - JsonListElement { - space0: "".to_string(), - value: JsonValue::Number("3".to_string()), - space1: "".to_string(), - }, - ], - } - } + Bytes::Json(JsonValue::List { + space0: "".to_string(), + elements: vec![ + JsonListElement { + space0: "".to_string(), + value: JsonValue::Number("1".to_string()), + space1: "".to_string(), + }, + JsonListElement { + space0: "".to_string(), + value: JsonValue::Number("2".to_string()), + space1: "".to_string(), + }, + JsonListElement { + space0: "".to_string(), + value: JsonValue::Number("3".to_string()), + space1: "".to_string(), + }, + ], + }) ); let mut reader = Reader::init("POST http://localhost:8000/post-json-string\n\"Hello\""); @@ -482,16 +480,14 @@ mod tests { assert_eq!(r.method, Method::Post); assert_eq!( r.body.unwrap().value, - Bytes::Json { - value: JsonValue::String(Template { - quotes: true, - elements: vec![TemplateElement::String { - value: "Hello".to_string(), - encoded: "Hello".to_string(), - }], - source_info: SourceInfo::new(2, 2, 2, 7), - }) - } + Bytes::Json(JsonValue::String(Template { + delimiter: Some('"'), + elements: vec![TemplateElement::String { + value: "Hello".to_string(), + encoded: "Hello".to_string(), + }], + source_info: SourceInfo::new(2, 2, 2, 7), + })) ); let mut reader = Reader::init("POST http://localhost:8000/post-json-number\n100"); @@ -499,9 +495,7 @@ mod tests { assert_eq!(r.method, Method::Post); assert_eq!( r.body.unwrap().value, - Bytes::Json { - value: JsonValue::Number("100".to_string()) - } + Bytes::Json(JsonValue::Number("100".to_string())) ); } @@ -571,28 +565,26 @@ mod tests { assert_eq!(b.line_terminators.len(), 0); assert_eq!( b.value, - Bytes::Json { - value: JsonValue::List { - space0: "".to_string(), - elements: vec![ - JsonListElement { - space0: "".to_string(), - value: JsonValue::Number("1".to_string()), - space1: "".to_string(), - }, - JsonListElement { - space0: "".to_string(), - value: JsonValue::Number("2".to_string()), - space1: "".to_string(), - }, - JsonListElement { - space0: "".to_string(), - value: JsonValue::Number("3".to_string()), - space1: "".to_string(), - }, - ], - } - } + Bytes::Json(JsonValue::List { + space0: "".to_string(), + elements: vec![ + JsonListElement { + space0: "".to_string(), + value: JsonValue::Number("1".to_string()), + space1: "".to_string(), + }, + JsonListElement { + space0: "".to_string(), + value: JsonValue::Number("2".to_string()), + space1: "".to_string(), + }, + JsonListElement { + space0: "".to_string(), + value: JsonValue::Number("3".to_string()), + space1: "".to_string(), + }, + ], + }) ); assert_eq!(reader.state.cursor, 8); @@ -601,12 +593,10 @@ mod tests { assert_eq!(b.line_terminators.len(), 0); assert_eq!( b.value, - Bytes::Json { - value: JsonValue::Object { - space0: "".to_string(), - elements: vec![], - } - } + Bytes::Json(JsonValue::Object { + space0: "".to_string(), + elements: vec![], + }) ); assert_eq!(reader.state.cursor, 2); @@ -615,12 +605,10 @@ mod tests { assert_eq!(b.line_terminators.len(), 1); assert_eq!( b.value, - Bytes::Json { - value: JsonValue::Object { - space0: "".to_string(), - elements: vec![], - } - } + Bytes::Json(JsonValue::Object { + space0: "".to_string(), + elements: vec![], + }) ); assert_eq!(reader.state.cursor, 24); diff --git a/packages/hurl_core/src/parser/predicate.rs b/packages/hurl_core/src/parser/predicate.rs index 92a89859ef0..ee2e1f2e46b 100644 --- a/packages/hurl_core/src/parser/predicate.rs +++ b/packages/hurl_core/src/parser/predicate.rs @@ -507,7 +507,7 @@ mod tests { equal_predicate(&mut reader).unwrap(), PredicateFuncValue::Equal { value: PredicateValue::String(Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "Bob".to_string(), encoded: "Bob".to_string(), diff --git a/packages/hurl_core/src/parser/primitives.rs b/packages/hurl_core/src/parser/primitives.rs index ee8c8cbcd3d..c6856a8f95e 100644 --- a/packages/hurl_core/src/parser/primitives.rs +++ b/packages/hurl_core/src/parser/primitives.rs @@ -778,7 +778,7 @@ mod tests { source_info: SourceInfo::new(1, 9, 1, 10), }, value: Template { - quotes: false, + delimiter: None, elements: vec![ TemplateElement::String { value: "hello ".to_string(), diff --git a/packages/hurl_core/src/parser/query.rs b/packages/hurl_core/src/parser/query.rs index 9a3694b99eb..87d97be8271 100644 --- a/packages/hurl_core/src/parser/query.rs +++ b/packages/hurl_core/src/parser/query.rs @@ -221,7 +221,7 @@ mod tests { source_info: SourceInfo::new(1, 7, 1, 8), }, name: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "Foo".to_string(), encoded: "Foo".to_string(), @@ -244,7 +244,7 @@ mod tests { }, expr: CookiePath { name: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "Foo".to_string(), encoded: "Foo".to_string(), @@ -282,7 +282,7 @@ mod tests { source_info: SourceInfo::new(1, 6, 1, 7), }, expr: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: String::from("normalize-space(//head/title)"), encoded: String::from("normalize-space(//head/title)"), @@ -296,7 +296,7 @@ mod tests { assert_eq!(xpath_query(&mut reader).unwrap(), QueryValue::Xpath { space0: Whitespace { value: String::from(" "), source_info: SourceInfo::new(1, 6, 1, 7) }, expr: Template { - quotes: true, + delimiter: Some('"'), elements: vec![ TemplateElement::String { value: String::from("normalize-space(//div[contains(concat(' ',normalize-space(@class),' '),' monthly-price ')])"), @@ -324,8 +324,7 @@ mod tests { value: "$['statusCode']".to_string(), encoded: "$['statusCode']".to_string(), }], - quotes: true, - //delimiter: "\"".to_string(), + delimiter: Some('"'), source_info: SourceInfo::new(1, 10, 1, 27), }, }, @@ -343,8 +342,7 @@ mod tests { value: "$.success".to_string(), encoded: "$.success".to_string(), }], - quotes: true, - //delimiter: "\"".to_string(), + delimiter: Some('"'), source_info: SourceInfo::new(1, 10, 1, 21), }, }, diff --git a/packages/hurl_core/src/parser/sections.rs b/packages/hurl_core/src/parser/sections.rs index 849537645f3..17bc7c1f27f 100644 --- a/packages/hurl_core/src/parser/sections.rs +++ b/packages/hurl_core/src/parser/sections.rs @@ -771,7 +771,7 @@ mod tests { source_info: SourceInfo::new(2, 7, 2, 8), }, name: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "Location".to_string(), encoded: "Location".to_string(), @@ -799,7 +799,7 @@ mod tests { source_info: SourceInfo::new(2, 25, 2, 26), }, value: PredicateValue::String(Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "https://google.fr".to_string(), encoded: "https://google.fr".to_string(), @@ -861,7 +861,7 @@ mod tests { assert_eq!( c.value, Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "Bar".to_string(), encoded: "Bar".to_string(), @@ -1073,7 +1073,7 @@ mod tests { assert_eq!( variable_value(&mut reader).unwrap(), VariableValue::String(Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "toto".to_string(), encoded: "toto".to_string(), @@ -1088,7 +1088,7 @@ mod tests { assert_eq!( variable_value(&mut reader).unwrap(), VariableValue::String(Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "123".to_string(), encoded: "123".to_string(), @@ -1219,7 +1219,7 @@ mod tests { source_info: SourceInfo::new(1, 12, 1, 13), }, name: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "Location".to_string(), encoded: "Location".to_string(), @@ -1246,7 +1246,7 @@ mod tests { source_info: SourceInfo::new(1, 14, 1, 15), }, name: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "Location".to_string(), encoded: "Location".to_string(), @@ -1311,7 +1311,7 @@ mod tests { source_info: SourceInfo::new(1, 7, 1, 8), }, name: Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "Location".to_string(), encoded: "Location".to_string(), diff --git a/packages/hurl_core/src/parser/string.rs b/packages/hurl_core/src/parser/string.rs index ece17681466..e19639facb8 100644 --- a/packages/hurl_core/src/parser/string.rs +++ b/packages/hurl_core/src/parser/string.rs @@ -68,10 +68,9 @@ pub fn unquoted_template(reader: &mut Reader) -> ParseResult<'static, Template> }, chars, }; - let quotes = false; let elements = template::templatize(encoded_string)?; Ok(Template { - quotes, + delimiter: None, elements, source_info: SourceInfo { start: start.pos, @@ -145,7 +144,6 @@ pub fn quoted_string(reader: &mut Reader) -> ParseResult<'static, String> { } pub fn quoted_template(reader: &mut Reader) -> ParseResult<'static, Template> { - let quotes = true; let start = reader.state.clone().pos; let mut end = start.clone(); try_literal("\"", reader)?; @@ -178,7 +176,7 @@ pub fn quoted_template(reader: &mut Reader) -> ParseResult<'static, Template> { }; let elements = template::templatize(encoded_string)?; Ok(Template { - quotes, + delimiter: Some('"'), elements, source_info: SourceInfo { start, @@ -287,7 +285,7 @@ mod tests { assert_eq!( unquoted_template(&mut reader).unwrap(), Template { - quotes: false, + delimiter: None, elements: vec![], source_info: SourceInfo::new(1, 1, 1, 1), } @@ -313,7 +311,7 @@ mod tests { assert_eq!( unquoted_template(&mut reader).unwrap(), Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "a".to_string(), encoded: "a".to_string(), @@ -330,7 +328,7 @@ mod tests { assert_eq!( unquoted_template(&mut reader).unwrap(), Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "a#".to_string(), encoded: "a\\u{23}".to_string(), @@ -347,7 +345,7 @@ mod tests { assert_eq!( unquoted_template(&mut reader).unwrap(), Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "\"hi\"".to_string(), encoded: "\"hi\"".to_string(), @@ -364,7 +362,7 @@ mod tests { assert_eq!( unquoted_template(&mut reader).unwrap(), Template { - quotes: false, + delimiter: None, elements: vec![ TemplateElement::String { value: "hello ".to_string(), @@ -401,7 +399,7 @@ mod tests { assert_eq!( unquoted_template(&mut reader).unwrap(), Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "hello world".to_string(), encoded: "hello world".to_string(), @@ -532,7 +530,7 @@ mod tests { assert_eq!( quoted_template(&mut reader).unwrap(), Template { - quotes: true, + delimiter: Some('"'), elements: vec![], source_info: SourceInfo::new(1, 1, 1, 3), } @@ -543,7 +541,7 @@ mod tests { assert_eq!( quoted_template(&mut reader).unwrap(), Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "a#".to_string(), encoded: "a#".to_string(), @@ -557,7 +555,7 @@ mod tests { assert_eq!( quoted_template(&mut reader).unwrap(), Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "{0}".to_string(), encoded: "{0}".to_string(), @@ -575,7 +573,7 @@ mod tests { assert_eq!( quoted_template(&mut reader).unwrap(), Template { - quotes: true, + delimiter: Some('"'), elements: vec![TemplateElement::String { value: "\"hi\"".to_string(), encoded: "\\\"hi\\\"".to_string() diff --git a/packages/hurl_core/src/parser/url.rs b/packages/hurl_core/src/parser/url.rs index 1c10bf0f65b..76afdbf2639 100644 --- a/packages/hurl_core/src/parser/url.rs +++ b/packages/hurl_core/src/parser/url.rs @@ -126,7 +126,7 @@ pub fn url(reader: &mut Reader) -> ParseResult<'static, Template> { reader.state = save; Ok(Template { - quotes: false, + delimiter: None, elements, source_info: SourceInfo { start: start.pos, @@ -149,7 +149,7 @@ mod tests { value: String::from("http://google.fr"), encoded: String::from("http://google.fr"), }], - quotes: false, + delimiter: None, source_info: SourceInfo::new(1, 1, 1, 17), } ); @@ -168,7 +168,7 @@ mod tests { "http://localhost:8000/cookies/set-session-cookie2-valueA" ), }], - quotes: false, + delimiter: None, source_info: SourceInfo::new(1, 1, 1, 57), } ); @@ -205,8 +205,7 @@ mod tests { encoded: String::from(".fr"), }, ], - //encoded: None, - quotes: false, + delimiter: None, source_info: SourceInfo::new(1, 1, 1, 19), } ); diff --git a/packages/hurlfmt/src/format/json.rs b/packages/hurlfmt/src/format/json.rs index f6b2cc98422..e932d81f244 100644 --- a/packages/hurlfmt/src/format/json.rs +++ b/packages/hurlfmt/src/format/json.rs @@ -133,11 +133,11 @@ impl ToJson for Bytes { Bytes::Base64(value) => value.to_json(), Bytes::Hex(value) => value.to_json(), Bytes::File(value) => value.to_json(), - Bytes::Json { value } => JValue::Object(vec![ + Bytes::Json(value) => JValue::Object(vec![ ("type".to_string(), JValue::String("json".to_string())), ("value".to_string(), value.to_json()), ]), - Bytes::Xml { value } => JValue::Object(vec![ + Bytes::Xml(value) => JValue::Object(vec![ ("type".to_string(), JValue::String("xml".to_string())), ("value".to_string(), JValue::String(value.clone())), ]), @@ -535,6 +535,15 @@ impl ToJson for FilterValue { FilterValue::UrlDecode { .. } => { attributes.push(("type".to_string(), JValue::String("urlDecode".to_string()))); } + FilterValue::HtmlEscape { .. } => { + attributes.push(("type".to_string(), JValue::String("htmlEscape".to_string()))); + } + FilterValue::HtmlUnescape { .. } => { + attributes.push(( + "type".to_string(), + JValue::String("htmlUnescape".to_string()), + )); + } FilterValue::ToInt { .. } => { attributes.push(("type".to_string(), JValue::String("toInt".to_string()))); } @@ -571,7 +580,7 @@ pub mod tests { method: Method::Get, space1: whitespace(), url: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "http://example.com".to_string(), encoded: "not_used".to_string(), @@ -591,7 +600,7 @@ pub mod tests { space1: whitespace(), space2: whitespace(), value: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "Bar".to_string(), encoded: "unused".to_string(), @@ -682,7 +691,7 @@ pub mod tests { value: QueryValue::Header { space0: whitespace(), name: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "Content-Length".to_string(), encoded: "10".to_string(), diff --git a/packages/hurlfmt/src/format/text.rs b/packages/hurlfmt/src/format/text.rs index 634d17a5ceb..35c3122a74d 100644 --- a/packages/hurlfmt/src/format/text.rs +++ b/packages/hurlfmt/src/format/text.rs @@ -92,7 +92,7 @@ pub fn format_token(token: Token, color: bool) -> String { value } } - Token::Quote(value) => { + Token::StringDelimiter(value) => { if color { value.green().to_string() } else { diff --git a/packages/hurlfmt/src/format/token.rs b/packages/hurlfmt/src/format/token.rs index d60364d3653..fdfaf1310cc 100644 --- a/packages/hurlfmt/src/format/token.rs +++ b/packages/hurlfmt/src/format/token.rs @@ -35,7 +35,7 @@ pub enum Token { Comment(String), Value(String), Colon(String), - Quote(String), + StringDelimiter(String), Boolean(String), Number(String), String(String), @@ -160,22 +160,12 @@ impl Tokenizable for Bytes { fn tokenize(&self) -> Vec { let mut tokens: Vec = vec![]; match self { - Bytes::Json { value } => tokens.append(&mut value.tokenize()), - Bytes::Xml { value } => { - tokens.push(Token::String(value.to_string())); - } - Bytes::MultilineString(value) => { - tokens.append(&mut value.tokenize()); - } - Bytes::Base64(value) => { - tokens.append(&mut value.tokenize()); - } - Bytes::Hex(value) => { - tokens.append(&mut value.tokenize()); - } - Bytes::File(value) => { - tokens.append(&mut value.tokenize()); - } + Bytes::Json(value) => tokens.append(&mut value.tokenize()), + Bytes::Xml(value) => tokens.push(Token::String(value.to_string())), + Bytes::MultilineString(value) => tokens.append(&mut value.tokenize()), + Bytes::Base64(value) => tokens.append(&mut value.tokenize()), + Bytes::Hex(value) => tokens.append(&mut value.tokenize()), + Bytes::File(value) => tokens.append(&mut value.tokenize()), } tokens } @@ -605,7 +595,7 @@ impl Tokenizable for PredicateValue { impl Tokenizable for MultilineString { fn tokenize(&self) -> Vec { - let mut tokens: Vec = vec![Token::Keyword("```".to_string())]; + let mut tokens: Vec = vec![Token::StringDelimiter("```".to_string())]; // FIXME: ugly if !let workaround, will be removed soon as // OneLineText is temporary. if let MultilineString::OneLineText(..) = self { @@ -619,7 +609,7 @@ impl Tokenizable for MultilineString { | MultilineString::Xml(text) => tokens.append(&mut text.tokenize()), MultilineString::GraphQl(graphql) => tokens.append(&mut graphql.tokenize()), } - tokens.push(Token::Keyword("```".to_string())); + tokens.push(Token::StringDelimiter("```".to_string())); tokens } } @@ -662,14 +652,14 @@ impl Tokenizable for EncodedString { fn tokenize(&self) -> Vec { let mut tokens: Vec = vec![]; if self.quotes { - tokens.push(Token::Quote( + tokens.push(Token::StringDelimiter( if self.clone().quotes { "\"" } else { "" }.to_string(), )); } tokens.push(Token::String(self.encoded.clone())); if self.quotes { - tokens.push(Token::Quote( + tokens.push(Token::StringDelimiter( if self.clone().quotes { "\"" } else { "" }.to_string(), )); } @@ -680,19 +670,14 @@ impl Tokenizable for EncodedString { impl Tokenizable for Template { fn tokenize(&self) -> Vec { let mut tokens: Vec = vec![]; - if self.quotes { - tokens.push(Token::Quote( - if self.clone().quotes { "\"" } else { "" }.to_string(), - )); + if let Some(d) = self.delimiter { + tokens.push(Token::StringDelimiter(d.to_string())); } for element in self.elements.clone() { tokens.append(&mut element.tokenize()); } - - if self.quotes { - tokens.push(Token::Quote( - if self.clone().quotes { "\"" } else { "" }.to_string(), - )); + if let Some(d) = self.delimiter { + tokens.push(Token::StringDelimiter(d.to_string())); } tokens } @@ -826,9 +811,9 @@ impl Tokenizable for JsonListElement { impl Tokenizable for JsonObjectElement { fn tokenize(&self) -> Vec { let mut tokens: Vec = vec![Token::Whitespace(self.space0.clone())]; - tokens.push(Token::Quote("\"".to_string())); + tokens.push(Token::StringDelimiter("\"".to_string())); tokens.push(Token::String(self.name.to_string())); - tokens.push(Token::Quote("\"".to_string())); + tokens.push(Token::StringDelimiter("\"".to_string())); tokens.push(Token::Whitespace(self.space1.clone())); tokens.push(Token::CodeDelimiter(":".to_string())); tokens.push(Token::Whitespace(self.space2.clone())); @@ -1167,6 +1152,10 @@ impl Tokenizable for Filter { FilterValue::Count { .. } => vec![Token::FilterType(String::from("count"))], FilterValue::UrlEncode { .. } => vec![Token::FilterType(String::from("urlEncode"))], FilterValue::UrlDecode { .. } => vec![Token::FilterType(String::from("urlDecode"))], + FilterValue::HtmlEscape { .. } => vec![Token::FilterType(String::from("htmlEscape"))], + FilterValue::HtmlUnescape { .. } => { + vec![Token::FilterType(String::from("htmlUnescape"))] + } FilterValue::ToInt { .. } => vec![Token::FilterType(String::from("toInt"))], } } diff --git a/packages/hurlfmt/src/linter/rules.rs b/packages/hurlfmt/src/linter/rules.rs index d8c37cc4e87..af0d8065c7c 100644 --- a/packages/hurlfmt/src/linter/rules.rs +++ b/packages/hurlfmt/src/linter/rules.rs @@ -602,20 +602,13 @@ impl Lintable for Bytes { } fn lint(&self) -> Bytes { - //let space0 = Whitespace { value: String::from(""), source_info: SourceInfo::init(0, 0, 0, 0) }; - //let value = self.value.lint(); - //let line_terminator0 = self.clone().line_terminator0; match self { Bytes::File(value) => Bytes::File(value.lint()), Bytes::Base64(value) => Bytes::Base64(value.lint()), Bytes::Hex(value) => Bytes::Hex(value.lint()), - Bytes::Json { value } => Bytes::Json { - value: value.clone(), - }, + Bytes::Json(value) => Bytes::Json(value.clone()), Bytes::MultilineString(value) => Bytes::MultilineString(value.lint()), - Bytes::Xml { value } => Bytes::Xml { - value: value.clone(), - }, + Bytes::Xml(value) => Bytes::Xml(value.clone()), } } } diff --git a/packages/hurlfmt/tests/json.rs b/packages/hurlfmt/tests/json.rs index ebdb877e1cb..1c4e54b3d98 100644 --- a/packages/hurlfmt/tests/json.rs +++ b/packages/hurlfmt/tests/json.rs @@ -63,7 +63,7 @@ fn value_string() -> BoxedStrategy { prop_oneof![ Just(JsonValue::String(Template { elements: vec![], - quotes: true, + delimiter: Some('"'), source_info: source_info.clone() })), Just(JsonValue::String(Template { @@ -71,7 +71,7 @@ fn value_string() -> BoxedStrategy { encoded: "Hello".to_string(), value: "Hello".to_string(), }], - quotes: true, + delimiter: Some('"'), source_info: source_info.clone() })), Just(JsonValue::String(Template { @@ -92,7 +92,7 @@ fn value_string() -> BoxedStrategy { }, }) ], - quotes: true, + delimiter: Some('"'), source_info })), ] @@ -219,7 +219,7 @@ fn value() -> BoxedStrategy { elements: vec![JsonObjectElement { space0: "".to_string(), name: Template { - quotes: false, + delimiter: None, elements: vec![TemplateElement::String { value: "key1".to_string(), encoded: "key1".to_string(), @@ -250,7 +250,7 @@ fn format_token(token: Token) -> String { | Token::Boolean(s) | Token::String(s) | Token::Keyword(s) - | Token::Quote(s) + | Token::StringDelimiter(s) | Token::QueryType(s) | Token::CodeVariable(s) | Token::CodeDelimiter(s) => s,