Update JSON/HTML export

This commit is contained in:
Fabrice Reix 2022-10-25 08:59:18 +02:00
parent 89f4c123cd
commit 83beadff47
No known key found for this signature in database
GPG Key ID: BF5213154B2E7155
26 changed files with 38 additions and 38 deletions

View File

@ -11,8 +11,8 @@
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.message"</span> <span class="predicate-type">endsWith</span> <span class="string">"hi"</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.message"</span> <span class="predicate-type">contains</span> <span class="string">"hi"</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.message"</span> <span class="predicate-type">matches</span> <span class="string">"hi"</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.message"</span> <span class="subquery-type">count</span> <span class="predicate-type">==</span> <span class="number">1</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.message"</span> <span class="filter-type">count</span> <span class="predicate-type">==</span> <span class="number">1</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.toto"</span> <span class="predicate-type">exists</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.message"</span> <span class="not">not</span> <span class="predicate-type">exists</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.list"</span> <span class="subquery-type">count</span> <span class="predicate-type">==</span> <span class="number">2</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.list"</span> <span class="filter-type">count</span> <span class="predicate-type">==</span> <span class="number">2</span></span>
</span></span></code></pre>

View File

@ -1 +1 @@
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/predicate/error/type"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"jsonpath","expr":"$.status"},"predicate":{"type":"equal","value":"true"}},{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"type":"equal","value":0}},{"query":{"type":"jsonpath","expr":"$.message"},"predicate":{"type":"equal","value":0}},{"query":{"type":"jsonpath","expr":"$.empty"},"predicate":{"type":"equal","value":0}},{"query":{"type":"jsonpath","expr":"$.number"},"predicate":{"type":"equal","value":1.1}},{"query":{"type":"jsonpath","expr":"$.message"},"predicate":{"type":"start-with","value":"hi"}},{"query":{"type":"jsonpath","expr":"$.message"},"predicate":{"type":"end-with","value":"hi"}},{"query":{"type":"jsonpath","expr":"$.message"},"predicate":{"type":"contain","value":"hi"}},{"query":{"type":"jsonpath","expr":"$.message"},"predicate":{"type":"match","value":"hi"}},{"query":{"type":"jsonpath","expr":"$.message","subquery":{"type":"count"}},"predicate":{"type":"equal","value":1}},{"query":{"type":"jsonpath","expr":"$.toto"},"predicate":{"type":"exist"}},{"query":{"type":"jsonpath","expr":"$.message"},"predicate":{"not":true,"type":"exist"}},{"query":{"type":"jsonpath","expr":"$.list","subquery":{"type":"count"}},"predicate":{"type":"equal","value":2}}]}}]}
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/predicate/error/type"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"jsonpath","expr":"$.status"},"predicate":{"type":"equal","value":"true"}},{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"type":"equal","value":0}},{"query":{"type":"jsonpath","expr":"$.message"},"predicate":{"type":"equal","value":0}},{"query":{"type":"jsonpath","expr":"$.empty"},"predicate":{"type":"equal","value":0}},{"query":{"type":"jsonpath","expr":"$.number"},"predicate":{"type":"equal","value":1.1}},{"query":{"type":"jsonpath","expr":"$.message"},"predicate":{"type":"start-with","value":"hi"}},{"query":{"type":"jsonpath","expr":"$.message"},"predicate":{"type":"end-with","value":"hi"}},{"query":{"type":"jsonpath","expr":"$.message"},"predicate":{"type":"contain","value":"hi"}},{"query":{"type":"jsonpath","expr":"$.message"},"predicate":{"type":"match","value":"hi"}},{"query":{"type":"jsonpath","expr":"$.message","filters":[{"type":"count"}]},"predicate":{"type":"equal","value":1}},{"query":{"type":"jsonpath","expr":"$.toto"},"predicate":{"type":"exist"}},{"query":{"type":"jsonpath","expr":"$.message"},"predicate":{"not":true,"type":"exist"}},{"query":{"type":"jsonpath","expr":"$.list","filters":[{"type":"count"}]},"predicate":{"type":"equal","value":2}}]}}]}

View File

@ -1,6 +1,6 @@
<pre><code class="language-hurl"><span class="hurl-entry"><span class="request"><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/error-query-invalid-json</span></span>
</span><span class="response"><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"</span> <span class="subquery-type">count</span> <span class="predicate-type">==</span> <span class="number">2</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.errors"</span> <span class="filter-type">count</span> <span class="predicate-type">==</span> <span class="number">2</span></span>
</span></span><span class="line"></span>
</code></pre>

View File

@ -1 +1 @@
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/error-query-invalid-json"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"jsonpath","expr":"$.errors","subquery":{"type":"count"}},"predicate":{"type":"equal","value":2}}]}}]}
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/error-query-invalid-json"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"jsonpath","expr":"$.errors","filters":[{"type":"count"}]},"predicate":{"type":"equal","value":2}}]}}]}

View File

@ -1,6 +1,6 @@
<pre><code class="language-hurl"><span class="hurl-entry"><span class="request"><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/error-query-invalid-utf8</span></span>
</span><span class="response"><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"</span> <span class="subquery-type">count</span> <span class="predicate-type">==</span> <span class="number">2</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.errors"</span> <span class="filter-type">count</span> <span class="predicate-type">==</span> <span class="number">2</span></span>
</span></span><span class="line"></span>
</code></pre>

View File

@ -1 +1 @@
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/error-query-invalid-utf8"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"jsonpath","expr":"$.errors","subquery":{"type":"count"}},"predicate":{"type":"equal","value":2}}]}}]}
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/error-query-invalid-utf8"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"jsonpath","expr":"$.errors","filters":[{"type":"count"}]},"predicate":{"type":"equal","value":2}}]}}]}

