jeudi 4 octobre 2018

Beginner: How to test an API with Siege?

I'm pretty new to siege and performance testing in general. My goal is to send a bulk load of POST requests (up to 3000/s) to a local machine with Siege. I already tested it with Jmeter, but was slightly disappointed by it's performance. I found out SIEG might be more powerful in it's peak performance so here we go. This is the request i want to test:

POST http://172.21.252.20:8080/services/rest/fle/reservation/10010 HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/json
Authorization: Basic xy
Host: xy:8080
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

    {
        "lifetime": 60,
        "type": "COMPLETE",
        "items": [
            {
                "id": "314625287504080",
                "qty": 1
            }

        ]
    }

As far as i understand, i have to configure my URL File which looks like that:

http://172.21.252.20:8080/services/rest/fle/reservation/10010 POST </home/SiegeTest 

My test file contains all of the request except the first line. I also did some changes in the SIEGERC, in order to limit the client number and request count. (I got a machine with 55 Cores and don't want to set everything on fire) I'm also using gmethod = HEAD

my question is, how do i run my test configuration from the SiegeRC and Url file at the same moment? I tried almost every command but nothing seems to work. Or have i done a misstake? Please note, i do not have a strong technical background.

Thank you!

Aucun commentaire:

Enregistrer un commentaire