All Projects → aatarasoff → apistress

aatarasoff / apistress

Licence: MIT license
Very simple stress testing tool for API

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to apistress

eat
Json based scenario testing tool(which can have test for functional and non-functional)
Stars: ✭ 41 (+86.36%)
Mutual labels:  test, load-testing, stress-testing
jagtester
Express server load tester with middleware level data reporting
Stars: ✭ 57 (+159.09%)
Mutual labels:  load-testing, stress-testing
jmeter-grpc-plugin
A JMeter plugin supports load test gRPC
Stars: ✭ 36 (+63.64%)
Mutual labels:  load-testing, stress-testing
ab-go
apache ab testing tool port in golang
Stars: ✭ 20 (-9.09%)
Mutual labels:  load-testing, stress-testing
locust-docker
Docker image for the Locust load testing tool and sample Kubernetes configuration files for distributed deployment.
Stars: ✭ 17 (-22.73%)
Mutual labels:  load-testing, stress-testing
StressThing
a software testing platform to perform stress test on web of things
Stars: ✭ 12 (-45.45%)
Mutual labels:  load-testing, stress-testing
load-testing-toolkit
Collection of open-source tools for debugging, benchmarking, load and stress testing your code or services.
Stars: ✭ 65 (+195.45%)
Mutual labels:  load-testing, stress-testing
LoadRunner
Load-testing framework for writing load/stress test scenarios in c#
Stars: ✭ 18 (-18.18%)
Mutual labels:  load-testing, stress-testing
Tcpcopy
An online request replication tool, also a tcp stream replay tool, fit for real testing, performance testing, stability testing, stress testing, load testing, smoke testing, etc
Stars: ✭ 4,028 (+18209.09%)
Mutual labels:  load-testing, stress-testing
Orion-Stress-Tester
A simple, efficient and accurate stress tester, support HTTP, WebSocket and TCP
Stars: ✭ 32 (+45.45%)
Mutual labels:  test, stress-testing
k6-action
k6 is now available as a GitHub Action
Stars: ✭ 64 (+190.91%)
Mutual labels:  load-testing
hurl
http(s)+h2 server load tester
Stars: ✭ 143 (+550%)
Mutual labels:  load-testing
Betterer
betterer makes it easier to make incremental improvements to your codebase
Stars: ✭ 248 (+1027.27%)
Mutual labels:  test
api-with-express
🌈 API with Express
Stars: ✭ 25 (+13.64%)
Mutual labels:  test
Links-QA
Сборная солянка полезных ссылок для QA/тестировщика. Ссылки будут постоянно пополняться.
Stars: ✭ 42 (+90.91%)
Mutual labels:  stress-testing
7182
Curso 7182 - Refatorando para testes de unidade
Stars: ✭ 21 (-4.55%)
Mutual labels:  test
Opentest
Open source test automation tool for web applications, mobile apps and APIs
Stars: ✭ 246 (+1018.18%)
Mutual labels:  test
Vuex Mock Store
✅Simple and straightforward Vuex Store mock for vue-test-utils
Stars: ✭ 246 (+1018.18%)
Mutual labels:  test
SwiftParamTest
Parameterized test for Swift
Stars: ✭ 56 (+154.55%)
Mutual labels:  test
iter8
Kubernetes release optimizer
Stars: ✭ 217 (+886.36%)
Mutual labels:  load-testing

apistress

Go Report Card

This is very simple stress testing tool for API based on vegeta

Motivation

Sometimes you want to check SLA of your API automatically. There are many tools for profiling or stressing your software, but all of them have the enormous complexity or analyze results by third party tools. This project helps you do it easy and in a straightforward way. One configuration file with a simple structure is needed. In configuration file you need to declare the target, attack time, request frequency and (this is the most important part) SLA for target service (99th latency percentile and percentage of successful requests). And if any test is failed, the program will print report and exit with error code. It gives simple integration with different continuous delivery tools.

Usage

Create file with name config.json and folowing structure:

{
  "baseUrl": "http://localhost:8080",               //base url for targets
  "tests": [                                        //array of tests
    {
      "rps": 100,                                   //target request per second
      "duration": 1,                                //test duration
      "target": {
        "method": "POST",                           //http method for target url
        "path": "/test",                            //relative path
        "headers": [                                //optional
          {
            "name": "X-Request-Id",                 //http header name
            "value": "12345"                        //http header value
          }
        ],
        "body": "ewoic2F5IiA6ICJoZWxsbyIKfQ=="      //base64 endoded request body (optional)
      },
      "sla": {
        "latency": 150,                             //99 percenitle latency
        "successRate": 99.9                         //percentage of successful requests (2xx http code is returned)
      }
    }
  ]
}

Then run docker container:

docker run --rm --net=host \
   -v /path/to/folder/with/config:/data \
   aatarasoff/apistress

or with overriden baseUrl config property:

docker run --rm --net=host \
   -v /path/to/folder/with/config:/data \
   aatarasoff/apistress apistress \
   -baseUrl http://custom.server:8080

If stdin input is required, use -config=stdin flag:

cat config.json | docker run --rm --net=host \
   aatarasoff/apistress apistress \
   -config=stdin

Also it is possible to define own config file name and path:

docker run --rm --net=host \
   -v /path/to/folder/with/config:/data \
   aatarasoff/apistress apistress \
   -config=/path/to/folder/with/config/filename.json

For each test program prints metrics into stdout:

Requests      [total, rate]            10, 11.11
Duration      [total, attack, wait]    1.007898226s, 899.953255ms, 107.944971ms
Latencies     [mean, 50, 95, 99, max]  108.246432ms, 107.608893ms, 109.534083ms, 109.534083ms, 112.276495ms
Bytes In      [total, mean]            5750, 575.00
Bytes Out     [total, mean]            0, 0.00
Success       [ratio]                  100.00%
Status Codes  [code:count]             200:10
Error Set:

and returns exit code that you may check with following command:

echo $?       //0 - ok, 1 - sla error

Usage without Docker or developing

You need install and setup golang 1.6 or above with following instructions. Then run:

go get
go install github.com/aatarasoff/apistress
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].