mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-22 07:18:06 +03:00
Add curl debug command to --json and JSON report
This commit is contained in:
parent
6bc76e6b84
commit
fb85f78137
@ -1 +1 @@
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":4,"message":"Invalid decoding\n --> tests_failed/assert_match_utf8.hurl:4:1\n |\n | GET http://localhost:8000/error-assert/match-utf8\n | ...\n 4 | body matches \".*\"\n | ^^^^ the body can not be decoded with charset 'utf-8'\n |","success":false}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/error-assert/match-utf8"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"1"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_failed/assert_match_utf8.hurl","success":false,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":4,"message":"Invalid decoding\n --> tests_failed/assert_match_utf8.hurl:4:1\n |\n | GET http://localhost:8000/error-assert/match-utf8\n | ...\n 4 | body matches \".*\"\n | ^^^^ the body can not be decoded with charset 'utf-8'\n |","success":false}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/error-assert/match-utf8"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"1"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/error-assert/match-utf8'","index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_failed/assert_match_utf8.hurl","success":false,"time":<<<\d+>>>}
|
||||
|
@ -1 +1 @@
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":9,"success":true},{"line":9,"message":"Assert status code\n --> tests_failed/assert_status.hurl:9:6\n |\n | GET http://localhost:8000/not_found\n | ...\n 9 | HTTP 200\n | ^^^ actual value is <404>\n |","success":false}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/not_found"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"207"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":404},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":7,"time":<<<\d+>>>}],"filename":"tests_failed/assert_status.hurl","success":false,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":9,"success":true},{"line":9,"message":"Assert status code\n --> tests_failed/assert_status.hurl:9:6\n |\n | GET http://localhost:8000/not_found\n | ...\n 9 | HTTP 200\n | ^^^ actual value is <404>\n |","success":false}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/not_found"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"207"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":404},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/not_found'","index":1,"line":7,"time":<<<\d+>>>}],"filename":"tests_failed/assert_status.hurl","success":false,"time":<<<\d+>>>}
|
||||
|
@ -1 +1 @@
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":4,"message":"Undefined variable\n --> tests_failed/assert_template_variable_not_found.hurl:4:29\n |\n | GET http://localhost:8000/error-assert-template-variable-not-found\n | ...\n 4 | header \"content-type\" == \"{{content_type}}\"\n | ^^^^^^^^^^^^ you must set the variable content_type\n |","success":false}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/error-assert-template-variable-not-found"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"0"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_failed/assert_template_variable_not_found.hurl","success":false,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":4,"message":"Undefined variable\n --> tests_failed/assert_template_variable_not_found.hurl:4:29\n |\n | GET http://localhost:8000/error-assert-template-variable-not-found\n | ...\n 4 | header \"content-type\" == \"{{content_type}}\"\n | ^^^^^^^^^^^^ you must set the variable content_type\n |","success":false}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/error-assert-template-variable-not-found"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"0"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/error-assert-template-variable-not-found'","index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_failed/assert_template_variable_not_found.hurl","success":false,"time":<<<\d+>>>}
|
||||
|
@ -1,3 +1,4 @@
|
||||
Set-StrictMode -Version latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
hurl --json tests_failed/assert_template_variable_not_found.hurl
|
||||
|
@ -1,3 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
hurl --json tests_failed/assert_template_variable_not_found.hurl
|
||||
|
@ -84,7 +84,7 @@
|
||||
"headers": [
|
||||
{
|
||||
"name": "Server",
|
||||
"value": "Werkzeug/<<<.*?>>>"
|
||||
"value": "Werkzeug/<<<.*?>>> Python/<<<.*?>>>"
|
||||
},
|
||||
{
|
||||
"name": "Date",
|
||||
@ -123,6 +123,7 @@
|
||||
}
|
||||
],
|
||||
"captures": [],
|
||||
"curl_cmd": "curl 'http://localhost:8000/error-assert-value'",
|
||||
"index": 1,
|
||||
"line": 1,
|
||||
"time": <<<\d+>>>
|
||||
|
@ -1 +1 @@
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"message":"Header not found\n --> tests_failed/query_header_not_found.hurl:3:1\n |\n | GET http://localhost:8000/error-query-header-not-found\n | ...\n 3 | Custom: XXX\n | ^^^^^^ this header has not been found in the response\n |","success":false}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/error-query-header-not-found"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_failed/query_header_not_found.hurl","success":false,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"message":"Header not found\n --> tests_failed/query_header_not_found.hurl:3:1\n |\n | GET http://localhost:8000/error-query-header-not-found\n | ...\n 3 | Custom: XXX\n | ^^^^^^ this header has not been found in the response\n |","success":false}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/error-query-header-not-found"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/error-query-header-not-found'","index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_failed/query_header_not_found.hurl","success":false,"time":<<<\d+>>>}
|
||||
|
@ -1 +1 @@
|
||||
{"cookies":[{"domain":"localhost","expires":"<<<\d+>>>","https":"FALSE","include_subdomain":"FALSE","name":"cookie1","path":"/","value":"value1"},{"domain":"localhost","expires":"<<<\d+>>>","https":"FALSE","include_subdomain":"FALSE","name":"cookie2","path":"/","value":"value2"},{"domain":"localhost","expires":"<<<\d+>>>","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},{"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}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"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":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Header1","value":"value1"},{"name":"ETag","value":"\"33a64df551425fcc55e4d42a148795d9f25f89d4\""},{"name":"Expires","value":"<<<.*?>>>"},{"name":"x-fruit","value":"Banana"},{"name":"x-fruit","value":"Lemon"},{"name":"x-fruit","value":"Grape"},{"name":"x-fruit","value":"Strawberry"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"0"},{"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":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>},{"asserts":[{"line":31,"success":true},{"line":31,"success":true},{"line":35,"success":true},{"line":36,"success":true},{"line":37,"success":true},{"line":38,"success":true},{"line":39,"success":true}],"calls":[{"request":{"cookies":[{"name":"cookie3","value":"value3"},{"name":"cookie2","value":"value2"},{"name":"cookie1","value":"value1"}],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"Cookie","value":"cookie3=value3; cookie2=value2; cookie1=value1"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"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":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Header1","value":"value1"},{"name":"ETag","value":"\"33a64df551425fcc55e4d42a148795d9f25f89d4\""},{"name":"Expires","value":"<<<.*?>>>"},{"name":"x-fruit","value":"Banana"},{"name":"x-fruit","value":"Lemon"},{"name":"x-fruit","value":"Grape"},{"name":"x-fruit","value":"Strawberry"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"0"},{"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":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[{"name":"fruits","value":["Banana","Lemon","Grape","Strawberry"]}],"index":2,"line":30,"time":<<<\d+>>>}],"filename":"tests_ok/assert_header.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[{"domain":"localhost","expires":"<<<\d+>>>","https":"FALSE","include_subdomain":"FALSE","name":"cookie1","path":"/","value":"value1"},{"domain":"localhost","expires":"<<<\d+>>>","https":"FALSE","include_subdomain":"FALSE","name":"cookie2","path":"/","value":"value2"},{"domain":"localhost","expires":"<<<\d+>>>","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},{"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}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"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":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Header1","value":"value1"},{"name":"ETag","value":"\"33a64df551425fcc55e4d42a148795d9f25f89d4\""},{"name":"Expires","value":"<<<.*?>>>"},{"name":"x-fruit","value":"Banana"},{"name":"x-fruit","value":"Lemon"},{"name":"x-fruit","value":"Grape"},{"name":"x-fruit","value":"Strawberry"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"0"},{"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":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/assert-header'","index":1,"line":1,"time":<<<\d+>>>},{"asserts":[{"line":31,"success":true},{"line":31,"success":true},{"line":35,"success":true},{"line":36,"success":true},{"line":37,"success":true},{"line":38,"success":true},{"line":39,"success":true}],"calls":[{"request":{"cookies":[{"name":"cookie3","value":"value3"},{"name":"cookie2","value":"value2"},{"name":"cookie1","value":"value1"}],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"Cookie","value":"cookie3=value3; cookie2=value2; cookie1=value1"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"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":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Header1","value":"value1"},{"name":"ETag","value":"\"33a64df551425fcc55e4d42a148795d9f25f89d4\""},{"name":"Expires","value":"<<<.*?>>>"},{"name":"x-fruit","value":"Banana"},{"name":"x-fruit","value":"Lemon"},{"name":"x-fruit","value":"Grape"},{"name":"x-fruit","value":"Strawberry"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"0"},{"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":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[{"name":"fruits","value":["Banana","Lemon","Grape","Strawberry"]}],"curl_cmd":"curl --cookie 'cookie1=value1; cookie2=value2; cookie3=value3' 'http://localhost:8000/assert-header'","index":2,"line":30,"time":<<<\d+>>>}],"filename":"tests_ok/assert_header.hurl","success":true,"time":<<<\d+>>>}
|
||||
|
@ -1,3 +1,4 @@
|
||||
Set-StrictMode -Version latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
hurl --json --verbose tests_ok/assert_header.hurl
|
||||
|
@ -1,3 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
hurl --json --verbose tests_ok/assert_header.hurl
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,3 +1,4 @@
|
||||
Set-StrictMode -Version latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
hurl --json tests_ok/json_output.hurl
|
||||
|
@ -1,3 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
hurl --json tests_ok/json_output.hurl
|
||||
|
@ -1,7 +1,7 @@
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"<<<.*?>>>"}],"url":"http://localhost:8000/parallel/hello?name=<<<.*?>>>"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_<<<.*?>>>.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"<<<.*?>>>"}],"url":"http://localhost:8000/parallel/hello?name=<<<.*?>>>"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_<<<.*?>>>.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"<<<.*?>>>"}],"url":"http://localhost:8000/parallel/hello?name=<<<.*?>>>"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_<<<.*?>>>.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"<<<.*?>>>"}],"url":"http://localhost:8000/parallel/hello?name=<<<.*?>>>"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_<<<.*?>>>.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"<<<.*?>>>"}],"url":"http://localhost:8000/parallel/hello?name=<<<.*?>>>"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_<<<.*?>>>.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"<<<.*?>>>"}],"url":"http://localhost:8000/parallel/hello?name=<<<.*?>>>"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_<<<.*?>>>.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"<<<.*?>>>"}],"url":"http://localhost:8000/parallel/hello?name=<<<.*?>>>"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_<<<.*?>>>.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"<<<.*?>>>"}],"url":"http://localhost:8000/parallel/hello?name=<<<.*?>>>"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/parallel/hello?name=<<<.*?>>>'","index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_<<<.*?>>>.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"<<<.*?>>>"}],"url":"http://localhost:8000/parallel/hello?name=<<<.*?>>>"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/parallel/hello?name=<<<.*?>>>'","index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_<<<.*?>>>.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"<<<.*?>>>"}],"url":"http://localhost:8000/parallel/hello?name=<<<.*?>>>"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/parallel/hello?name=<<<.*?>>>'","index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_<<<.*?>>>.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"<<<.*?>>>"}],"url":"http://localhost:8000/parallel/hello?name=<<<.*?>>>"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/parallel/hello?name=<<<.*?>>>'","index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_<<<.*?>>>.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"<<<.*?>>>"}],"url":"http://localhost:8000/parallel/hello?name=<<<.*?>>>"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/parallel/hello?name=<<<.*?>>>'","index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_<<<.*?>>>.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"<<<.*?>>>"}],"url":"http://localhost:8000/parallel/hello?name=<<<.*?>>>"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/parallel/hello?name=<<<.*?>>>'","index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_<<<.*?>>>.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"<<<.*?>>>"}],"url":"http://localhost:8000/parallel/hello?name=<<<.*?>>>"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/parallel/hello?name=<<<.*?>>>'","index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_<<<.*?>>>.hurl","success":true,"time":<<<\d+>>>}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"A"}],"url":"http://localhost:8000/parallel/hello?name=A"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_a.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"B"}],"url":"http://localhost:8000/parallel/hello?name=B"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_b.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"C"}],"url":"http://localhost:8000/parallel/hello?name=C"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_c.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"D"}],"url":"http://localhost:8000/parallel/hello?name=D"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_d.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"E"}],"url":"http://localhost:8000/parallel/hello?name=E"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_e.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"F"}],"url":"http://localhost:8000/parallel/hello?name=F"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_f.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"G"}],"url":"http://localhost:8000/parallel/hello?name=G"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_g.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"A"}],"url":"http://localhost:8000/parallel/hello?name=A"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/parallel/hello?name=A'","index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_a.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"B"}],"url":"http://localhost:8000/parallel/hello?name=B"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/parallel/hello?name=B'","index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_b.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"C"}],"url":"http://localhost:8000/parallel/hello?name=C"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/parallel/hello?name=C'","index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_c.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"D"}],"url":"http://localhost:8000/parallel/hello?name=D"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/parallel/hello?name=D'","index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_d.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"E"}],"url":"http://localhost:8000/parallel/hello?name=E"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/parallel/hello?name=E'","index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_e.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"F"}],"url":"http://localhost:8000/parallel/hello?name=F"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/parallel/hello?name=F'","index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_f.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[{"name":"name","value":"G"}],"url":"http://localhost:8000/parallel/hello?name=G"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"31"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/parallel/hello?name=G'","index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/parallel_g.hurl","success":true,"time":<<<\d+>>>}
|
||||
|
@ -1,4 +1,5 @@
|
||||
Set-StrictMode -Version latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
hurl --proxy localhost:3128 --verbose tests_ok/proxy.hurl
|
||||
hurl --proxy 127.0.0.1:3128 --verbose tests_ok/proxy.hurl
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
hurl --proxy localhost:3128 --verbose tests_ok/proxy.hurl
|
||||
hurl --proxy 127.0.0.1:3128 --verbose tests_ok/proxy.hurl
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
Set-StrictMode -Version latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
hurl tests_ok/proxy_option.hurl --verbose
|
||||
|
||||
hurl --verbose tests_ok/proxy_option.hurl
|
||||
|
@ -1,3 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
hurl tests_ok/proxy_option.hurl --verbose
|
||||
|
||||
hurl --verbose tests_ok/proxy_option.hurl
|
||||
|
@ -1 +1 @@
|
||||
[{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<[\w.-]+>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/hello"},"response":{"body":"store<<<[/\\\w-]+>>>_response.html","cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<[\d.]+>>> Python/<<<[\d.]+>>>"},{"name":"Date","value":"<<<[\w, :]+>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<[\dTZ:.-]+>>>","connect":<<<\d+>>>,"end_call":"<<<[\dTZ:.-]+>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/test.1.hurl","success":true,"time":<<<\d+>>>},{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<[\w.-]+>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/hello"},"response":{"body":"store<<<[/\\\w-]+>>>_response.html","cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<[\d.]+>>> Python/<<<[\d.]+>>>"},{"name":"Date","value":"<<<[\w, :]+>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<[\dTZ:.-]+>>>","connect":<<<\d+>>>,"end_call":"<<<[\dTZ:.-]+>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>},{"asserts":[{"line":7,"success":true},{"line":7,"success":true},{"line":8,"message":"Assert body value\n --> tests_ok/test.2.hurl:8:1\n |\n | GET http://localhost:8000/hello\n | ...\n 8 | `Goodbye World!`\n | ^^^^^^^^^^^^^^^^ actual value is <Hello World!>\n |","success":false}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<[\w.-]+>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/hello"},"response":{"body":"store<<<[/\\\w-]+>>>_response.html","cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<[\d.]+>>> Python/<<<[\d.]+>>>"},{"name":"Date","value":"<<<[\w, :]+>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<[\dTZ:.-]+>>>","connect":<<<\d+>>>,"end_call":"<<<[\dTZ:.-]+>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":2,"line":6,"time":<<<\d+>>>}],"filename":"tests_ok/test.2.hurl","success":false,"time":<<<\d+>>>},{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<[\w.-]+>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/hello"},"response":{"body":"store<<<[/\\\w-]+>>>_response.html","cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<[\d.]+>>> Python/<<<[\d.]+>>>"},{"name":"Date","value":"<<<[\w, :]+>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<[\dTZ:.-]+>>>","connect":<<<\d+>>>,"end_call":"<<<[\dTZ:.-]+>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/test.3.hurl","success":true,"time":<<<\d+>>>}]
|
||||
[{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/hello"},"response":{"body":"store<<<[/\\\w-]+>>>_response.html","cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/hello'","index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/test.1.hurl","success":true,"time":<<<\d+>>>},{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/hello"},"response":{"body":"store<<<[/\\\w-]+>>>_response.html","cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/hello'","index":1,"line":1,"time":<<<\d+>>>},{"asserts":[{"line":7,"success":true},{"line":7,"success":true},{"line":8,"message":"Assert body value\n --> tests_ok/test.2.hurl:8:1\n |\n | GET http://localhost:8000/hello\n | ...\n 8 | `Goodbye World!`\n | ^^^^^^^^^^^^^^^^ actual value is <Hello World!>\n |","success":false}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/hello"},"response":{"body":"store<<<[/\\\w-]+>>>_response.html","cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/hello'","index":2,"line":6,"time":<<<\d+>>>}],"filename":"tests_ok/test.2.hurl","success":false,"time":<<<\d+>>>},{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":3,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/hello"},"response":{"body":"store<<<[/\\\w-]+>>>_response.html","cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl 'http://localhost:8000/hello'","index":1,"line":1,"time":<<<\d+>>>}],"filename":"tests_ok/test.3.hurl","success":true,"time":<<<\d+>>>}]
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,3 +1,4 @@
|
||||
Set-StrictMode -Version latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
hurl --retry 10 --retry-interval 100 --verbose --json tests_ok/retry.hurl
|
||||
|
@ -1,3 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
hurl --retry 10 --retry-interval 100 --verbose --json tests_ok/retry.hurl
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,3 +1,4 @@
|
||||
Set-StrictMode -Version latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
hurl --verbose --json tests_ok/retry_option.hurl
|
||||
|
@ -1,3 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
hurl --verbose --json tests_ok/retry_option.hurl
|
||||
|
@ -1 +1 @@
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":4,"success":true},{"line":4,"success":true},{"line":5,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8002"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"https://localhost:8002/hello"},"response":{"certificate":{"expire_date":"2025-03-15 10:48:00 UTC","issuer":"C<<<.*?>>>=<<<.*?>>>US, ST<<<.*?>>>=<<<.*?>>>Denial, L<<<.*?>>>=<<<.*?>>>Springfield, O<<<.*?>>>=<<<.*?>>>Dis, CN<<<.*?>>>=<<<.*?>>>myCA","serial_number":"3e:23:bb:87:21:f8:10:85:36:c2:72:c9:64:34:d6:15:d1:8c:69:15","start_date":"2022-12-11 10:48:00 UTC","subject":"C<<<.*?>>>=<<<.*?>>>US, ST<<<.*?>>>=<<<.*?>>>Denial, L<<<.*?>>>=<<<.*?>>>Springfield, O<<<.*?>>>=<<<.*?>>>Dis, CN<<<.*?>>>=<<<.*?>>>localhost"},"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":3,"time":<<<\d+>>>}],"filename":"tests_ssl/cacert.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":4,"success":true},{"line":4,"success":true},{"line":5,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8002"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"https://localhost:8002/hello"},"response":{"certificate":{"expire_date":"2025-03-15 10:48:00 UTC","issuer":"C<<<.*?>>>=<<<.*?>>>US, ST<<<.*?>>>=<<<.*?>>>Denial, L<<<.*?>>>=<<<.*?>>>Springfield, O<<<.*?>>>=<<<.*?>>>Dis, CN<<<.*?>>>=<<<.*?>>>myCA","serial_number":"3e:23:bb:87:21:f8:10:85:36:c2:72:c9:64:34:d6:15:d1:8c:69:15","start_date":"2022-12-11 10:48:00 UTC","subject":"C<<<.*?>>>=<<<.*?>>>US, ST<<<.*?>>>=<<<.*?>>>Denial, L<<<.*?>>>=<<<.*?>>>Springfield, O<<<.*?>>>=<<<.*?>>>Dis, CN<<<.*?>>>=<<<.*?>>>localhost"},"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl --cacert tests_ssl/certs/ca/cert.pem --ssl-no-revoke 'https://localhost:8002/hello'","index":1,"line":3,"time":<<<\d+>>>}],"filename":"tests_ssl/cacert.hurl","success":true,"time":<<<\d+>>>}
|
||||
|
@ -1 +1 @@
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":4,"success":true},{"line":4,"success":true},{"line":5,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8002"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"https://localhost:8002/hello"},"response":{"certificate":{"expire_date":"2025-03-15 10:48:00 UTC","issuer":"C<<<.*?>>>=<<<.*?>>>US, ST<<<.*?>>>=<<<.*?>>>Denial, L<<<.*?>>>=<<<.*?>>>Springfield, O<<<.*?>>>=<<<.*?>>>Dis, CN<<<.*?>>>=<<<.*?>>>myCA","serial_number":"3e:23:bb:87:21:f8:10:85:36:c2:72:c9:64:34:d6:15:d1:8c:69:15","start_date":"2022-12-11 10:48:00 UTC","subject":"C<<<.*?>>>=<<<.*?>>>US, ST<<<.*?>>>=<<<.*?>>>Denial, L<<<.*?>>>=<<<.*?>>>Springfield, O<<<.*?>>>=<<<.*?>>>Dis, CN<<<.*?>>>=<<<.*?>>>localhost"},"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":3,"time":<<<\d+>>>}],"filename":"tests_ssl/cacert.hurl","success":true,"time":<<<\d+>>>}
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":4,"success":true},{"line":4,"success":true},{"line":5,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8002"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"https://localhost:8002/hello"},"response":{"certificate":{"expire_date":"2025-03-15 10:48:00 UTC","issuer":"C<<<.*?>>>=<<<.*?>>>US, ST<<<.*?>>>=<<<.*?>>>Denial, L<<<.*?>>>=<<<.*?>>>Springfield, O<<<.*?>>>=<<<.*?>>>Dis, CN<<<.*?>>>=<<<.*?>>>myCA","serial_number":"3e:23:bb:87:21:f8:10:85:36:c2:72:c9:64:34:d6:15:d1:8c:69:15","start_date":"2022-12-11 10:48:00 UTC","subject":"C<<<.*?>>>=<<<.*?>>>US, ST<<<.*?>>>=<<<.*?>>>Denial, L<<<.*?>>>=<<<.*?>>>Springfield, O<<<.*?>>>=<<<.*?>>>Dis, CN<<<.*?>>>=<<<.*?>>>localhost"},"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"curl_cmd":"curl --cacert tests_ssl/certs/ca/cert.pem 'https://localhost:8002/hello'","index":1,"line":3,"time":<<<\d+>>>}],"filename":"tests_ssl/cacert.hurl","success":true,"time":<<<\d+>>>}
|
||||
|
@ -60,6 +60,7 @@ fn requests_count(runs: &[HurlRun]) -> usize {
|
||||
|
||||
#[cfg(test)]
|
||||
pub mod tests {
|
||||
use hurl::http::CurlCmd;
|
||||
use hurl::runner::{EntryResult, HurlResult};
|
||||
use hurl_core::ast::SourceInfo;
|
||||
use hurl_core::input::Input;
|
||||
@ -79,6 +80,7 @@ pub mod tests {
|
||||
errors: vec![],
|
||||
transfer_duration: Duration::from_millis(0),
|
||||
compressed: false,
|
||||
curl_cmd: CurlCmd::default(),
|
||||
};
|
||||
HurlRun {
|
||||
content: String::new(),
|
||||
|
@ -762,10 +762,9 @@ impl Client {
|
||||
context_dir: &ContextDir,
|
||||
output: Option<&Output>,
|
||||
options: &ClientOptions,
|
||||
) -> String {
|
||||
) -> CurlCmd {
|
||||
let cookies = self.cookie_storage();
|
||||
let cmd = CurlCmd::new(request_spec, &cookies, context_dir, output, options);
|
||||
cmd.to_string()
|
||||
CurlCmd::new(request_spec, &cookies, context_dir, output, options)
|
||||
}
|
||||
|
||||
/// Returns the SSL certificates information associated to this call.
|
||||
@ -1163,7 +1162,7 @@ mod tests {
|
||||
|
||||
let cmd = client.curl_command_line(&request, &context_dir, output, &options);
|
||||
assert_eq!(
|
||||
cmd,
|
||||
cmd.to_string(),
|
||||
"curl \
|
||||
--aws-sigv4 aws:amz:sts \
|
||||
--cacert /etc/cert.pem \
|
||||
|
@ -28,6 +28,7 @@ use std::collections::HashMap;
|
||||
use std::path::Path;
|
||||
|
||||
/// Represents a curl command, with arguments.
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct CurlCmd {
|
||||
/// The args of this command.
|
||||
args: Vec<String>,
|
||||
@ -39,6 +40,14 @@ impl fmt::Display for CurlCmd {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for CurlCmd {
|
||||
fn default() -> Self {
|
||||
CurlCmd {
|
||||
args: vec!["curl".to_string()],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl CurlCmd {
|
||||
/// Creates a new curl command, based on an HTTP request, cookies, a context directory, output
|
||||
/// and runner options.
|
||||
@ -427,6 +436,9 @@ impl ClientOptions {
|
||||
arguments.push("--resolve".to_string());
|
||||
arguments.push(resolve.clone());
|
||||
}
|
||||
if self.ssl_no_revoke {
|
||||
arguments.push("--ssl-no-revoke".to_string());
|
||||
}
|
||||
if self.timeout != ClientOptions::default().timeout {
|
||||
arguments.push("--timeout".to_string());
|
||||
arguments.push(self.timeout.as_secs().to_string());
|
||||
|
@ -25,6 +25,7 @@ pub(crate) use self::client::Client;
|
||||
pub use self::cookie::{CookieAttribute, ResponseCookie};
|
||||
pub use self::core::Cookie;
|
||||
pub(crate) use self::core::{Param, RequestCookie};
|
||||
pub use self::curl_cmd::CurlCmd;
|
||||
pub(crate) use self::error::HttpError;
|
||||
pub use self::header::{
|
||||
Header, HeaderVec, ACCEPT_ENCODING, AUTHORIZATION, CONTENT_TYPE, COOKIE, EXPECT, USER_AGENT,
|
||||
|
@ -77,6 +77,7 @@ struct EntryResultJson {
|
||||
captures: Vec<CaptureJson>,
|
||||
asserts: Vec<AssertJson>,
|
||||
time: u64,
|
||||
curl_cmd: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
@ -248,6 +249,7 @@ impl EntryResultJson {
|
||||
captures,
|
||||
asserts,
|
||||
time: entry.transfer_duration.as_millis() as u64,
|
||||
curl_cmd: entry.curl_cmd.to_string(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ mod tests {
|
||||
use hurl_core::ast::SourceInfo;
|
||||
use hurl_core::reader::Pos;
|
||||
|
||||
use crate::http::{Call, Header, HeaderVec, HttpVersion, Request, Response, Url};
|
||||
use crate::http::{Call, CurlCmd, Header, HeaderVec, HttpVersion, Request, Response, Url};
|
||||
use crate::output::write_last_body;
|
||||
use crate::runner::{EntryResult, HurlResult, Output};
|
||||
use crate::util::term::{Stdout, WriteMode};
|
||||
@ -168,6 +168,7 @@ mod tests {
|
||||
errors: vec![],
|
||||
transfer_duration: Duration::from_millis(0),
|
||||
compressed: false,
|
||||
curl_cmd: CurlCmd::default(),
|
||||
},
|
||||
EntryResult {
|
||||
entry_index: 2,
|
||||
@ -187,6 +188,7 @@ mod tests {
|
||||
errors: vec![],
|
||||
transfer_duration: Duration::from_millis(0),
|
||||
compressed: false,
|
||||
curl_cmd: CurlCmd::default(),
|
||||
},
|
||||
EntryResult {
|
||||
entry_index: 3,
|
||||
@ -214,6 +216,7 @@ mod tests {
|
||||
errors: vec![],
|
||||
transfer_duration: Duration::from_millis(0),
|
||||
compressed: false,
|
||||
curl_cmd: CurlCmd::default(),
|
||||
},
|
||||
],
|
||||
duration: Duration::from_millis(100),
|
||||
|
@ -152,7 +152,7 @@ mod tests {
|
||||
use hurl_core::input::Input;
|
||||
use hurl_core::reader::Pos;
|
||||
|
||||
use crate::http::HttpError;
|
||||
use crate::http::{CurlCmd, HttpError};
|
||||
use crate::report::junit::xml::XmlDocument;
|
||||
use crate::report::junit::{create_testsuite, Testcase};
|
||||
use crate::runner::{EntryResult, HurlResult, RunnerError, RunnerErrorKind};
|
||||
@ -189,6 +189,7 @@ mod tests {
|
||||
)],
|
||||
transfer_duration: Duration::from_millis(0),
|
||||
compressed: false,
|
||||
curl_cmd: CurlCmd::default(),
|
||||
}],
|
||||
duration: Duration::from_millis(230),
|
||||
success: true,
|
||||
@ -215,6 +216,7 @@ mod tests {
|
||||
)],
|
||||
transfer_duration: Duration::from_millis(0),
|
||||
compressed: false,
|
||||
curl_cmd: CurlCmd::default(),
|
||||
}],
|
||||
duration: Duration::from_millis(230),
|
||||
success: true,
|
||||
|
@ -97,7 +97,7 @@ mod test {
|
||||
use hurl_core::input::Input;
|
||||
use hurl_core::reader::Pos;
|
||||
|
||||
use crate::http::HttpError;
|
||||
use crate::http::{CurlCmd, HttpError};
|
||||
use crate::report::junit::testcase::Testcase;
|
||||
use crate::report::junit::xml::XmlDocument;
|
||||
use crate::runner::{EntryResult, HurlResult, RunnerError, RunnerErrorKind};
|
||||
@ -144,6 +144,7 @@ HTTP/1.0 200
|
||||
)],
|
||||
transfer_duration: Duration::from_millis(0),
|
||||
compressed: false,
|
||||
curl_cmd: CurlCmd::default(),
|
||||
}],
|
||||
duration: Duration::from_millis(230),
|
||||
success: true,
|
||||
@ -186,6 +187,7 @@ HTTP/1.0 200
|
||||
)],
|
||||
transfer_duration: Duration::from_millis(0),
|
||||
compressed: false,
|
||||
curl_cmd: CurlCmd::default(),
|
||||
}],
|
||||
duration: Duration::from_millis(230),
|
||||
success: true,
|
||||
|
@ -20,7 +20,7 @@ use std::collections::HashMap;
|
||||
use hurl_core::ast::*;
|
||||
|
||||
use crate::http;
|
||||
use crate::http::ClientOptions;
|
||||
use crate::http::{ClientOptions, CurlCmd};
|
||||
use crate::runner::cache::BodyCache;
|
||||
use crate::runner::error::RunnerError;
|
||||
use crate::runner::result::{AssertResult, EntryResult};
|
||||
@ -75,14 +75,15 @@ pub fn run(
|
||||
http_client.clear_cookie_storage(&client_options);
|
||||
}
|
||||
|
||||
log_request(
|
||||
http_client,
|
||||
let curl_cmd = http_client.curl_command_line(
|
||||
&http_request,
|
||||
runner_options,
|
||||
context_dir,
|
||||
runner_options.output.as_ref(),
|
||||
&client_options,
|
||||
logger,
|
||||
);
|
||||
|
||||
log_request(http_client, &curl_cmd, &http_request, logger);
|
||||
|
||||
// Run the HTTP requests (optionally follow redirection)
|
||||
let calls = match http_client.execute_with_redirect(&http_request, &client_options, logger) {
|
||||
Ok(calls) => calls,
|
||||
@ -97,6 +98,7 @@ pub fn run(
|
||||
source_info,
|
||||
errors: vec![error],
|
||||
compressed,
|
||||
curl_cmd,
|
||||
..Default::default()
|
||||
};
|
||||
}
|
||||
@ -133,6 +135,7 @@ pub fn run(
|
||||
errors,
|
||||
transfer_duration,
|
||||
compressed,
|
||||
curl_cmd,
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -153,6 +156,7 @@ pub fn run(
|
||||
errors: vec![e],
|
||||
transfer_duration,
|
||||
compressed,
|
||||
curl_cmd,
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -186,6 +190,7 @@ pub fn run(
|
||||
errors,
|
||||
transfer_duration,
|
||||
compressed,
|
||||
curl_cmd,
|
||||
}
|
||||
}
|
||||
|
||||
@ -248,9 +253,8 @@ impl ClientOptions {
|
||||
/// Logs this HTTP `request`.
|
||||
fn log_request(
|
||||
http_client: &mut http::Client,
|
||||
curl_cmd: &CurlCmd,
|
||||
request: &http::RequestSpec,
|
||||
runner_options: &RunnerOptions,
|
||||
client_options: &ClientOptions,
|
||||
logger: &mut Logger,
|
||||
) {
|
||||
logger.debug("");
|
||||
@ -291,11 +295,7 @@ fn log_request(
|
||||
}
|
||||
logger.debug("");
|
||||
logger.debug("Request can be run with the following curl command:");
|
||||
let context_dir = &runner_options.context_dir;
|
||||
let output = &runner_options.output;
|
||||
let curl_command =
|
||||
http_client.curl_command_line(request, context_dir, output.as_ref(), client_options);
|
||||
logger.debug(&curl_command);
|
||||
logger.debug(&curl_cmd.to_string());
|
||||
logger.debug("");
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ use std::time::Duration;
|
||||
use hurl_core::ast::SourceInfo;
|
||||
use hurl_core::reader::Pos;
|
||||
|
||||
use crate::http::{Call, Cookie};
|
||||
use crate::http::{Call, Cookie, CurlCmd};
|
||||
use crate::runner::error::RunnerError;
|
||||
use crate::runner::output::Output;
|
||||
use crate::runner::value::Value;
|
||||
@ -93,6 +93,8 @@ pub struct EntryResult {
|
||||
/// server is requested to send compressed response, and the response should be uncompressed
|
||||
/// when outputted on stdout.
|
||||
pub compressed: bool,
|
||||
/// The debug curl command line from this entry result.
|
||||
pub curl_cmd: CurlCmd,
|
||||
}
|
||||
|
||||
impl Default for EntryResult {
|
||||
@ -106,6 +108,7 @@ impl Default for EntryResult {
|
||||
errors: vec![],
|
||||
transfer_duration: Duration::from_millis(0),
|
||||
compressed: false,
|
||||
curl_cmd: CurlCmd::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user