Skip to main content
Module

x/tepi/docs/started.md

A .http Test Runner
Go to Latest
File

TEPI

– HTTP Test Runner –

https://tepi.deno.dev

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:

Example 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.