Skip to content

Commit

Permalink
Add 4.0.0 announcement. (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcamiel authored Jun 29, 2023
1 parent 1d505e9 commit e049e37
Show file tree
Hide file tree
Showing 23 changed files with 130 additions and 58 deletions.
2 changes: 1 addition & 1 deletion sites/build_home_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def make_home_samples():
# Pull job status until it is completed
GET https://api.example.org/jobs/{{job_id}}
[Options]
retry: true
retry: 10 # maximum number of retry, -1 for unlimited
HTTP 200
[Asserts]
Expand Down
3 changes: 2 additions & 1 deletion sites/hurl.dev/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ collections:
output: true
highlighter: none
kramdown:
gfm_quirks: [no_auto_typographic]
gfm_quirks: [no_auto_typographic]
future: false
1 change: 1 addition & 0 deletions sites/hurl.dev/_data/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@
- title: count
- title: daysAfterNow
- title: daysBeforeNow
- title: decode
- title: format
- title: htmlEscape
- title: htmlUnescape
Expand Down
5 changes: 2 additions & 3 deletions sites/hurl.dev/_docs/entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ HTTP 200
Every entry can be retried upon asserts, captures or runtime errors. Retries allow polling scenarios and effective runs
under flaky conditions. Asserts can be explicit (with an [`[Asserts]` section][asserts]), or implicit (like [headers] or [status code]).

Retries can be set globally for every request (see [`--retry`], [`--retry-interval`] and [`--retry-max-count`] options),
Retries can be set globally for every request (see [`--retry`] and [`--retry-interval`]),
or activated on a particular request with an [`[Options]` section][options].

For example, in this Hurl file, first we create a new job, then we poll the new job until it's completed:
Expand All @@ -142,7 +142,7 @@ jsonpath "$.state" == "RUNNING"
# Pull job status until it is completed
GET http://api.example.org/jobs/{{job_id}}
[Options]
retry: true
retry: 10 # maximum number of retry, -1 for unlimited
HTTP 200
[Asserts]
Expand All @@ -168,4 +168,3 @@ jsonpath "$.state" == "COMPLETED"
[Asserts]: {% link _docs/response.md %}#asserts
[`--retry`]: {% link _docs/manual.md %}#retry
[`--retry-interval`]: {% link _docs/manual.md %}#retry-interval
[`--retry-max-count`]: {% link _docs/manual.md %}#retry-max-count
16 changes: 16 additions & 0 deletions sites/hurl.dev/_docs/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,22 @@ HTTP 200
certificate "Start-Date" daysBeforeNow < 100
```

### decode

Decode bytes to string using encoding.

```hurl
# The 'Content-Type' HTTP response header does not precise the charset 'gb2312'
# so body must be decoded explicitly by Hurl before processing any text based assert
GET https://exapple.org/hello_china
HTTP 200
[Asserts]
header "Content-Type" == "text/html"
# Content-Type has no encoding clue, we must decode ourselves the body response.
bytes decode "gb2312" xpath "string(//body)" == "你好世界"
```

### format

Formats a date to a string given [a specification format].
Expand Down
48 changes: 21 additions & 27 deletions sites/hurl.dev/_docs/grammar.md

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions sites/hurl.dev/_docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ section: Getting Started

### Linux

Precompiled binary is available at [hurl-3.0.1-x86_64-linux.tar.gz]:
Precompiled binary is available at [hurl-4.0.0-x86_64-linux.tar.gz]:

```shell
$ INSTALL_DIR=/tmp
$ curl -silent --location https://github.com/Orange-OpenSource/hurl/releases/download/3.0.1/hurl-3.0.1-x86_64-linux.tar.gz | tar xvz -C $INSTALL_DIR
$ export PATH=$INSTALL_DIR/hurl-3.0.1:$PATH
$ curl -silent --location https://github.com/Orange-OpenSource/hurl/releases/download/4.0.0/hurl-4.0.0-x86_64-linux.tar.gz | tar xvz -C $INSTALL_DIR
$ export PATH=$INSTALL_DIR/hurl-4.0.0:$PATH
```

#### Debian / Ubuntu

For Debian / Ubuntu, Hurl can be installed using a binary .deb file provided in each Hurl release.

```shell
$ curl --location --remote-name https://github.com/Orange-OpenSource/hurl/releases/download/3.0.1/hurl_3.0.1_amd64.deb
$ sudo apt update && apt install ./hurl_3.0.1_amd64.deb
$ curl --location --remote-name https://github.com/Orange-OpenSource/hurl/releases/download/4.0.0/hurl_4.0.0_amd64.deb
$ sudo apt update && apt install ./hurl_4.0.0_amd64.deb
```

#### Arch Linux / Manjaro
Expand All @@ -38,7 +38,7 @@ $ sudo apt update && apt install ./hurl_3.0.1_amd64.deb

### macOS

Precompiled binary is available at [hurl-3.0.1-x86_64-macos.tar.gz] for x86 CPUs and [hurl-3.0.1-arm64-macos.tar.gz] for ARM CPUS.
Precompiled binary is available at [hurl-4.0.0-x86_64-macos.tar.gz] for x86 CPUs and [hurl-4.0.0-arm64-macos.tar.gz] for ARM CPUS.

#### Homebrew

Expand All @@ -62,11 +62,11 @@ $ sudo pkg install hurl

#### Zip File

Hurl can be installed from a standalone zip file [hurl-3.0.1-win64.zip]. You will need to update your `PATH` variable.
Hurl can be installed from a standalone zip file [hurl-4.0.0-win64.zip]. You will need to update your `PATH` variable.

#### Installer

An installer [hurl-3.0.1-win64-installer.exe] is also available.
An installer [hurl-4.0.0-win64-installer.exe] is also available.

#### Chocolatey

Expand Down Expand Up @@ -164,11 +164,11 @@ Please follow the [contrib on Windows section].


[GitHub]: https://github.com/Orange-OpenSource/hurl
[hurl-3.0.1-win64.zip]: https://github.com/Orange-OpenSource/hurl/releases/download/3.0.1/hurl-3.0.1-win64.zip
[hurl-3.0.1-win64-installer.exe]: https://github.com/Orange-OpenSource/hurl/releases/download/3.0.1/hurl-3.0.1-win64-installer.exe
[hurl-3.0.1-x86_64-macos.tar.gz]: https://github.com/Orange-OpenSource/hurl/releases/download/3.0.1/hurl-3.0.1-x86_64-macos.tar.gz
[hurl-3.0.1-arm64-macos.tar.gz]: https://github.com/Orange-OpenSource/hurl/releases/download/3.0.1/hurl-3.0.1-arm64-macos.tar.gz
[hurl-3.0.1-x86_64-linux.tar.gz]: https://github.com/Orange-OpenSource/hurl/releases/download/3.0.1/hurl-3.0.1-x86_64-linux.tar.gz
[hurl-4.0.0-win64.zip]: https://github.com/Orange-OpenSource/hurl/releases/download/4.0.0/hurl-4.0.0-win64.zip
[hurl-4.0.0-win64-installer.exe]: https://github.com/Orange-OpenSource/hurl/releases/download/4.0.0/hurl-4.0.0-win64-installer.exe
[hurl-4.0.0-x86_64-macos.tar.gz]: https://github.com/Orange-OpenSource/hurl/releases/download/4.0.0/hurl-4.0.0-x86_64-macos.tar.gz
[hurl-4.0.0-arm64-macos.tar.gz]: https://github.com/Orange-OpenSource/hurl/releases/download/4.0.0/hurl-4.0.0-arm64-macos.tar.gz
[hurl-4.0.0-x86_64-linux.tar.gz]: https://github.com/Orange-OpenSource/hurl/releases/download/4.0.0/hurl-4.0.0-x86_64-linux.tar.gz
[AUR]: https://wiki.archlinux.org/index.php/Arch_User_Repository
[`hurl-bin` package]: https://aur.archlinux.org/packages/hurl-bin/
[install]: https://www.rust-lang.org/tools/install
Expand Down
5 changes: 3 additions & 2 deletions sites/hurl.dev/_docs/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ will follow a redirection only for the second entry.
| <a href="#connect-to" id="connect-to"><code>--connect-to &lt;HOST1:PORT1:HOST2:PORT2&gt;</code></a> | For a request to the given HOST1:PORT1 pair, connect to HOST2:PORT2 instead. This option can be used several times in a command line.<br><br>See also [`--resolve`](#resolve).<br> |
| <a href="#cookie" id="cookie"><code>-b, --cookie &lt;FILE&gt;</code></a> | Read cookies from FILE (using the Netscape cookie file format).<br><br>Combined with [`-c, --cookie-jar`](#cookie-jar), you can simulate a cookie storage between successive Hurl runs.<br> |
| <a href="#cookie-jar" id="cookie-jar"><code>-c, --cookie-jar &lt;FILE&gt;</code></a> | Write cookies to FILE after running the session (only for one session).<br>The file will be written using the Netscape cookie file format.<br><br>Combined with [`-b, --cookie`](#cookie), you can simulate a cookie storage between successive Hurl runs.<br> |
| <a href="#error-format" id="error-format"><code>--error-format &lt;FORMAT&gt;</code></a> | Control the format of error message (short by default or long)<br> |
| <a href="#fail-at-end" id="fail-at-end"><code>--fail-at-end</code></a> | Continue executing requests to the end of the Hurl file even when an assert error occurs.<br>By default, Hurl exits after an assert error in the HTTP response.<br><br>Note that this option does not affect the behavior with multiple input Hurl files.<br><br>All the input files are executed independently. The result of one file does not affect the execution of the other Hurl files.<br> |
| <a href="#file-root" id="file-root"><code>--file-root &lt;DIR&gt;</code></a> | Set root file system to import files in Hurl. This is used for both files in multipart form data and request body.<br>When this is not explicitly defined, the files are relative to the current directory in which Hurl is running.<br> |
| <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> |
Expand All @@ -181,13 +182,13 @@ will follow a redirection only for the second entry.
| <a href="#no-output" id="no-output"><code>--no-output</code></a> | Suppress output. By default, Hurl outputs the body of the last response.<br> |
| <a href="#noproxy" id="noproxy"><code>--noproxy &lt;HOST(S)&gt;</code></a> | Comma-separated list of hosts which do not use a proxy.<br>Override value from Environment variable no_proxy.<br> |
| <a href="#output" id="output"><code>-o, --output &lt;FILE&gt;</code></a> | Write output to FILE instead of stdout.<br> |
| <a href="#path-as-is" id="path-as-is"><code>--path-as-is</code></a> | Tell Hurl to not handle sequences of /../ or /./ in the given URL path. Normally Hurl will squash or merge them according to standards but with this option set you tell it not to do that.<br> |
| <a href="#proxy" id="proxy"><code>-x, --proxy &lt;[PROTOCOL://]HOST[:PORT]&gt;</code></a> | Use the specified proxy.<br> |
| <a href="#report-junit" id="report-junit"><code>--report-junit &lt;FILE&gt;</code></a> | Generate JUnit File.<br><br>If the FILE report already exists, it will be updated with the new test results.<br> |
| <a href="#report-html" id="report-html"><code>--report-html &lt;DIR&gt;</code></a> | Generate HTML report in DIR.<br><br>If the HTML report already exists, it will be updated with the new test results.<br> |
| <a href="#resolve" id="resolve"><code>--resolve &lt;HOST:PORT:ADDR&gt;</code></a> | Provide a custom address for a specific host and port pair. Using this, you can make the Hurl requests(s) use a specified address and prevent the otherwise normally resolved address to be used. Consider it a sort of /etc/hosts alternative provided on the command line.<br> |
| <a href="#retry" id="retry"><code>--retry</code></a> | Retry requests if any error occurs (asserts, captures, runtimes etc...).<br> |
| <a href="#retry" id="retry"><code>--retry &lt;NUM&gt;</code></a> | Maximum number of retries, 0 for no retries, -1 for unlimited retries. Retry happens if any error occurs (asserts, captures, runtimes etc...).<br> |
| <a href="#retry-interval" id="retry-interval"><code>--retry-interval &lt;MILLISECONDS&gt;</code></a> | Duration in milliseconds between each retry. Default is 1000 ms.<br> |
| <a href="#retry-max-count" id="retry-max-count"><code>--retry-max-count &lt;NUM&gt;</code></a> | Maximum number of retries. Set this option to -1 to make it unlimited. Default is 10.<br> |
| <a href="#ssl-no-revoke" id="ssl-no-revoke"><code>--ssl-no-revoke</code></a> | (Windows) This option tells Hurl to disable certificate revocation checks. WARNING: this option loosens the SSL security, and by using this flag you ask for exactly that.<br> |
| <a href="#test" id="test"><code>--test</code></a> | Activate test mode: with this, the HTTP response is not outputted anymore, progress is reported for each Hurl file tested, and a text summary is displayed when all files have been run.<br> |
| <a href="#to-entry" id="to-entry"><code>--to-entry &lt;ENTRY_NUMBER&gt;</code></a> | Execute Hurl file to ENTRY_NUMBER (starting at 1).<br>Ignore the remaining of the file. It is useful for debugging a session.<br> |
Expand Down
7 changes: 5 additions & 2 deletions sites/hurl.dev/_docs/request.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,10 @@ User-Agent: My User Agent

### Method

Mandatory HTTP request method, one of `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`,
`TRACE`, `PATCH`, `LINK`, `UNLINK`, `PURGE`, `LOCK`, `UNLOCK`, `PROPFIND`, `VIEW`.
Mandatory HTTP request method, usually one of `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`,
`TRACE` and `PATCH`.

> Other methods can be used like `QUERY` with the constraint of using only uppercase chars.
### URL

Expand Down Expand Up @@ -658,6 +660,7 @@ compressed: true # request a compressed response
insecure: true # allows insecure SSL connections and transfers
location: true # follow redirection for this request
max-redirs: 10 # maximum number of redirections
path-as-is: true # tell curl to not handle sequences of /../ or /./ in the given URL path
variable: country=Italy # define variable country
variable: planet=Earth # define variable planet
verbose: true # allow verbose output
Expand Down
2 changes: 1 addition & 1 deletion sites/hurl.dev/_docs/samples.md
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ jsonpath "$.state" == "RUNNING"
# Pull job status until it is completed
GET https://api.example.org/jobs/{{job_id}}
[Options]
retry: true
retry: 10 # maximum number of retry, -1 for unlimited
HTTP 200
[Asserts]
Expand Down
42 changes: 42 additions & 0 deletions sites/hurl.dev/_drafts/2023-07-01-announcing-hurl-4.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: Announcing Hurl 4.0.0
layout: blog
section: Blog
permalink: /blog/:year/:month/:day/:title.html
---

# {{ page.title }}

- Waterfall in HTML export
- libcurl timings (available also in --very-verbose)
- performance asserts
- Long error format for CI/CD
- decode filter
- minor syntax change
- any custom method QUERY
- deprecated lessThan etc...


We've improved [Hurl HTML report]. The HTLM report is pure HTML, without any JavaScript and with inlined CSS, so it's should be
easy to integrate in your favorite CI/CD solution (like GitLab CI/CD or GItHub aAction for instance). Now, each run produces:

- a __waterfall timeline__: each request/respone is displayed on a beautiful graph, with easy access to response timings (DNS,
TCP handshake, time to first byte etc...). These timings are provided by `libcurl` and you can find an explanation of each
indicator [in the documentation]

<img class="u-drop-shadow u-border" src="{{ '/assets/img/timeline.png' | prepend:site.baseurl }}" width="100%" alt="Requests timeline"/>

- a run log with request and response headers, certificate info etc...

<img class="u-drop-shadow u-border" src="{{ '/assets/img/run.png' | prepend:site.baseurl }}" width="100%" alt="Requests run"/>

- a syntax colored source file with inline errors

<img class="u-drop-shadow u-border" src="{{ '/assets/img/source.png' | prepend:site.baseurl }}" width="100%" alt="Requests source"/>





[Hurl HTML report]: [`--html-report`]: {% link _docs/manual.md %}#html-report
[in the documentation]: {% link _docs/response.md %}#timings
6 changes: 3 additions & 3 deletions sites/hurl.dev/_posts/2022-11-07-announcing-hurl-1.8.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ of the retry option, the `GET` request is going to be retried until `state`'s va
# Pull job status until it is completed
GET https://api.example.org/jobs/{{job_id}}
[Options]
retry: true
retry: 10
HTTP/* 200
[Asserts]
Expand All @@ -93,7 +93,7 @@ jsonpath "$.state" == "RUNNING"
# Pull job status until it is completed
GET https://api.example.org/{{job_id}}
[Options]
retry: true
retry: 10
HTTP/* 200
[Asserts]
Expand All @@ -105,7 +105,7 @@ Retry work on any asserts, whether they're explicit (with an [`[Asserts]` sectio
```hurl
GET https://api.example.org/123456
[Options]
retry: true
retry: 10
retry-interval: 4000
HTTP/* 200
```
Expand Down
6 changes: 3 additions & 3 deletions sites/hurl.dev/_posts/feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ of the retry option, the <code>GET</code> request is going to be retried until <
# Pull job status until it is completed
GET https://api.example.org/jobs/
[Options]
retry: true
retry: 10
HTTP/* 200
[Asserts]
Expand All @@ -706,7 +706,7 @@ jsonpath "$.state" == "RUNNING"
# Pull job status until it is completed
GET https://api.example.org/
[Options]
retry: true
retry: 10
HTTP/* 200
[Asserts]
Expand All @@ -717,7 +717,7 @@ jsonpath "$.state" == "COMPLETED"
<pre><code class="language-hurl">GET https://api.example.org/123456
[Options]
retry: true
retry: 10
retry-interval: 4000
HTTP/* 200
</code></pre>
Expand Down
9 changes: 9 additions & 0 deletions sites/hurl.dev/_sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,15 @@ footer {
margin-top: $m2;
}

.home-html-report {
max-width: 480px;
margin-left: 0;
}

.home-html-report img {
width: 100%;
}

.doc {
display: flex;
padding: 0;
Expand Down
Binary file added sites/hurl.dev/assets/img/home-waterfall-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sites/hurl.dev/assets/img/run.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sites/hurl.dev/assets/img/source.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sites/hurl.dev/assets/img/timeline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sites/hurl.dev/assets/img/waterfall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions sites/hurl.dev/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ SOAPAction: "http://www.w3.org/2003/05/soap-envelope"
HTTP 200
```

Hurl can also be used to performance test HTTP endpoints:
Hurl can also be used to test the <b>performance</b> of HTTP endpoints

```hurl
GET https://example.org/api/v1/pets
Expand All @@ -126,7 +126,7 @@ HTTP 200
duration < 1000 # Duration in ms
```

And response bytes
And check response bytes

```hurl
GET https://example.org/data.tar.gz
Expand All @@ -136,6 +136,12 @@ HTTP 200
sha256 == hex,039058c6f2c0cb492c533b0a4d14ef77cc0f78abccced5287d84a1a2011cfb81;
```

Finally, Hurl is easy to <b>integrate in CI/CD</b>, with text, JUnit and HTML reports

<div class="home-html-report">
<img class="light-img u-drop-shadow u-border" src="{{ '/assets/img/home-waterfall-light.png' | prepend:site.baseurl }}" alt="HTML report"/>
<img class="dark-img u-drop-shadow u-border" src="{{ '/assets/img/home-waterfall-dark.png' | prepend:site.baseurl }}" alt="HTML report"/>
</div>

# Why Hurl?

Expand Down
Binary file modified sites/linux/hurlfmt
Binary file not shown.
Binary file modified sites/macos/hurlfmt
Binary file not shown.

0 comments on commit e049e37

Please sign in to comment.