API Tester is a tool written in golang. It's purpose is to performance test any API.
It exposes prometheus metrics are to be used to analyse APIs performance
- Total requests split by method, code and API endpoint
- Failed requests split by method code and endpoint
- Total journeys split by journey name
- Failed journeys split by name
- Request duration split by different time buckets (0.25, 0.5, 1, 2.5, 5 and 10 seconds)
- Journey duration split by different time buckets (0.25, 0.5, 1, 2.5, 5 and 10 seconds)
api-tester.conf : This is used to specify the following properties:
- destination: This will be used in metric names as a prefix & is for identification purposes.
- auth: auth type for the API. Currently "no_auth", "basic" and "digest" auths are supported
- client_timeout: default 60 seconds. This is the golang HTTP client timeout.
- sleep: number of seconds the API tester waits before repeating the journey set for a user.
- users: the number of users which will execute the journeys concurrently.
- log_level: "debug", "info" and "warn" levels available.
- stats_host: the prometheus metrics server host IP, that will expose these metrics to be collected
- stats_port: the prometheus metrics server host port, that will expose these metrics to be collected
- journeys: the journeys to be executed, see example journey set for schema format.
api-tester-connection.conf: This is used to specify the following properties:
- host: the API host along with port. example: http://foobar.com:8080
- username: username of API
- password: password of API
The following is an example journey set for running against Transport for London (TFL) API
https://github.com/zuburqan/api-tester/blob/master/etc/api-tester.conf.example
brew install go dep
go get github.com/zuburqan/api-tester
cd $GOPATH/src/github.com/zuburqan/api-tester
dep ensure
go run main.go