Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions README.md

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions docs/manual.md

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions docs/manual/hurl.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH hurl 1 "09 Mar 2026" "hurl 8.0.0-SNAPSHOT" " Hurl Manual"
.TH hurl 1 "13 Mar 2026" "hurl 8.0.0-SNAPSHOT" " Hurl Manual"
.SH NAME

hurl - run and test HTTP requests.
Expand Down Expand Up @@ -332,8 +332,9 @@ This is a cli-only option.

.IP "--error-format <FORMAT> "

Control the format of error message (short by default or long). When using long,
the response body is logged when there are errors.
Control the format of error message (short by default or long). When using long, the response body is logged when there are errors.

Environment variables: HURL_ERROR_FORMAT

This is a cli-only option.

Expand Down Expand Up @@ -426,13 +427,14 @@ Environment variables: HURL_VERY_VERBOSE

.IP "--continue-on-error "

Continue executing requests to the end of the Hurl file even when an assert error occurs.
By default, Hurl exits after an assert error in the HTTP response.
Continue executing requests to the end of the Hurl file even when an assert error occurs. By default, Hurl exits after an assert error in the HTTP response.

Note that this option does not affect the behavior with multiple input Hurl files.

All the input files are executed independently. The result of one file does not affect the execution of the other Hurl files.

Environment variables: HURL_CONTINUE_ON_ERROR

This is a cli-only option.

.IP "--delay <MILLISECONDS> "
Expand Down
10 changes: 6 additions & 4 deletions docs/manual/hurl.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,9 @@ This is a cli-only option.

#### --error-format <FORMAT> {#error-format}

Control the format of error message (short by default or long). When using long,
the response body is logged when there are errors.
Control the format of error message (short by default or long). When using long, the response body is logged when there are errors.

Environment variables: HURL_ERROR_FORMAT

This is a cli-only option.

Expand Down Expand Up @@ -444,13 +445,14 @@ Environment variables: HURL_VERY_VERBOSE

#### --continue-on-error {#continue-on-error}

Continue executing requests to the end of the Hurl file even when an assert error occurs.
By default, Hurl exits after an assert error in the HTTP response.
Continue executing requests to the end of the Hurl file even when an assert error occurs. By default, Hurl exits after an assert error in the HTTP response.

Note that this option does not affect the behavior with multiple input Hurl files.

All the input files are executed independently. The result of one file does not affect the execution of the other Hurl files.

Environment variables: HURL_CONTINUE_ON_ERROR

This is a cli-only option.

#### --delay <MILLISECONDS> {#delay}
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/hurlfmt.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH hurl 1 "09 Mar 2026" "hurl 8.0.0-SNAPSHOT" " Hurl Manual"
.TH hurl 1 "13 Mar 2026" "hurl 8.0.0-SNAPSHOT" " Hurl Manual"
.SH NAME

hurlfmt - format Hurl files
Expand Down
4 changes: 2 additions & 2 deletions docs/spec/options/hurl/continue_on_error.option
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ long: continue-on-error
help: Continue executing requests even if an error occurs
help_heading: Run options
cli_only: true
env_var: HURL_CONTINUE_ON_ERROR
---
Continue executing requests to the end of the Hurl file even when an assert error occurs.
By default, Hurl exits after an assert error in the HTTP response.
Continue executing requests to the end of the Hurl file even when an assert error occurs. By default, Hurl exits after an assert error in the HTTP response.

Note that this option does not affect the behavior with multiple input Hurl files.

Expand Down
4 changes: 2 additions & 2 deletions docs/spec/options/hurl/error_format.option
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ value_parser: ["short", "long"]
help: Control the format of error messages
help_heading: Output options
cli_only: true
env_var: HURL_ERROR_FORMAT
---
Control the format of error message (short by default or long). When using long,
the response body is logged when there are errors.
Control the format of error message (short by default or long). When using long, the response body is logged when there are errors.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
error: Assert status code
--> tests_failed/continue_on_error/continue_on_error.hurl:2:6
|
| GET http://localhost:8000/continue-on-error
2 | HTTP 400
| ^^^ actual value is <200>
|

error: Assert status code
--> tests_failed/continue_on_error/continue_on_error.hurl:8:6
|
| GET http://localhost:8000/continue-on-error
8 | HTTP 400
| ^^^ actual value is <200>
|

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Set-StrictMode -Version latest
$ErrorActionPreference = 'Stop'

$env:HURL_CONTINUE_ON_ERROR = '1'
hurl tests_failed/continue_on_error/continue_on_error.hurl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -Eeuo pipefail

export HURL_CONTINUE_ON_ERROR=1
hurl tests_failed/continue_on_error/continue_on_error.hurl
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
* Request can be run with the following curl command:
* curl 'http://localhost:8000/error-format-long/html'

HTTP/1.1 200
Content-Length: 45
Content-Type: text/html; charset=utf-8
Date: <<<.*?>>>
Server: Flask Server
Via: waitress

<html><head><title>Test</title></head></html>

error: Assert header value
--> tests_failed/error_format_long/error_format_long.hurl:7:15
|
| GET http://localhost:8000/error-format-long/html
| ...
7 | Content-Type: text/html
| ^^^^^^^^^ actual value is <text/html; charset=utf-8>
|

error: Assert failure
--> tests_failed/error_format_long/error_format_long.hurl:9:0
|
| GET http://localhost:8000/error-format-long/html
| ...
9 | xpath "string(//head/title)" == "Welcome!"
| actual: string <Test>
| expected: string <Welcome!>
|

error: Assert failure
--> tests_failed/error_format_long/error_format_long.hurl:11:0
|
| GET http://localhost:8000/error-format-long/html
| ...
11 | xpath "//title" count == 2
| actual: integer <1>
| expected: integer <2>
|

