Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abhisheksoni27/wilson
Quickly write tests for APIs using JSON configs
https://github.com/abhisheksoni27/wilson
api golang json no-code testing
Last synced: 9 days ago
JSON representation
Quickly write tests for APIs using JSON configs
- Host: GitHub
- URL: https://github.com/abhisheksoni27/wilson
- Owner: abhisheksoni27
- Created: 2021-02-12T14:33:50.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-13T13:55:06.000Z (almost 4 years ago)
- Last Synced: 2024-06-20T06:32:01.158Z (7 months ago)
- Topics: api, golang, json, no-code, testing
- Language: Go
- Homepage:
- Size: 18.6 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wilson
**wilson** - quickly write tests for APIs using JSON configsIf you want to quickly write tests for your APIs and, then `wilson` is the tool for you.
Defining what your APIs do on different inputs shouldn't be that hard. All it takes is some info about the parameters, or request body, and what to expect in the response (along with data types).
Here's an example `wilson` config for the `https://www.thecolorapi.com/id`
```
[
{
"url": "https://www.thecolorapi.com/id",
"type_of_request": "get",
"expected_status_code": 200,
"request_params": {
"hex": "00ff00"
},
"expected_response": {
"hex": {
"value": "String",
"clean": "String"
}
}
}
]```
# Installation
```
go get github.com/abhisheksoni27/wilson
```This will install the `wilson` command in your `GOBIN`
# Usage
wilson [command]### Available Commands
`help` Help about any command
`run` run all tests in config directory### The run command
run all tests in config directory**Usage:**
```
wilson run [flags]
```**Flags:**
`-c, --config` **string** _config directory (default is $HOME/.wilson/)_
`-m, --max-tests-at-a-time` **int** _max-tests-at-a-time number of tests to run in parallel (default 4)_