View File

@ -9,7 +9,7 @@
<span class="line"><span class="query-type">header</span> <span class="string">"Header1"</span> <span class="predicate-type">==</span> <span class="string">"value1"</span></span>
<span class="line"><span class="query-type">header</span> <span class="string">"ETag"</span> <span class="predicate-type">==</span> <span class="string">"\"33a64df551425fcc55e4d42a148795d9f25f89d4\""</span></span>
<span class="line"><span class="query-type">header</span> <span class="string">"Set-Cookie"</span> <span class="predicate-type">exists</span></span>
<span class="line"><span class="query-type">header</span> <span class="string">"Set-Cookie"</span> <span class="subquery-type">count</span> <span class="predicate-type">==</span> <span class="number">3</span></span>
<span class="line"><span class="query-type">header</span> <span class="string">"Set-Cookie"</span> <span class="filter-type">count</span> <span class="predicate-type">==</span> <span class="number">3</span></span>
<span class="line"><span class="query-type">header</span> <span class="string">"Set-Cookie"</span> <span class="predicate-type">includes</span> <span class="string">"cookie1=value1; Path=/"</span></span>
<span class="line"><span class="query-type">header</span> <span class="string">"Set-Cookie"</span> <span class="not">not</span> <span class="predicate-type">includes</span> <span class="string">"cookie4=value4; Path=/"</span></span>
</span></span></code></pre>

View File

@ -1 +1 @@
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/assert-header"},"response":{"version":"HTTP/1.0","status":200,"headers":[{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Set-Cookie","value":"cookie1=value1; Path=/"},{"name":"Set-Cookie","value":"cookie2=value2; Path=/"}],"asserts":[{"query":{"type":"header","name":"Custom"},"predicate":{"not":true,"type":"exist"}},{"query":{"type":"header","name":"Content-Type"},"predicate":{"type":"exist"}},{"query":{"type":"header","name":"Header1"},"predicate":{"type":"equal","value":"value1"}},{"query":{"type":"header","name":"ETag"},"predicate":{"type":"equal","value":"\"33a64df551425fcc55e4d42a148795d9f25f89d4\""}},{"query":{"type":"header","name":"Set-Cookie"},"predicate":{"type":"exist"}},{"query":{"type":"header","name":"Set-Cookie","subquery":{"type":"count"}},"predicate":{"type":"equal","value":3}},{"query":{"type":"header","name":"Set-Cookie"},"predicate":{"type":"include","value":"cookie1=value1; Path=/"}},{"query":{"type":"header","name":"Set-Cookie"},"predicate":{"not":true,"type":"include","value":"cookie4=value4; Path=/"}}]}}]}
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/assert-header"},"response":{"version":"HTTP/1.0","status":200,"headers":[{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Set-Cookie","value":"cookie1=value1; Path=/"},{"name":"Set-Cookie","value":"cookie2=value2; Path=/"}],"asserts":[{"query":{"type":"header","name":"Custom"},"predicate":{"not":true,"type":"exist"}},{"query":{"type":"header","name":"Content-Type"},"predicate":{"type":"exist"}},{"query":{"type":"header","name":"Header1"},"predicate":{"type":"equal","value":"value1"}},{"query":{"type":"header","name":"ETag"},"predicate":{"type":"equal","value":"\"33a64df551425fcc55e4d42a148795d9f25f89d4\""}},{"query":{"type":"header","name":"Set-Cookie"},"predicate":{"type":"exist"}},{"query":{"type":"header","name":"Set-Cookie","filters":[{"type":"count"}]},"predicate":{"type":"equal","value":3}},{"query":{"type":"header","name":"Set-Cookie"},"predicate":{"type":"include","value":"cookie1=value1; Path=/"}},{"query":{"type":"header","name":"Set-Cookie"},"predicate":{"not":true,"type":"include","value":"cookie4=value4; Path=/"}}]}}]}

View File

@ -27,9 +27,9 @@
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.success"</span> <span class="predicate-type">!=</span> <span class="null">null</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.success"</span> <span class="predicate-type">exists</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.success"</span> <span class="predicate-type">isBoolean</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.errors"</span> <span class="subquery-type">count</span> <span class="predicate-type">==</span> <span class="number">2</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.errors"</span> <span class="filter-type">count</span> <span class="predicate-type">==</span> <span class="number">2</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.errors"</span> <span class="predicate-type">isCollection</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.warnings"</span> <span class="subquery-type">count</span> <span class="predicate-type">==</span> <span class="number">0</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.warnings"</span> <span class="filter-type">count</span> <span class="predicate-type">==</span> <span class="number">0</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.toto"</span> <span class="not">not</span> <span class="predicate-type">exists</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.warnings"</span> <span class="predicate-type">exists</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.warnings"</span> <span class="predicate-type">exists</span></span>
@ -82,7 +82,7 @@
<span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/assert-json/list</span></span>
</span><span class="response"><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">"$"</span> <span class="subquery-type">count</span> <span class="predicate-type">==</span> <span class="number">2</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$"</span> <span class="filter-type">count</span> <span class="predicate-type">==</span> <span class="number">2</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.[0].name"</span> <span class="predicate-type">==</span> <span class="string">"Bob"</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$[0].name"</span> <span class="predicate-type">==</span> <span class="string">"Bob"</span></span>
</span></span><span class="hurl-entry"><span class="request"><span class="line"></span>

File diff suppressed because one or more lines are too long

View File

