gojet

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2018 License: Apache-2.0

README

GoJet

Build Status

GoJet is a CLI tool to automate testing of HTTP APIs, written in Golang.

While unit tests aims to test internal functions and written by developers, acceptance / integration tests aims to test high level API and can be written by QA.

GoJet can run as a part of CICD pipeline as one would do with standard unit tests.

We struggled finding a descriptive approach to write integration tests for our RESTful API, the result is GoJet.

Playbook

A playbook is a composition of stages where each stage represents an http test,

here is a simple playbook with single stage that perform GET http request to get a blog post:

name: "simplest playbook"
stages:
- name: "get a post"
  request:
    url: "https://jsonplaceholder.typicode.com/posts/1"

to run a playbook simply run: gojet playbook run --file <file>.yml

output example:

playing simplest playbook
stage get a post
[SUCCESS: 200 OK] status 

explanation:

  • GET http request is submitted (as no custom method was specified) to the specified url
  • Default status assertion expects status code to be 200 OK

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL