An open API service indexing awesome lists of open source software.

https://github.com/kingluo/burl

A simple but flexible HTTP/3 testing framework based on bash and curl
https://github.com/kingluo/burl

api-rest apisix bash curl envoy http3 jq json nginx quic shell-scripting soap test-automation testing-tools xml

Last synced: about 2 months ago
JSON representation

A simple but flexible HTTP/3 testing framework based on bash and curl

Awesome Lists containing this project

README

          

# burl: bash + curl

A simple but flexible HTTP/3 testing framework based on bash and curl.

Check out the blog post for background and design details:

http://luajit.io/posts/a-simple-http3-testing-framework-based-on-bash-and-curl/

## Design

1. The test file contains one or more test cases, and an optional initial part of the file header, such as configuring nginx.conf and starting nginx via template rendering.
2. Each test case consists of three parts:
1. Construct and send the request, and save the response header and response body to files for subsequent steps.
2. Verify the response headers, for example using "grep".
3. Parse and validate the response body, for example with the "jq" expression.
3. **Easily extensible**, you can validate responses (steps ii and iii) using any command or other advanced script, such as Python.
4. **Failure of any command will stop the testing process (enabled via the "set -euo pipefail" bash option).**
5. The test process is echoed by default (enabled via the "set -x" bash option).

## Installation

```bash
curl -s https://raw.githubusercontent.com/kingluo/burl/main/install-burl.sh |bash
```

## Usage

Use shebang (`#!`) or run the burl command:

```
# specify the test files or dirs
# for dir, burl will find the test files recursively under the dir
burl ...

# run burl directly, it will try to find test files in ./t
burl
```

Test case template:

```bash
#!/usr/bin/env burl

# Optional initialization here...
# Before all test cases are executed.
# For example, render nginx.conf and start nginx.
SET NGX_CONF_HTTP <