2021-09-21 07:36:53 +03:00
|
|
|
<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/predicate/error/type</span></span>
|
2022-11-11 16:25:00 +03:00
|
|
|
</span><span class="response"><span class="line"><span class="version">HTTP</span> <span class="number">200</span></span>
|
2023-04-11 18:28:28 +03:00
|
|
|
<span class="line"><span class="section-header">[Asserts]</span></span>
|
2023-06-18 15:35:03 +03:00
|
|
|
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.status"</span> <span class="predicate-type">==</span> <span class="string">"true"</span></span>
|
2021-09-21 07:36:53 +03:00
|
|
|
<span class="line"></span><span class="comment">#jsonpath "$.count" equals "0"</span>
|
2023-06-18 15:35:03 +03:00
|
|
|
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.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">"$.message"</span> <span class="predicate-type">==</span> <span class="number">0</span></span>
|
|
|
|
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.empty"</span> <span class="predicate-type">==</span> <span class="number">0</span></span>
|
|
|
|
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.number"</span> <span class="predicate-type">==</span> <span class="number">1.1</span></span>
|
2021-09-21 07:36:53 +03:00
|
|
|
<span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.message"</span> <span class="predicate-type">startsWith</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">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>
|
2022-10-25 09:59:18 +03:00
|
|
|
<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>
|
2021-09-21 07:36:53 +03:00
|
|
|
<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>
|
2022-10-25 09:59:18 +03:00
|
|
|
<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>
|
2022-10-24 12:37:11 +03:00
|
|
|
</span></span></code></pre>
|