-
Notifications
You must be signed in to change notification settings - Fork 526
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add failed test in HTML/JUnit/TAP reports
- Loading branch information
Showing
14 changed files
with
67 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?><testsuites><testsuite tests="2" errors="0" failures="0"><testcase id="tests_ok/test.1.hurl" name="tests_ok/test.1.hurl" time="~~~" /><testcase id="tests_ok/test.2.hurl" name="tests_ok/test.2.hurl" time="~~~" /></testsuite><testsuite tests="1" errors="0" failures="0"><testcase id="tests_ok/test.3.hurl" name="tests_ok/test.3.hurl" time="~~~" /></testsuite></testsuites> | ||
<?xml version="1.0" encoding="UTF-8"?><testsuites><testsuite tests="2" errors="0" failures="1"><testcase id="tests_ok/test.1.hurl" name="tests_ok/test.1.hurl" time="~~~" /><testcase id="tests_ok/test.2.hurl" name="tests_ok/test.2.hurl" time="~~~"><failure>Assert body value | ||
--> tests_ok/test.2.hurl:8:1 | ||
| | ||
8 | `Goodbye World!` | ||
| ^^^^^^^^^^^^^^^^ actual value is <Hello World!> | ||
|</failure></testcase></testsuite><testsuite tests="1" errors="0" failures="0"><testcase id="tests_ok/test.3.hurl" name="tests_ok/test.3.hurl" time="~~~" /></testsuite></testsuites> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
#!/bin/bash | ||
set -Eeuo pipefail | ||
rm -f build/result.xml | ||
|
||
# test.2.hurl is KO but we don't the script ton continue until the end | ||
set +eo pipefail | ||
hurl --test --report-junit build/result.xml tests_ok/test.1.hurl tests_ok/test.2.hurl | ||
hurl --test --report-junit build/result.xml tests_ok/test.3.hurl | ||
set -Eeuo pipefail | ||
|
||
cat build/result.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
TAP version 13 | ||
1..3 | ||
ok 1 - tests_ok/test.1.hurl | ||
ok 2 - tests_ok/test.2.hurl | ||
not ok 2 - tests_ok/test.2.hurl | ||
ok 3 - tests_ok/test.3.hurl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
#!/bin/bash | ||
set -Eeuo pipefail | ||
rm -f build/result.tap | ||
|
||
# test.2.hurl is KO but we don't the script ton continue until the end | ||
set +eo pipefail | ||
hurl --test --report-tap build/result.tap tests_ok/test.1.hurl tests_ok/test.2.hurl | ||
hurl --test --report-tap build/result.tap tests_ok/test.3.hurl | ||
set -Eeuo pipefail | ||
|
||
cat build/result.tap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
<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/hello</span></span> | ||
</span><span class="response"><span class="line"></span> | ||
<span class="line"><span class="version">HTTP</span> <span class="number">200</span></span> | ||
</span><span class="response"><span class="line"><span class="version">HTTP</span> <span class="number">200</span></span> | ||
<span class="line"><span class="string">`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 class="method">GET</span> <span class="url">http://localhost:8000/hello</span></span> | ||
</span><span class="response"><span class="line"><span class="version">HTTP</span> <span class="number">200</span></span> | ||
<span class="line"><span class="string">`Goodbye World!`</span></span> | ||
</span></span></code></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
GET http://localhost:8000/hello | ||
|
||
HTTP 200 | ||
`Hello World!` | ||
|
||
|
||
GET http://localhost:8000/hello | ||
HTTP 200 | ||
`Goodbye World!` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/hello"},"response":{"status":200,"body":{"type":"text","value":"Hello World!"}}}]} | ||
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/hello"},"response":{"status":200,"body":{"type":"text","value":"Hello World!"}}},{"request":{"method":"GET","url":"http://localhost:8000/hello"},"response":{"status":200,"body":{"type":"text","value":"Goodbye World!"}}}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
tests_ok~test.1.hurl: Running [1/3] | ||
tests_ok~test.1.hurl: Success (1 request(s) in ~~~ ms) | ||
tests_ok~test.2.hurl: Running [2/3] | ||
tests_ok~test.2.hurl: Success (1 request(s) in ~~~ ms) | ||
error: Assert body value | ||
--> tests_ok~test.2.hurl:8:1 | ||
| | ||
8 | `Goodbye World!` | ||
| ^^^^^^^^^^^^^^^^ actual value is <Hello World!>~ | ||
| | ||
|
||
tests_ok~test.2.hurl: Failure (2 request(s) in ~~~ ms) | ||
tests_ok~test.3.hurl: Running [3/3] | ||
tests_ok~test.3.hurl: Success (1 request(s) in ~~~ ms) | ||
-------------------------------------------------------------------------------- | ||
Executed files: 3 | ||
Succeeded files: 3 (100.0%) | ||
Failed files: 0 (0.0%) | ||
Succeeded files: 2 (66.7%) | ||
Failed files: 1 (33.3%) | ||
Duration: ~~~ ms | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters