Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asaf/gojet
GoJet - a CLI tool to automate HTTP APIs testing with simple yet powerful YAML-based playbook, written in golang.
https://github.com/asaf/gojet
acceptance-testing go golang integration-testing rest rest-api restapi restful restful-api test-automation test-framework testing testing-framework testing-tools yaml-configuration
Last synced: 3 days ago
JSON representation
GoJet - a CLI tool to automate HTTP APIs testing with simple yet powerful YAML-based playbook, written in golang.
- Host: GitHub
- URL: https://github.com/asaf/gojet
- Owner: asaf
- License: apache-2.0
- Created: 2018-08-05T12:24:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-08T13:49:24.000Z (over 6 years ago)
- Last Synced: 2024-06-20T08:20:40.758Z (6 months ago)
- Topics: acceptance-testing, go, golang, integration-testing, rest, rest-api, restapi, restful, restful-api, test-automation, test-framework, testing, testing-framework, testing-tools, yaml-configuration
- Language: Go
- Homepage:
- Size: 64.5 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GoJet
[![Build Status](https://travis-ci.com/asaf/gojet.svg?branch=master)](https://travis-ci.com/asaf/gojet)
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 possible be written by automation / QA teams.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 that
suites our native stack, the result is GoJet.![crud.gif](https://media.corilla.com/gojet/crud.gif)
# Quickstart
A playbook is a composition of stages where each stage represents an http test,
Here is a single stage playbook that performs an http _GET_ request for a blog post and asserts that the returned
status code is _200_:```yml
name: "test blog REST API"
stages:
- name: "get a post 1"
request:
url: "https://jsonplaceholder.typicode.com/posts/1"
method: GET
response:
code: 200
```_gojet_ is a single binary, distributed under the [release page](https://github.com/asaf/gojet/releases)
simply run a playbook by: `gojet playbook run --file .yml`
output example:
```bash
playing simplest playbook
stage get a post
[SUCCESS: 200 OK] status
```For more info see [documentation](http://gojet.corilla.io/Documentation.html)