Latest
TEPI
β HTTP Test Runner β
Tepi is a test runner for .http files.
Write your tests in .http files and run them with tepi
.
$ cat test.http
GET http://localhost:3000 # fetch a GET Request
HTTP/1.1 200 OK # assert a 200 OK response
Content-Type: text/plain # assert a text/plain content type header
Hola mundo! # assert a body with the text "Hola mundo!"
$ tepi test.http
Test your HTTP APIs with standard http syntax
Demo:
Features:
- π Write end to end API REST tests in
.http
files - π Validate Response status, headers and/or body.
- π₯ Interpolate javascript with eta template
<%= %>
eta url: - π Write metadata as frontmatter yaml
- π¦ Reference by id another test to run them in advance
- β± Set a timeout for each test or globally in milliseconds. After the timeout, the test will fail.
- π¨ Stop running tests after the first failure.
- π Use env files to load environment variables
- π Fully featured and colorful display modes. (none, minimal, default and full)
- π Watch files for changes and rerun tests.
- π― Standard Response and Request with a automatic getBody()
Install:
deno install --reload --allow-read --allow-env --allow-net --allow-run -f -n tepi https://tepi.deno.dev/src/cli.ts
Or run remotely with:
deno run --allow-read --allow-env --allow-net --allow-run https://tepi.deno.dev/src/cli.ts
Permissions:
--allow-read
Needed to read files from the file system.--allow-net
Needed to make HTTP requests.--allow-env
(optional) Needed to load and read environment variables. Required if you use the βenv-file option.--allow-run
(optional) Required if you use the βupgrade option.