Add integration test.

This commit is contained in:
jcamiel 2022-10-07 21:31:00 +02:00
parent f7990069d7
commit d621fdab6b
No known key found for this signature in database
GPG Key ID: 07FF11CFD55356CC
12 changed files with 132 additions and 6 deletions

View File

@ -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 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/~~~"}],"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":"~~"}],"httpVersion":"HTTP/1.0","status":200},"time":~~~}],"filename":"tests_failed/assert_match_utf8.hurl","success":false,"time":~~~}
{"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 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","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":"~~~"}],"httpVersion":"HTTP/1.0","status":200}}],"captures":[],"time":~~~}],"filename":"tests~_failed/assert_match_utf8.hurl","success":false,"time":~~~}

View File

@ -1 +1 @@
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"message":"Assert status code\n --> tests_failed/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/~~~"}],"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":"~~~"}],"httpVersion":"HTTP/1.0","status":404},"time":~~~}],"filename":"tests_failed/assert_status.hurl","success":false,"time":~~~}
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"message":"Assert status code\n --> tests_failed/assert_status.hurl:2:10\n |\n 2 | HTTP/1.0 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","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":"~~~"}],"httpVersion":"HTTP/1.0","status":404}}],"captures":[],"time":~~~}],"filename":"tests_failed/assert_status.hurl","success":false,"time":~~~}

View File

@ -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: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/~~~"}],"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":"~~~"}],"httpVersion":"HTTP/1.0","status":200},"time":~~~}],"filename":"tests_failed/assert_template_variable_not_found.hurl","success":false,"time":~~~}
{"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:33\n |\n 4 | header \"content-type\" equals \"{{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","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":"~~~"}],"httpVersion":"HTTP/1.0","status":200}}],"captures":[],"time":~~~}],"filename":"tests_failed/assert_template_variable_not_found.hurl","success":false,"time":~~~}

View File

@ -1 +1 @@
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":4,"message":"Assert failure\n --> tests_failed/assert_value_error.hurl:4:0\n |\n 4 | header \"content-type\" equals \"XXX\"\n | actual: string <text/html; charset=utf-8>\n | expected: string <XXX>\n |","success":false},{"line":5,"message":"Assert failure\n --> tests_failed/assert_value_error.hurl:5:0\n |\n 5 | header \"content-type\" notEquals \"text/html; charset=utf-8\"\n | actual: string <text/html; charset=utf-8>\n | expected: string <text/html; charset=utf-8>\n |","success":false},{"line":6,"message":"Assert failure\n --> tests_failed/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_failed/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_failed/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 <Hello>\n | >>> types between actual and expected are not consistent\n |","success":false},{"line":9,"message":"Assert failure\n --> tests_failed/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_failed/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_failed/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/~~~"}],"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":"~~~"}],"httpVersion":"HTTP/1.0","status":200},"time":~~~}],"filename":"tests_failed/assert_value_error.hurl","success":false,"time":~~~}
{"cookies":[],"entries":[{"asserts":[{"line":2,"success":true},{"line":2,"success":true},{"line":4,"message":"Assert failure\n --> tests_failed/assert_value_error.hurl:4:0\n |\n 4 | header \"content-type\" equals \"XXX\"\n | actual: string <text/html; charset=utf-8>\n | expected: string <XXX>\n |","success":false},{"line":5,"message":"Assert failure\n --> tests_failed/assert_value_error.hurl:5:0\n |\n 5 | header \"content-type\" notEquals \"text/html; charset=utf-8\"\n | actual: string <text/html; charset=utf-8>\n | expected: string <text/html; charset=utf-8>\n |","success":false},{"line":6,"message":"Assert failure\n --> tests_failed/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_failed/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":fals~e},{"line":8,"message":"Assert failure\n --> tests_failed/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 <Hello>\n | >>> types between actual and expected are not consistent\n |","success":false},{"line":9,"message":"Assert failure\n --> tests_failed/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_failed/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_failed/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}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/~~~"}],"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":"~~~"}],"httpVersion":"HTTP/1.0","status":200}}],"captures":[],"time":~~~}],"filename":"tests_failed/assert_value_error.hurl","success":false,"time":~~~}

View File

