An Introduction To Load Testing Tools

Monday, February 18, 2019


It's been a while. Almost a month and a half. I've been very busy in all aspects of my life. I wanted to take a moment to write about something that I've always been curious about, but never really had a need to figure out. This thing, has been coming up in conversations at work. So, I decided I wanted to delve into a bit, since I've always been curious about it anyway. What am I talking about? Load testing.

What do you mean by load testing?

I mean using a toolkit to simulate a high load of usage and seeing how an application handles that and if it can actually handle that. It's pretty much being a jerk to an application and then stopping when you bring it to its knees. Well, actually the testing won't even stop in that case. It'll keep going even if your app is throwing a bunch of errors, because you've practically killed it.

That sounds a little mean and a little violent, but go on.

Well, I used some Google Fu to find out what tools would be good to use for my use case, which was simple. I needed to load test an app that uses socket.io with the "best" load testing tool known to the universe. This led me to Artillery, which has first-class support for load testing socket.io. I followed the docs and did a basic test, which was pretty easy to do and pretty cool. Then I did the socket.io test, which you can test against the socket.io chat example that socket.io provides you. I already had it ready to go, so that didn't take long. It all seemed to be relatively quick to understand and set up. I tested the example chat server locally and I started to see it generate errors as the load started climbing. It generates a report as it's testing, and then a final report. It's simple and gets the job done (for me at least).

So you're a load testing expert now?

No. Although I have to say, I feel like Artillery was really good, but didn't fall into the "best" category for load testing kits according to the general Internet populace. So, I was thinking to myself, why do I feel this way? Maybe, I just don't know any better. So, I did some more research without the need to test socket.io and I came up with Gatling and k6. I just browsed the docs quickly, but Gatling seemed like it would take some effort to get it set up, because it covered all your bases and has some pretty advanced functionality. k6 seemed a bit more friendlier, but like I said, I didn't spend much time. So, am I naive about liking Artillery? I don't think so, they made it so easy to get up and running and allowed me to get a feel for what load testing is about and to have something to compare other toolkits with. I still want to test my demo azure apps and see them fail, but I just have to check and make sure that I don't get charged some obscene fees for doing that. I also want to test stuff at work, so I can see how this plays out in a real setting. Having said that, this initial step opened my eyes a bit to different load testing tools and testing scenarios that I never really thought about. Artillery played a big part in that, because I could have been stuck reading documentation and not tested anything.

Anything else?

I'll probably just look into Gatling and k6 to see how it compares to Artillery. I'm hoping k6 turns out to be the best for my situation, because it's not as violent sounding.


More Posts