@ -31,9 +31,9 @@
</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">xpath</span> <span class="string">"//_:svg/_:g/_:circle"</span> <span class="subquery-type">count</span> <span class="predicate-type">==</span> <span class="number">3</span></span>
<span class="line"><span class="query-type">xpath</span> <span class="string">"//*[local-name()='svg']/*[local-name()='g']/*[local-name()='circle']"</span> <span class="subquery-type">count</span> <span class="predicate-type">==</span> <span class="number">3</span></span>
<span class="line"><span class="query-type">xpath</span> <span class="string">"//*[name()='svg']/*[name()='g']/*[name()='circle']"</span> <span class="subquery-type">count</span> <span class="predicate-type">==</span> <span class="number">3</span></span>
<span class="line"><span class="query-type">xpath</span> <span class="string">"//_:svg/_:g/_:circle"</span> <span class="filter-type">count</span> <span class="predicate-type">==</span> <span class="number">3</span></span>
<span class="line"><span class="query-type">xpath</span> <span class="string">"//*[local-name()='svg']/*[local-name()='g']/*[local-name()='circle']"</span> <span class="filter-type">count</span> <span class="predicate-type">==</span> <span class="number">3</span></span>
<span class="line"><span class="query-type">xpath</span> <span class="string">"//*[name()='svg']/*[name()='g']/*[name()='circle']"</span> <span class="filter-type">count</span> <span class="predicate-type">==</span> <span class="number">3</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"># Test XPath assert with default and prefixed XML namespace.</span>
@ -45,8 +45,8 @@
<span class="line"><span class="query-type">xpath</span> <span class="string">"string(//_:book/_:title)"</span> <span class="predicate-type">==</span> <span class="string">"Cheaper by the Dozen"</span></span>
<span class="line"><span class="query-type">xpath</span> <span class="string">"string(//_:book/_:title)"</span> <span class="predicate-type">&gt;</span> <span class="string">"Cheaper"</span></span>
<span class="line"><span class="query-type">xpath</span> <span class="string">"string(//_:book/isbn:number)"</span> <span class="predicate-type">==</span> <span class="string">"1568491379"</span></span>
<span class="line"><span class="query-type">xpath</span> <span class="string">"//*[name()='book']/*[name()='notes']"</span> <span class="subquery-type">count</span> <span class="predicate-type">==</span> <span class="number">1</span></span>
<span class="line"><span class="query-type">xpath</span> <span class="string">"//*[local-name()='book']/*[local-name()='notes']"</span> <span class="subquery-type">count</span> <span class="predicate-type">==</span> <span class="number">1</span></span>
<span class="line"><span class="query-type">xpath</span> <span class="string">"//_:book/_:notes/*[local-name()='p']"</span> <span class="subquery-type">count</span> <span class="predicate-type">==</span> <span class="number">1</span></span>
<span class="line"><span class="query-type">xpath</span> <span class="string">"//*[name()='book']/*[name()='notes']"</span> <span class="filter-type">count</span> <span class="predicate-type">==</span> <span class="number">1</span></span>
<span class="line"><span class="query-type">xpath</span> <span class="string">"//*[local-name()='book']/*[local-name()='notes']"</span> <span class="filter-type">count</span> <span class="predicate-type">==</span> <span class="number">1</span></span>
<span class="line"><span class="query-type">xpath</span> <span class="string">"//_:book/_:notes/*[local-name()='p']"</span> <span class="filter-type">count</span> <span class="predicate-type">==</span> <span class="number">1</span></span>
</span></span><span class="line"></span>
</code></pre>

View File