@ -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 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/~~~"}],"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":"~~~"}],"httpVersion":"HTTP/1.0","status":200},"time":~~~}],"filename":"tests_failed/query_header_not_found.hurl","success":false,"time":~~~}
{"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 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","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":"~~~"}],"httpVersion":"HTTP/1.0","status":200}}],"captures":[],"time":~~~}],"filename":"tests_failed/query_header_not_found.hurl","success":false,"time":~~~}

View File

@ -1 +1 @@
{"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/~~~"}],"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":"~~~"}],"httpVersion":"HTTP/1.0","status":200},"time":~~~}],"filename":"tests_ok/assert_header.hurl","success":true,"time":~~~}
{"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}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/~~~"}],"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":"~~~"}],"httpVersion":"HTTP/1.0","status":200}}],"captures":[],"time":~~~}],"filename":"tests_ok/assert_header.hurl","success":true,"time":~~~}

View File

@ -0,0 +1,6 @@
curl 'http://localhost:8000/hello'
curl 'http://localhost:8000/cookies/set-session-cookie2-valueA'
curl 'http://localhost:8000/follow-redirect' --cookie 'cookie2=valueA'
curl 'http://localhost:8000/follow-redirect' --cookie 'cookie2=valueA' -L
curl 'http://localhost:8000/captures' --cookie 'cookie2=valueA'
curl 'http://localhost:8000/assert-json' --cookie 'cookie2=valueA'

View File

@ -0,0 +1,59 @@
<pre><code class="language-hurl"><span class="hurl-entry"><span class="request"><span class="line"></span><span class="comment"># A test file with asserts, captures, redirection</span>
<span class="line"></span><span class="comment"># to test structured JSON output (with --json).</span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span><span class="comment"># Simple GET</span>
<span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/hello</span></span>
</span><span class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="number">200</span></span>
<span class="raw"><span class="line">```Hello World!```</span></span>
</span></span><span class="hurl-entry"><span class="request"><span class="line"></span>
<span class="line"></span>
<span class="line"></span><span class="comment"># Cookies!</span>
<span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/cookies/set-session-cookie2-valueA</span></span>
</span><span class="response"><span class="line"></span>
<span class="line"><span class="version">HTTP/1.0</span> <span class="number">200</span></span>
<span class="line section-header">[Asserts]</span>
<span class="line"><span class="query-type">cookie</span> <span class="string">"cookie2"</span> <span class="predicate-type">==</span> <span class="string">"valueA"</span></span>
</span></span><span class="hurl-entry"><span class="request"><span class="line"></span>
<span class="line"></span>
<span class="line"></span><span class="comment"># No redirect</span>
<span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/follow-redirect</span></span>
</span><span class="response"><span class="line"></span>
<span class="line"><span class="version">HTTP/1.0</span> <span class="number">302</span></span>
<span class="line section-header">[Asserts]</span>
<span class="line"><span class="query-type">header</span> <span class="string">"Location"</span> <span class="predicate-type">==</span> <span class="string">"http://localhost:8000/following-redirect"</span></span>
</span></span><span class="hurl-entry"><span class="request"><span class="line"></span>
<span class="line"></span>
<span class="line"></span><span class="comment"># With redirect</span>
<span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/follow-redirect</span></span>
<span class="line section-header">[Options]</span>
<span class="line"><span class="string">location</span><span>:</span> <span class="boolean">true</span></span>
</span><span class="response"><span class="line"></span>
<span class="line"><span class="version">HTTP/1.0</span> <span class="number">200</span></span>
<span class="line section-header">[Asserts]</span>
<span class="line"><span class="query-type">header</span> <span class="string">"Location"</span> <span class="not">not</span> <span class="predicate-type">exists</span></span>
<span class="raw"><span class="line">```Followed redirect!```</span></span>
</span></span><span class="hurl-entry"><span class="request"><span class="line"></span>
<span class="line"></span>
<span class="line"></span><span class="comment"># Some Captures</span>
<span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/captures</span></span>
</span><span class="response"><span class="line"></span>
<span class="line"><span class="version">HTTP/1.0</span> <span class="number">200</span></span>
<span class="line section-header">[Captures]</span>
<span class="line"><span class="name">param1</span><span>:</span> <span class="query-type">header</span> <span class="string">"header1"</span></span>
<span class="line"><span class="name">param2</span><span>:</span> <span class="query-type">header</span> <span class="string">"header2"</span> <span class="subquery-type">regex</span> <span class="string">"Hello (.*)!"</span></span>
<span class="line"><span class="name">param3</span><span>:</span> <span class="query-type">header</span> <span class="string">"header2"</span> <span class="subquery-type">regex</span> <span class="regex">/Hello (.*)!/</span></span>
</span></span><span class="hurl-entry"><span class="request"><span class="line"></span>
<span class="line"></span>
<span class="line"></span><span class="comment"># Some JSON asserts</span>
<span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/assert-json</span></span>
</span><span class="response"><span class="line"></span>
<span class="line"><span class="version">HTTP/1.0</span> <span class="number">200</span></span>
<span class="line section-header">[Asserts]</span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.errors[1].id"</span> <span class="predicate-type">==</span> <span class="string">"error2"</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.tags"</span> <span class="predicate-type">includes</span> <span class="string">"test"</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.tags"</span> <span class="not">not</span> <span class="predicate-type">includes</span> <span class="string">"prod"</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.tags"</span> <span class="not">not</span> <span class="predicate-type">includes</span> <span class="null">null</span></span>
</span></span><span class="line"></span>
<span class="line"></span>
</code></pre>

