Fork me on GitHub

schmokin

A wrapper for curl providing chainable assertions to create simple but powerful smoke tests all written in bash

install . . .

use . . .

Simple set of assertions

flag description
--eq equals
--gt greater than
--ge greater than or equals
--lt less than
--le less than or equals
--co contains

Simple set of extractors

flag description
--jq JQ expression
--req-header HTTP Request Header
--res-header HTTP Response Header
--res-body HTTP Response Body
--status HTTP Status

Utilities

flag description
--export Export extracted variable
--debug Show verbose curl output

Simple set of metrics

All the metrics which curl offers with the -w argument are available

--content_type
--filename_effective
--ftp_entry_path
--http_code
--http_connect
--local_ip
--local_port
--num_connects
--num_redirects
--redirect_url
--remote_ip
--remote_port
--size_download
--size_header
--size_request
--size_upload
--speed_download
--speed_upload
--ssl_verify_result
--time_appconnect
--time_connect
--time_namelookup
--time_pretransfer
--time_redirect
--time_starttransfer
--time_total
--url_effective

Uses JQ under the hood for JSON extraction

Shiny output

Adds to existing curl capabilities

Any extra curl arguments can be placed after the -- separator.

Examples

Assert on HTTP status

Equals Assertion

Greater Than Assertion

Greater Than or Equals Assertion

Less Than Assertion

Less Than or Equals Assertion

Range Assertions

Request Header Extractor

Response Header Extractor

Response Body Extractor

JQ Extractor

Export Utility