@ -1 +1 @@
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/assert-xpath"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"xpath","expr":"normalize-space(//data)"},"predicate":{"type":"equal","value":"café"}},{"query":{"type":"xpath","expr":"normalize-space(//data)"},"predicate":{"type":"equal","value":"café"}},{"query":{"type":"xpath","expr":"normalize-space(//data)"},"predicate":{"type":"greater","value":"CAFÉ"}},{"query":{"type":"xpath","expr":"//toto"},"predicate":{"not":true,"type":"exist"}}],"body":{"type":"xml","value":"<data>café</data>"}}},{"request":{"method":"GET","url":"http://localhost:8000/assert-xpath-simple-namespaces"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"xpath","expr":"string(//bk:book/bk:title)"},"predicate":{"type":"equal","value":"Cheaper by the Dozen"}},{"query":{"type":"xpath","expr":"string(//*[name()='bk:book']/*[name()='bk:title'])"},"predicate":{"type":"equal","value":"Cheaper by the Dozen"}},{"query":{"type":"xpath","expr":"string(//*[local-name()='book']/*[local-name()='title'])"},"predicate":{"type":"equal","value":"Cheaper by the Dozen"}},{"query":{"type":"xpath","expr":"string(//bk:book/isbn:number)"},"predicate":{"type":"equal","value":"1568491379"}},{"query":{"type":"xpath","expr":"string(//*[name()='bk:book']/*[name()='isbn:number'])"},"predicate":{"type":"equal","value":"1568491379"}},{"query":{"type":"xpath","expr":"string(//*[local-name()='book']/*[local-name()='number'])"},"predicate":{"type":"equal","value":"1568491379"}}]}},{"request":{"method":"GET","url":"http://localhost:8000/assert-xpath-svg"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"xpath","expr":"//_:svg/_:g/_:circle","subquery":{"type":"count"}},"predicate":{"type":"equal","value":3}},{"query":{"type":"xpath","expr":"//*[local-name()='svg']/*[local-name()='g']/*[local-name()='circle']","subquery":{"type":"count"}},"predicate":{"type":"equal","value":3}},{"query":{"type":"xpath","expr":"//*[name()='svg']/*[name()='g']/*[name()='circle']","subquery":{"type":"count"}},"predicate":{"type":"equal","value":3}}]}},{"request":{"method":"GET","url":"http://localhost:8000/assert-xpath-namespaces"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"xpath","expr":"string(//_:book/_:title)"},"predicate":{"type":"equal","value":"Cheaper by the Dozen"}},{"query":{"type":"xpath","expr":"string(//_:book/_:title)"},"predicate":{"type":"greater","value":"Cheaper"}},{"query":{"type":"xpath","expr":"string(//_:book/isbn:number)"},"predicate":{"type":"equal","value":"1568491379"}},{"query":{"type":"xpath","expr":"//*[name()='book']/*[name()='notes']","subquery":{"type":"count"}},"predicate":{"type":"equal","value":1}},{"query":{"type":"xpath","expr":"//*[local-name()='book']/*[local-name()='notes']","subquery":{"type":"count"}},"predicate":{"type":"equal","value":1}},{"query":{"type":"xpath","expr":"//_:book/_:notes/*[local-name()='p']","subquery":{"type":"count"}},"predicate":{"type":"equal","value":1}}]}}]}
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/assert-xpath"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"xpath","expr":"normalize-space(//data)"},"predicate":{"type":"equal","value":"café"}},{"query":{"type":"xpath","expr":"normalize-space(//data)"},"predicate":{"type":"equal","value":"café"}},{"query":{"type":"xpath","expr":"normalize-space(//data)"},"predicate":{"type":"greater","value":"CAFÉ"}},{"query":{"type":"xpath","expr":"//toto"},"predicate":{"not":true,"type":"exist"}}],"body":{"type":"xml","value":"<data>café</data>"}}},{"request":{"method":"GET","url":"http://localhost:8000/assert-xpath-simple-namespaces"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"xpath","expr":"string(//bk:book/bk:title)"},"predicate":{"type":"equal","value":"Cheaper by the Dozen"}},{"query":{"type":"xpath","expr":"string(//*[name()='bk:book']/*[name()='bk:title'])"},"predicate":{"type":"equal","value":"Cheaper by the Dozen"}},{"query":{"type":"xpath","expr":"string(//*[local-name()='book']/*[local-name()='title'])"},"predicate":{"type":"equal","value":"Cheaper by the Dozen"}},{"query":{"type":"xpath","expr":"string(//bk:book/isbn:number)"},"predicate":{"type":"equal","value":"1568491379"}},{"query":{"type":"xpath","expr":"string(//*[name()='bk:book']/*[name()='isbn:number'])"},"predicate":{"type":"equal","value":"1568491379"}},{"query":{"type":"xpath","expr":"string(//*[local-name()='book']/*[local-name()='number'])"},"predicate":{"type":"equal","value":"1568491379"}}]}},{"request":{"method":"GET","url":"http://localhost:8000/assert-xpath-svg"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"xpath","expr":"//_:svg/_:g/_:circle","filters":[{"type":"count"}]},"predicate":{"type":"equal","value":3}},{"query":{"type":"xpath","expr":"//*[local-name()='svg']/*[local-name()='g']/*[local-name()='circle']","filters":[{"type":"count"}]},"predicate":{"type":"equal","value":3}},{"query":{"type":"xpath","expr":"//*[name()='svg']/*[name()='g']/*[name()='circle']","filters":[{"type":"count"}]},"predicate":{"type":"equal","value":3}}]}},{"request":{"method":"GET","url":"http://localhost:8000/assert-xpath-namespaces"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"xpath","expr":"string(//_:book/_:title)"},"predicate":{"type":"equal","value":"Cheaper by the Dozen"}},{"query":{"type":"xpath","expr":"string(//_:book/_:title)"},"predicate":{"type":"greater","value":"Cheaper"}},{"query":{"type":"xpath","expr":"string(//_:book/isbn:number)"},"predicate":{"type":"equal","value":"1568491379"}},{"query":{"type":"xpath","expr":"//*[name()='book']/*[name()='notes']","filters":[{"type":"count"}]},"predicate":{"type":"equal","value":1}},{"query":{"type":"xpath","expr":"//*[local-name()='book']/*[local-name()='notes']","filters":[{"type":"count"}]},"predicate":{"type":"equal","value":1}},{"query":{"type":"xpath","expr":"//_:book/_:notes/*[local-name()='p']","filters":[{"type":"count"}]},"predicate":{"type":"equal","value":1}}]}}]}

View File

@ -4,7 +4,7 @@
<span class="line section-header">[Asserts]</span>
<span class="line"><span class="query-type">bytes</span> <span class="predicate-type">==</span> hex,<span class="hex">010203</span>;</span>
<span class="line"><span class="query-type">bytes</span> <span class="predicate-type">==</span> base64,<span class="base64">AQID</span>;</span>
<span class="line"><span class="query-type">bytes</span> <span class="subquery-type">count</span> <span class="predicate-type">==</span> <span class="number">3</span></span>
<span class="line"><span class="query-type">bytes</span> <span class="filter-type">count</span> <span class="predicate-type">==</span> <span class="number">3</span></span>
<span class="line"><span class="query-type">bytes</span> <span class="predicate-type">startsWith</span> hex,<span class="hex">01</span>;</span>
<span class="line"><span class="query-type">bytes</span> <span class="predicate-type">endsWith</span> hex,<span class="hex">03</span>;</span>
<span class="line"><span class="query-type">bytes</span> <span class="predicate-type">contains</span> hex,<span class="hex">02</span>;</span>

View File

@ -1 +1 @@
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/bytes"},"response":{"version":"HTTP/1.0","status":200,"headers":[{"name":"Content-Type","value":"application/octet-stream"}],"asserts":[{"query":{"type":"bytes"},"predicate":{"type":"equal","value":"AQID","encoding":"base64"}},{"query":{"type":"bytes"},"predicate":{"type":"equal","value":"AQID","encoding":"base64"}},{"query":{"type":"bytes","subquery":{"type":"count"}},"predicate":{"type":"equal","value":3}},{"query":{"type":"bytes"},"predicate":{"type":"start-with","value":"AQ==","encoding":"base64"}},{"query":{"type":"bytes"},"predicate":{"type":"end-with","value":"Aw==","encoding":"base64"}},{"query":{"type":"bytes"},"predicate":{"type":"contain","value":"Ag==","encoding":"base64"}},{"query":{"type":"sha256"},"predicate":{"type":"equal","value":"A5BYxvLAy0ksUzsKTRTvd8wPeKvMztUofYShogEc+4E=","encoding":"base64"}},{"query":{"type":"md5"},"predicate":{"type":"equal","value":"Uonfc331cyb83SJZevsfrA==","encoding":"base64"}}]}}]}
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/bytes"},"response":{"version":"HTTP/1.0","status":200,"headers":[{"name":"Content-Type","value":"application/octet-stream"}],"asserts":[{"query":{"type":"bytes"},"predicate":{"type":"equal","value":"AQID","encoding":"base64"}},{"query":{"type":"bytes"},"predicate":{"type":"equal","value":"AQID","encoding":"base64"}},{"query":{"type":"bytes","filters":[{"type":"count"}]},"predicate":{"type":"equal","value":3}},{"query":{"type":"bytes"},"predicate":{"type":"start-with","value":"AQ==","encoding":"base64"}},{"query":{"type":"bytes"},"predicate":{"type":"end-with","value":"Aw==","encoding":"base64"}},{"query":{"type":"bytes"},"predicate":{"type":"contain","value":"Ag==","encoding":"base64"}},{"query":{"type":"sha256"},"predicate":{"type":"equal","value":"A5BYxvLAy0ksUzsKTRTvd8wPeKvMztUofYShogEc+4E=","encoding":"base64"}},{"query":{"type":"md5"},"predicate":{"type":"equal","value":"Uonfc331cyb83SJZevsfrA==","encoding":"base64"}}]}}]}

View File

@ -3,8 +3,8 @@
<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 class="line"><span class="name">param2</span><span>:</span> <span class="query-type">header</span> <span class="string">"header2"</span> <span class="filter-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="filter-type">regex</span> <span class="regex">/Hello (.*)!/</span></span>
<span class="line section-header">[Asserts]</span>
<span class="line"><span class="query-type">variable</span> <span class="string">"param1"</span> <span class="predicate-type">==</span> <span class="string">"value1"</span></span>
<span class="line"><span class="query-type">variable</span> <span class="string">"param2"</span> <span class="predicate-type">==</span> <span class="string">"Bob"</span></span>

View File

@ -1 +1 @@
{"entries":[{"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 (.*)!"}}}}],"asserts":[{"query":{"type":"variable","name":"param1"},"predicate":{"type":"equal","value":"value1"}},{"query":{"type":"variable","name":"param2"},"predicate":{"type":"equal","value":"Bob"}},{"query":{"type":"variable","name":"param3"},"predicate":{"type":"equal","value":"Bob"}}]}},{"request":{"method":"GET","url":"http://localhost:8000/captures-check","query_string_params":[{"name":"param1","value":"{{param1}}"},{"name":"param2","value":"{{param2}}"}]},"response":{"version":"HTTP/1.0","status":200}},{"request":{"method":"GET","url":"http://localhost:8000/captures-json"},"response":{"version":"HTTP/1.0","status":200,"captures":[{"name":"an_object","query":{"type":"jsonpath","expr":"$['an_object']"}},{"name":"a_list","query":{"type":"jsonpath","expr":"$['a_list']"}},{"name":"a_null","query":{"type":"jsonpath","expr":"$['a_null']"}},{"name":"an_integer","query":{"type":"jsonpath","expr":"$['an_integer']"}},{"name":"a_float","query":{"type":"jsonpath","expr":"$['a_float']"}},{"name":"a_bool","query":{"type":"jsonpath","expr":"$['a_bool']"}},{"name":"a_string","query":{"type":"jsonpath","expr":"$['a_string']"}},{"name":"all","query":{"type":"jsonpath","expr":"$"}}],"asserts":[{"query":{"type":"variable","name":"a_null"},"predicate":{"type":"exist"}},{"query":{"type":"variable","name":"undefined"},"predicate":{"not":true,"type":"exist"}},{"query":{"type":"variable","name":"a_null"},"predicate":{"type":"equal","value":"a_null"}},{"query":{"type":"variable","name":"an_integer"},"predicate":{"type":"equal","value":"an_integer"}},{"query":{"type":"variable","name":"a_float"},"predicate":{"type":"equal","value":"a_float"}},{"query":{"type":"variable","name":"a_bool"},"predicate":{"type":"equal","value":"a_bool"}},{"query":{"type":"variable","name":"a_string"},"predicate":{"type":"equal","value":"a_string"}},{"query":{"type":"variable","name":"a_string"},"predicate":{"type":"equal","value":"{{a_string}}"}},{"query":{"type":"variable","name":"a_list"},"predicate":{"type":"equal","value":"a_list"}}]}}]}
{"entries":[{"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","filters":[{"type":"regex","expr":"Hello (.*)!"}]}},{"name":"param3","query":{"type":"header","name":"header2","filters":[{"type":"regex","expr":{"type":"regex","value":"Hello (.*)!"}}]}}],"asserts":[{"query":{"type":"variable","name":"param1"},"predicate":{"type":"equal","value":"value1"}},{"query":{"type":"variable","name":"param2"},"predicate":{"type":"equal","value":"Bob"}},{"query":{"type":"variable","name":"param3"},"predicate":{"type":"equal","value":"Bob"}}]}},{"request":{"method":"GET","url":"http://localhost:8000/captures-check","query_string_params":[{"name":"param1","value":"{{param1}}"},{"name":"param2","value":"{{param2}}"}]},"response":{"version":"HTTP/1.0","status":200}},{"request":{"method":"GET","url":"http://localhost:8000/captures-json"},"response":{"version":"HTTP/1.0","status":200,"captures":[{"name":"an_object","query":{"type":"jsonpath","expr":"$['an_object']"}},{"name":"a_list","query":{"type":"jsonpath","expr":"$['a_list']"}},{"name":"a_null","query":{"type":"jsonpath","expr":"$['a_null']"}},{"name":"an_integer","query":{"type":"jsonpath","expr":"$['an_integer']"}},{"name":"a_float","query":{"type":"jsonpath","expr":"$['a_float']"}},{"name":"a_bool","query":{"type":"jsonpath","expr":"$['a_bool']"}},{"name":"a_string","query":{"type":"jsonpath","expr":"$['a_string']"}},{"name":"all","query":{"type":"jsonpath","expr":"$"}}],"asserts":[{"query":{"type":"variable","name":"a_null"},"predicate":{"type":"exist"}},{"query":{"type":"variable","name":"undefined"},"predicate":{"not":true,"type":"exist"}},{"query":{"type":"variable","name":"a_null"},"predicate":{"type":"equal","value":"a_null"}},{"query":{"type":"variable","name":"an_integer"},"predicate":{"type":"equal","value":"an_integer"}},{"query":{"type":"variable","name":"a_float"},"predicate":{"type":"equal","value":"a_float"}},{"query":{"type":"variable","name":"a_bool"},"predicate":{"type":"equal","value":"a_bool"}},{"query":{"type":"variable","name":"a_string"},"predicate":{"type":"equal","value":"a_string"}},{"query":{"type":"variable","name":"a_string"},"predicate":{"type":"equal","value":"{{a_string}}"}},{"query":{"type":"variable","name":"a_list"},"predicate":{"type":"equal","value":"a_list"}}]}}]}