View File

@ -0,0 +1,58 @@
# A test file with asserts, captures, redirection
# to test structured JSON output (with --json).
# Simple GET
GET http://localhost:8000/hello
HTTP/1.0 200
```Hello World!```
# Cookies!
GET http://localhost:8000/cookies/set-session-cookie2-valueA
HTTP/1.0 200
[Asserts]
cookie "cookie2" == "valueA"
# No redirect
GET http://localhost:8000/follow-redirect
HTTP/1.0 302
[Asserts]
header "Location" == "http://localhost:8000/following-redirect"
# With redirect
GET http://localhost:8000/follow-redirect
[Options]
location: true
HTTP/1.0 200
[Asserts]
header "Location" not exists
```Followed redirect!```
# Some Captures
GET http://localhost:8000/captures
HTTP/1.0 200
[Captures]
param1: header "header1"
param2: header "header2" regex "Hello (.*)!"
param3: header "header2" regex /Hello (.*)!/
# Some JSON asserts
GET http://localhost:8000/assert-json
HTTP/1.0 200
[Asserts]
jsonpath "$.errors[1].id" == "error2"
jsonpath "$.tags" includes "test"
jsonpath "$.tags" not includes "prod"
jsonpath "$.tags" not includes null

View File

@ -0,0 +1 @@
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/hello"},"response":{"version":"HTTP/1.0","status":200,"body":{"type":"raw-string","value":"Hello World!"}}},{"request":{"method":"GET","url":"http://localhost:8000/cookies/set-session-cookie2-valueA"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"cookie","expr":"cookie2"},"predicate":{"type":"equal","value":"valueA"}}]}},{"request":{"method":"GET","url":"http://localhost:8000/follow-redirect"},"response":{"version":"HTTP/1.0","status":302,"asserts":[{"query":{"type":"header","name":"Location"},"predicate":{"type":"equal","value":"http://localhost:8000/following-redirect"}}]}},{"request":{"method":"GET","url":"http://localhost:8000/follow-redirect"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"header","name":"Location"},"predicate":{"not":true,"type":"exist"}}],"body":{"type":"raw-string","value":"Followed redirect!"}}},{"request":{"method":"GET","url":"http://localhost:8000/captures"},"response":{"version":"HTTP/1.0","status":200,"captures":[{"name":"param1","query":{"type":"header","name":"header1"}},{"name":"param2","query":{"type":"header","name":"header2","subquery":{"type":"regex","expr":"Hello (.*)!"}}},{"name":"param3","query":{"type":"header","name":"header2","subquery":{"type":"regex","expr":{"type":"regex","value":"Hello (.*)!"}}}}]}},{"request":{"method":"GET","url":"http://localhost:8000/assert-json"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"jsonpath","expr":"$.errors[1].id"},"predicate":{"type":"equal","value":"error2"}},{"query":{"type":"jsonpath","expr":"$.tags"},"predicate":{"type":"include","value":"test"}},{"query":{"type":"jsonpath","expr":"$.tags"},"predicate":{"not":true,"type":"include","value":"prod"}},{"query":{"type":"jsonpath","expr":"$.tags"},"predicate":{"not":true,"type":"include","value":null}}]}}]}

View File

@ -0,0 +1 @@
--json

File diff suppressed because one or more lines are too long