* Request can be run with the following curl command:
* curl 'http://localhost:8000/error-format-long/json'

HTTP/1.1 200
Content-Length: 115
Content-Type: application/json
Date: <<<.*?>>>
Server: Flask Server
Via: waitress

{"books": [{"name": "Dune", "author": "Franck Herbert"}, {"name": "Les Mis\u00e9rables", "author": "Victor Hugo"}]}

error: Assert failure
--> tests_failed/error_format_long/error_format_long.hurl:18:0
|
| GET http://localhost:8000/error-format-long/json
| ...
18 | jsonpath "$.books" count == 12
| actual: integer <2>
| expected: integer <12>
|

* Request can be run with the following curl command:
* curl 'http://localhost:8000/error-format-long/rfc-7807'

HTTP/1.1 200
Content-Length: 258
Content-Type: application/problem+json
Date: <<<.*?>>>
Server: Flask Server
Via: waitress

{"type": "https://example.com/probs/out-of-credit", "title": "You do not have enough credit.", "detail": "Your current balance is 30, but that costs 50.", "instance": "/account/12345/msgs/abc", "balance": 30, "accounts": ["/account/12345", "/account/67890"]}

error: Assert failure
--> tests_failed/error_format_long/error_format_long.hurl:26:0
|
| GET http://localhost:8000/error-format-long/rfc-7807
| ...
26 | jsonpath "$.title" == "You have enough credit."
| actual: string <You do not have enough credit.>
| expected: string <You have enough credit.>
|

* Request can be run with the following curl command:
* curl 'http://localhost:8000/error-format-long/fhir'

HTTP/1.1 200
Content-Length: 902
Content-Type: application/fhir+json
Date: <<<.*?>>>
Server: Flask Server
Via: waitress

{"resourceType": "Practitioner", "id": "example", "text": {"status": "generated", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <p>Dr Adam Careful is a Referring Practitioner for Acme Hospital from 1-Jan 2012 to 31-Mar\n 2012</p>\n </div>"}, "identifier": [{"system": "http://www.acme.org/practitioners", "value": "23"}], "active": true, "name": [{"family": "Careful", "given": ["Adam"], "prefix": ["Dr"]}], "address": [{"use": "home", "line": ["534 Erewhon St"], "city": "PleasantVille", "state": "Vic", "postalCode": "3999"}], "qualification": [{"identifier": [{"system": "http://example.org/UniversityIdentifier", "value": "12345"}], "code": {"coding": [{"system": "http://terminology.hl7.org/CodeSystem/v2-0360/2.7", "code": "BS", "display": "Bachelor of Science"}], "text": "Bachelor of Science"}, "period": {"start": "1995"}, "issuer": {"display": "Example University"}}]}

error: Assert failure
--> tests_failed/error_format_long/error_format_long.hurl:34:0
|
| GET http://localhost:8000/error-format-long/fhir
| ...
34 | jsonpath "$.id" == "foo"
| actual: string <example>
| expected: string <foo>
|

* Request can be run with the following curl command:
* curl 'http://localhost:8000/error-format-long/csv'

HTTP/1.1 200
Content-Length: 726
Content-Type: text/csv; charset=utf-8
Date: <<<.*?>>>
Server: Flask Server
Via: waitress

"Year","Score","Title"
1968,86,"Greetings"
1970,17,"Bloody Mama"
1970,73,"Hi, Mom!"
1971,40,"Born to Win"
1973,98,"Mean Streets"
1973,88,"Bang the Drum Slowly"
1974,97,"The Godfather, Part II"
1976,41,"The Last Tycoon"
1976,99,"Taxi Driver"
1977,47,"1900"
1977,67,"New York, New York"
1978,93,"The Deer Hunter"
1980,97,"Raging Bull"
1981,75,"True Confessions"
1983,90,"The King of Comedy"
1984,89,"Once Upon a Time in America"
1984,60,"Falling in Love"
1985,98,"Brazil"
1986,65,"The Mission"
1987,00,"Dear America: Letters Home From Vietnam"
1987,80,"The Untouchables"
1987,78,"Angel Heart"
1988,96,"Midnight Run"
1989,64,"Jacknife"
1989,47,"We're No Angels"
1990,88,"Awakenings"
1990,29,"Stanley & Iris"
1990,96,"Goodfellas"


error: Assert failure
--> tests_failed/error_format_long/error_format_long.hurl:42:0
|
| GET http://localhost:8000/error-format-long/csv
| ...
42 | body split "\n" nth 9 split "," nth 2 == "\"Taxi\""
| actual: string <"Taxi Driver">
| expected: string <"Taxi">
|

* Request can be run with the following curl command:
* curl 'http://localhost:8000/error-format-long/bytes'

HTTP/1.1 200
Content-Length: 4
Content-Type: application/octet-stream
Date: <<<.*?>>>
Server: Flask Server
Via: waitress

Bytes <deadbeef...>

error: Assert failure
--> tests_failed/error_format_long/error_format_long.hurl:50:0
|
| GET http://localhost:8000/error-format-long/bytes
| ...
50 | bytes == hex,beef;
| actual: bytes <deadbeef>
| expected: bytes <beef>
|

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Set-StrictMode -Version latest
$ErrorActionPreference = 'Stop'

$env:HURL_ERROR_FORMAT = 'long'
hurl --continue-on-error tests_failed/error_format_long/error_format_long.hurl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -Eeuo pipefail

export HURL_ERROR_FORMAT=long
hurl --continue-on-error tests_failed/error_format_long/error_format_long.hurl
Loading
Loading