View File

@ -49,7 +49,7 @@
<span class="line"><span class="string">Set-Cookie</span><span>:</span> <span class="string">SSID=Ap4PGTEq; Domain=.localhost; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly; Path=/</span></span>
<span class="line"></span>
<span class="line section-header">[Asserts]</span>
<span class="line"><span class="query-type">header</span> <span class="string">"Set-Cookie"</span> <span class="subquery-type">count</span> <span class="predicate-type">==</span> <span class="number">3</span></span>
<span class="line"><span class="query-type">header</span> <span class="string">"Set-Cookie"</span> <span class="filter-type">count</span> <span class="predicate-type">==</span> <span class="number">3</span></span>
<span class="line"><span class="query-type">cookie</span> <span class="string">"LSID"</span> <span class="predicate-type">equals</span> <span class="string">"DQAAAKEaem_vYg"</span></span>
<span class="line"><span class="query-type">cookie</span> <span class="string">"LSID[Value]"</span> <span class="predicate-type">==</span> <span class="string">"DQAAAKEaem_vYg"</span></span>
<span class="line"><span class="query-type">cookie</span> <span class="string">"LSID[Expires]"</span> <span class="predicate-type">exists</span></span>

View File

@ -1 +1 @@
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/cookies/set-request-cookie1-valueA","cookies":[{"name":"cookie1","value":"valueA"}]},"response":{"version":"HTTP/1.0","status":200}},{"request":{"method":"GET","url":"http://localhost:8000/cookies/assert-that-cookie1-is-not-in-session"},"response":{"version":"HTTP/1.0","status":200}},{"request":{"method":"GET","url":"http://localhost:8000/cookies/set-multiple-request-cookies","cookies":[{"name":"user1","value":"Bob"},{"name":"user2","value":"Bill"},{"name":"user3","value":"{{name}}"}]},"response":{"version":"HTTP/1.0","status":200}},{"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/cookies/assert-that-cookie2-is-valueA"},"response":{"version":"HTTP/1.0","status":200}},{"request":{"method":"GET","url":"http://localhost:8000/cookies/assert-that-cookie2-is-valueA-and-valueB","cookies":[{"name":"cookie2","value":"valueB"}]},"response":{"version":"HTTP/1.0","status":200}},{"request":{"method":"GET","url":"http://localhost:8000/cookies/delete-cookie2"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"cookie","expr":"cookie2"},"predicate":{"type":"equal","value":""}},{"query":{"type":"cookie","expr":"cookie2[Max-Age]"},"predicate":{"type":"equal","value":0}}]}},{"request":{"method":"GET","url":"http://localhost:8000/cookies/assert-that-cookie2-is-not-in-session"},"response":{"version":"HTTP/1.0","status":200}},{"request":{"method":"GET","url":"http://localhost:8000/cookies/set"},"response":{"version":"HTTP/1.0","status":200,"headers":[{"name":"Set-Cookie","value":"LSID=DQAAAKEaem_vYg; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly; Path=/accounts"},{"name":"Set-Cookie","value":"HSID=AYQEVnDKrdst; Domain=.localhost; Expires=Wed, 13 Jan 2021 22:23:01 GMT; HttpOnly; Path=/"},{"name":"Set-Cookie","value":"SSID=Ap4PGTEq; Domain=.localhost; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly; Path=/"}],"asserts":[{"query":{"type":"header","name":"Set-Cookie","subquery":{"type":"count"}},"predicate":{"type":"equal","value":3}},{"query":{"type":"cookie","expr":"LSID"},"predicate":{"type":"equal","value":"DQAAAKEaem_vYg"}},{"query":{"type":"cookie","expr":"LSID[Value]"},"predicate":{"type":"equal","value":"DQAAAKEaem_vYg"}},{"query":{"type":"cookie","expr":"LSID[Expires]"},"predicate":{"type":"exist"}},{"query":{"type":"cookie","expr":"LSID[Expires]"},"predicate":{"type":"equal","value":"Wed, 13 Jan 2021 22:23:01 GMT"}},{"query":{"type":"cookie","expr":"LSID[Max-Age]"},"predicate":{"not":true,"type":"exist"}},{"query":{"type":"cookie","expr":"LSID[Domain]"},"predicate":{"not":true,"type":"exist"}},{"query":{"type":"cookie","expr":"LSID[Path]"},"predicate":{"type":"equal","value":"/accounts"}},{"query":{"type":"cookie","expr":"LSID[Secure]"},"predicate":{"type":"exist"}},{"query":{"type":"cookie","expr":"LSID[HttpOnly]"},"predicate":{"type":"exist"}},{"query":{"type":"cookie","expr":"LSID[SameSite]"},"predicate":{"not":true,"type":"exist"}}]}}]}
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/cookies/set-request-cookie1-valueA","cookies":[{"name":"cookie1","value":"valueA"}]},"response":{"version":"HTTP/1.0","status":200}},{"request":{"method":"GET","url":"http://localhost:8000/cookies/assert-that-cookie1-is-not-in-session"},"response":{"version":"HTTP/1.0","status":200}},{"request":{"method":"GET","url":"http://localhost:8000/cookies/set-multiple-request-cookies","cookies":[{"name":"user1","value":"Bob"},{"name":"user2","value":"Bill"},{"name":"user3","value":"{{name}}"}]},"response":{"version":"HTTP/1.0","status":200}},{"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/cookies/assert-that-cookie2-is-valueA"},"response":{"version":"HTTP/1.0","status":200}},{"request":{"method":"GET","url":"http://localhost:8000/cookies/assert-that-cookie2-is-valueA-and-valueB","cookies":[{"name":"cookie2","value":"valueB"}]},"response":{"version":"HTTP/1.0","status":200}},{"request":{"method":"GET","url":"http://localhost:8000/cookies/delete-cookie2"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"cookie","expr":"cookie2"},"predicate":{"type":"equal","value":""}},{"query":{"type":"cookie","expr":"cookie2[Max-Age]"},"predicate":{"type":"equal","value":0}}]}},{"request":{"method":"GET","url":"http://localhost:8000/cookies/assert-that-cookie2-is-not-in-session"},"response":{"version":"HTTP/1.0","status":200}},{"request":{"method":"GET","url":"http://localhost:8000/cookies/set"},"response":{"version":"HTTP/1.0","status":200,"headers":[{"name":"Set-Cookie","value":"LSID=DQAAAKEaem_vYg; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly; Path=/accounts"},{"name":"Set-Cookie","value":"HSID=AYQEVnDKrdst; Domain=.localhost; Expires=Wed, 13 Jan 2021 22:23:01 GMT; HttpOnly; Path=/"},{"name":"Set-Cookie","value":"SSID=Ap4PGTEq; Domain=.localhost; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly; Path=/"}],"asserts":[{"query":{"type":"header","name":"Set-Cookie","filters":[{"type":"count"}]},"predicate":{"type":"equal","value":3}},{"query":{"type":"cookie","expr":"LSID"},"predicate":{"type":"equal","value":"DQAAAKEaem_vYg"}},{"query":{"type":"cookie","expr":"LSID[Value]"},"predicate":{"type":"equal","value":"DQAAAKEaem_vYg"}},{"query":{"type":"cookie","expr":"LSID[Expires]"},"predicate":{"type":"exist"}},{"query":{"type":"cookie","expr":"LSID[Expires]"},"predicate":{"type":"equal","value":"Wed, 13 Jan 2021 22:23:01 GMT"}},{"query":{"type":"cookie","expr":"LSID[Max-Age]"},"predicate":{"not":true,"type":"exist"}},{"query":{"type":"cookie","expr":"LSID[Domain]"},"predicate":{"not":true,"type":"exist"}},{"query":{"type":"cookie","expr":"LSID[Path]"},"predicate":{"type":"equal","value":"/accounts"}},{"query":{"type":"cookie","expr":"LSID[Secure]"},"predicate":{"type":"exist"}},{"query":{"type":"cookie","expr":"LSID[HttpOnly]"},"predicate":{"type":"exist"}},{"query":{"type":"cookie","expr":"LSID[SameSite]"},"predicate":{"not":true,"type":"exist"}}]}}]}

