Skip to content

Commit 93f9a91

Browse files
committed
Update doc for 4.2.0
1 parent bc13b5f commit 93f9a91

File tree

19 files changed

+80
-178
lines changed

19 files changed

+80
-178
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
[4.2.0 (TO BE RELEASED)](https://github.com/Orange-OpenSource/hurl/blob/master/CHANGELOG.md#4.2.0)
1+
[4.2.0 (2024-01-11)](https://github.com/Orange-OpenSource/hurl/blob/master/CHANGELOG.md#4.2.0)
22
========================================================================================================================
33

44
Thanks to
5+
[@hi2code](https://github.com/hi2code),
56
[@lambrospetrou](https://github.com/lambrospetrou),
67
[@glb-cblin](https://github.com/glb-cblin),
78
[@moono](https://github.com/moono),
@@ -44,6 +45,7 @@ Enhancements:
4445

4546
Bugs Fixed:
4647

48+
* Add short name -v for verbose option [#2310](https://github.com/Orange-OpenSource/hurl/issues/2310)
4749
* Fix unicode surrogate pair decoding in JSON request body [#2235](https://github.com/Orange-OpenSource/hurl/issues/2235)
4850
* Better error description for some parse error [#2187](https://github.com/Orange-OpenSource/hurl/issues/2187)
4951
* Fix undefined error for various I/O error using --output. [#2156](https://github.com/Orange-OpenSource/hurl/issues/2156)

README.md

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Hurl makes it easy to work with <b>HTML</b> content, <b>REST / SOAP / GraphQL</b
2121
```hurl
2222
# Get home:
2323
GET https://example.org
24-
2524
HTTP 200
2625
[Captures]
2726
csrf_token: xpath "string(//meta[@name='_csrf_token']/@content)"
@@ -59,7 +58,6 @@ POST https://example.org/api/tests
5958
"id": "4568",
6059
"evaluate": true
6160
}
62-
6361
HTTP 200
6462
[Asserts]
6563
header "X-Frame-Options" == "SAMEORIGIN"
@@ -72,7 +70,6 @@ jsonpath "$.id" matches /\d{4}/ # Check the format of the id
7270

7371
```hurl
7472
GET https://example.org
75-
7673
HTTP 200
7774
[Asserts]
7875
xpath "normalize-space(//head/title)" == "Hello world!"
@@ -115,7 +112,6 @@ Hurl can also be used to test the <b>performance</b> of HTTP endpoints
115112

116113
```hurl
117114
GET https://example.org/api/v1/pets
118-
119115
HTTP 200
120116
[Asserts]
121117
duration < 1000 # Duration in ms
@@ -125,7 +121,6 @@ And check response bytes
125121

126122
```hurl
127123
GET https://example.org/data.tar.gz
128-
129124
HTTP 200
130125
[Asserts]
131126
sha256 == hex,039058c6f2c0cb492c533b0a4d14ef77cc0f78abccced5287d84a1a2011cfb81;
@@ -523,7 +518,6 @@ Use implicit response asserts to test header values:
523518

524519
```hurl
525520
GET https://example.org/index.html
526-
527521
HTTP 200
528522
Set-Cookie: theme=light
529523
Set-Cookie: sessionToken=abc123; Expires=Wed, 09 Jun 2021 10:18:14 GMT
@@ -536,7 +530,6 @@ Or use explicit response asserts with [predicates]:
536530

537531
```hurl
538532
GET https://example.org
539-
540533
HTTP 302
541534
[Asserts]
542535
header "Location" contains "www.example.net"
@@ -552,7 +545,6 @@ Asserting JSON body response (node values, collection count etc...) with [JSONPa
552545
```hurl
553546
GET https://example.org/order
554547
screencapability: low
555-
556548
HTTP 200
557549
[Asserts]
558550
jsonpath "$.validated" == true
@@ -572,15 +564,13 @@ Testing status code:
572564

573565
```hurl
574566
GET https://example.org/order/435
575-
576567
HTTP 200
577568
```
578569

579570
[Doc](https://hurl.dev/docs/asserting-response.html#version-status)
580571

581572
```hurl
582573
GET https://example.org/order/435
583-
584574
# Testing status code is in a 200-300 range
585575
HTTP *
586576
[Asserts]
@@ -595,10 +585,8 @@ status < 300
595585

596586
```hurl
597587
GET https://example.org
598-
599588
HTTP 200
600589
Content-Type: text/html; charset=UTF-8
601-
602590
[Asserts]
603591
xpath "string(/html/head/title)" contains "Example" # Check title
604592
xpath "count(//p)" == 2 # Check the number of p
@@ -614,7 +602,6 @@ xpath "string(//div[1])" matches /Hello.*/
614602

615603
```hurl
616604
GET https://example.org/home
617-
618605
HTTP 200
619606
[Asserts]
620607
cookie "JSESSIONID" == "8400BAFE2F66443613DC38AE3D9D6239"
@@ -633,7 +620,6 @@ Check the SHA-256 response body hash:
633620

634621
```hurl
635622
GET https://example.org/data.tar.gz
636-
637623
HTTP 200
638624
[Asserts]
639625
sha256 == hex,039058c6f2c0cb492c533b0a4d14ef77cc0f78abccced5287d84a1a2011cfb81;
@@ -647,7 +633,6 @@ Check the properties of a SSL certificate:
647633

648634
```hurl
649635
GET https://example.org
650-
651636
HTTP 200
652637
[Asserts]
653638
certificate "Subject" == "CN=example.org"
@@ -679,7 +664,6 @@ Retry request on any errors (asserts, captures, status code, runtime etc...):
679664
```hurl
680665
# Create a new job
681666
POST https://api.example.org/jobs
682-
683667
HTTP 201
684668
[Captures]
685669
job_id: jsonpath "$.id"
@@ -691,7 +675,6 @@ jsonpath "$.state" == "RUNNING"
691675
GET https://api.example.org/jobs/{{job_id}}
692676
[Options]
693677
retry: 10 # maximum number of retry, -1 for unlimited
694-
695678
HTTP 200
696679
[Asserts]
697680
jsonpath "$.state" == "COMPLETED"
@@ -705,7 +688,6 @@ jsonpath "$.state" == "COMPLETED"
705688

706689
```hurl
707690
GET https://sample.org/helloworld
708-
709691
HTTP *
710692
[Asserts]
711693
duration < 1000 # Check that response time is less than one second
@@ -728,7 +710,6 @@ SOAPAction: "http://www.w3.org/2003/05/soap-envelope"
728710
</m:GetStockPrice>
729711
</soap:Body>
730712
</soap:Envelope>
731-
732713
HTTP 200
733714
```
734715

@@ -738,7 +719,6 @@ HTTP 200
738719

739720
```hurl
740721
GET https://example.org
741-
742722
HTTP 200
743723
[Captures]
744724
csrf_token: xpath "string(//meta[@name='_csrf_token']/@content)"
@@ -755,7 +735,6 @@ HTTP 302
755735

756736
```hurl
757737
GET https://example.org/data.bin
758-
759738
HTTP 200
760739
[Asserts]
761740
bytes startsWith hex,efbbbf;
@@ -954,7 +933,7 @@ will follow a redirection only for the second entry.
954933
| <a href="#interactive" id="interactive"><code>--interactive</code></a> | Stop between requests.<br><br>This is similar to a break point, You can then continue (Press C) or quit (Press Q).<br> |
955934
| <a href="#ipv4" id="ipv4"><code>-4, --ipv4</code></a> | This option tells Hurl to use IPv4 addresses only when resolving host names, and not for example try IPv6.<br> |
956935
| <a href="#ipv6" id="ipv6"><code>-6, --ipv6</code></a> | This option tells Hurl to use IPv6 addresses only when resolving host names, and not for example try IPv4.<br> |
957-
| <a href="#json" id="json"><code>--json</code></a> | Output each hurl file result to JSON. The format is very closed to HAR format.<br> |
936+
| <a href="#json" id="json"><code>--json</code></a> | Output each Hurl file result to JSON. The format is very closed to HAR format.<br> |
958937
| <a href="#key" id="key"><code>--key &lt;KEY&gt;</code></a> | Private key file name.<br> |
959938
| <a href="#location" id="location"><code>-L, --location</code></a> | Follow redirect. To limit the amount of redirects to follow use the [`--max-redirs`](#max-redirs) option<br> |
960939
| <a href="#location-trusted" id="location-trusted"><code>--location-trusted</code></a> | Like [`-L, --location`](#location), but allows sending the name + password to all hosts that the site may redirect to.<br>This may or may not introduce a security breach if the site redirects you to a site to which you send your authentication info (which is plaintext in the case of HTTP Basic authentication).<br> |
@@ -980,7 +959,7 @@ will follow a redirection only for the second entry.
980959
| <a href="#user-agent" id="user-agent"><code>-A, --user-agent &lt;NAME&gt;</code></a> | Specify the User-Agent string to send to the HTTP server.<br> |
981960
| <a href="#variable" id="variable"><code>--variable &lt;NAME=VALUE&gt;</code></a> | Define variable (name/value) to be used in Hurl templates.<br> |
982961
| <a href="#variables-file" id="variables-file"><code>--variables-file &lt;FILE&gt;</code></a> | Set properties file in which your define your variables.<br><br>Each variable is defined as name=value exactly as with [`--variable`](#variable) option.<br><br>Note that defining a variable twice produces an error.<br> |
983-
| <a href="#verbose" id="verbose"><code>--verbose</code></a> | Turn on verbose output on standard error stream.<br>Useful for debugging.<br><br>A line starting with '>' means data sent by Hurl.<br>A line staring with '<' means data received by Hurl.<br>A line starting with '*' means additional info provided by Hurl.<br><br>If you only want HTTP headers in the output, [`-i, --include`](#include) might be the option you're looking for.<br> |
962+
| <a href="#verbose" id="verbose"><code>-v, --verbose</code></a> | Turn on verbose output on standard error stream.<br>Useful for debugging.<br><br>A line starting with '>' means data sent by Hurl.<br>A line staring with '<' means data received by Hurl.<br>A line starting with '*' means additional info provided by Hurl.<br><br>If you only want HTTP headers in the output, [`-i, --include`](#include) might be the option you're looking for.<br> |
984963
| <a href="#very-verbose" id="very-verbose"><code>--very-verbose</code></a> | Turn on more verbose output on standard error stream.<br><br>In contrast to [`--verbose`](#verbose) option, this option outputs the full HTTP body request and response on standard error. In addition, lines starting with '**' are libcurl debug logs.<br> |
985964
| <a href="#help" id="help"><code>-h, --help</code></a> | Usage help. This lists all current command line options with a short description.<br> |
986965
| <a href="#version" id="version"><code>-V, --version</code></a> | Prints version information<br> |

0 commit comments

Comments
 (0)