View File

@ -4,6 +4,6 @@
<span class="line"><span class="string">Content-Length</span><span>:</span> <span class="string">10</span></span>
<span class="line"><span class="string">Server</span><span>:</span> <span class="string">Flask Server</span></span>
<span class="line section-header">[Asserts]</span>
<span class="line"><span class="query-type">bytes</span> <span class="subquery-type">count</span> <span class="predicate-type">==</span> <span class="number">0</span></span>
<span class="line"><span class="query-type">bytes</span> <span class="filter-type">count</span> <span class="predicate-type">==</span> <span class="number">0</span></span>
</span></span><span class="line"></span>
</code></pre>

View File

@ -1 +1 @@
{"entries":[{"request":{"method":"HEAD","url":"http://localhost:8000/head"},"response":{"version":"HTTP/1.0","status":200,"headers":[{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"10"},{"name":"Server","value":"Flask Server"}],"asserts":[{"query":{"type":"bytes","subquery":{"type":"count"}},"predicate":{"type":"equal","value":0}}]}}]}
{"entries":[{"request":{"method":"HEAD","url":"http://localhost:8000/head"},"response":{"version":"HTTP/1.0","status":200,"headers":[{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"10"},{"name":"Server","value":"Flask Server"}],"asserts":[{"query":{"type":"bytes","filters":[{"type":"count"}]},"predicate":{"type":"equal","value":0}}]}}]}

View File

@ -41,8 +41,8 @@
<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 class="line"><span class="name">param2</span><span>:</span> <span class="query-type">header</span> <span class="string">"header2"</span> <span class="filter-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="filter-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>

View File

@ -1 +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}}]}}]}
{"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","filters":[{"type":"regex","expr":"Hello (.*)!"}]}},{"name":"param3","query":{"type":"header","name":"header2","filters":[{"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

@ -20,5 +20,5 @@
</span><span class="response"><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">body</span> <span class="predicate-type">==</span> <span class="string">"\u{2708}"</span></span>
<span class="line"><span class="query-type">bytes</span> <span class="subquery-type">count</span> <span class="predicate-type">==</span> <span class="number">3</span></span>
<span class="line"><span class="query-type">bytes</span> <span class="filter-type">count</span> <span class="predicate-type">==</span> <span class="number">3</span></span>
</span></span></code></pre>

View File

@ -1 +1 @@
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/predicates-string"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"body"},"predicate":{"type":"equal","value":"Hello World!"}},{"query":{"type":"body"},"predicate":{"type":"start-with","value":"Hello"}},{"query":{"type":"body"},"predicate":{"type":"end-with","value":"!"}},{"query":{"type":"body"},"predicate":{"type":"contain","value":"llo"}},{"query":{"type":"body"},"predicate":{"type":"match","value":"Hello [a-zA-Z]+!"}},{"query":{"type":"body"},"predicate":{"type":"match","value":"Hello [a-zA-Z]+!","encoding":"regex"}}]}},{"request":{"method":"GET","url":"http://localhost:8000/predicates-string-empty"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"body"},"predicate":{"type":"equal","value":""}},{"query":{"type":"body"},"predicate":{"type":"exist"}}]}},{"request":{"method":"GET","url":"http://localhost:8000/predicates-string-unicode"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"body"},"predicate":{"type":"equal","value":"✈"}},{"query":{"type":"bytes","subquery":{"type":"count"}},"predicate":{"type":"equal","value":3}}]}}]}
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/predicates-string"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"body"},"predicate":{"type":"equal","value":"Hello World!"}},{"query":{"type":"body"},"predicate":{"type":"start-with","value":"Hello"}},{"query":{"type":"body"},"predicate":{"type":"end-with","value":"!"}},{"query":{"type":"body"},"predicate":{"type":"contain","value":"llo"}},{"query":{"type":"body"},"predicate":{"type":"match","value":"Hello [a-zA-Z]+!"}},{"query":{"type":"body"},"predicate":{"type":"match","value":"Hello [a-zA-Z]+!","encoding":"regex"}}]}},{"request":{"method":"GET","url":"http://localhost:8000/predicates-string-empty"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"body"},"predicate":{"type":"equal","value":""}},{"query":{"type":"body"},"predicate":{"type":"exist"}}]}},{"request":{"method":"GET","url":"http://localhost:8000/predicates-string-unicode"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"body"},"predicate":{"type":"equal","value":"✈"}},{"query":{"type":"bytes","filters":[{"type":"count"}]},"predicate":{"type":"equal","value":3}}]}}]}

View File

@ -1,8 +1,8 @@
<pre><code class="language-hurl"><span class="hurl-entry"><span class="request"><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/subquery-count</span></span>
</span><span class="response"><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">"$.users"</span> <span class="subquery-type">count</span> <span class="predicate-type">==</span> <span class="number">3</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.users"</span> <span class="subquery-type">count</span> <span class="predicate-type">&gt;</span> <span class="number">1</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.users"</span> <span class="subquery-type">count</span> <span class="predicate-type">&lt;=</span> <span class="number">10</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.users"</span> <span class="filter-type">count</span> <span class="predicate-type">==</span> <span class="number">3</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.users"</span> <span class="filter-type">count</span> <span class="predicate-type">&gt;</span> <span class="number">1</span></span>
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.users"</span> <span class="filter-type">count</span> <span class="predicate-type">&lt;=</span> <span class="number">10</span></span>
</span></span><span class="line"></span>
</code></pre>

View File

@ -1 +1 @@
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/subquery-count"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"jsonpath","expr":"$.users","subquery":{"type":"count"}},"predicate":{"type":"equal","value":3}},{"query":{"type":"jsonpath","expr":"$.users","subquery":{"type":"count"}},"predicate":{"type":"greater","value":1}},{"query":{"type":"jsonpath","expr":"$.users","subquery":{"type":"count"}},"predicate":{"type":"less-or-equal","value":10}}]}}]}
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/subquery-count"},"response":{"version":"HTTP/1.0","status":200,"asserts":[{"query":{"type":"jsonpath","expr":"$.users","filters":[{"type":"count"}]},"predicate":{"type":"equal","value":3}},{"query":{"type":"jsonpath","expr":"$.users","filters":[{"type":"count"}]},"predicate":{"type":"greater","value":1}},{"query":{"type":"jsonpath","expr":"$.users","filters":[{"type":"count"}]},"predicate":{"type":"less-or-equal","value":10}}]}}]}