On Load testing

A short intro about load testing with the remarkable tool that is Gatling.

whois

% IANA WHOIS server
% for more information on IANA, visit http://www.iana.org
% This query returned 1 object

 

domain: vcz.fr

status: ACTIVE

hold: TIGHT

press: ➡️ TO CONTINUE

What is

Testing?

Probably you now

Oh no, here he goes about tests again 😭

credits: Unsplash

What it is

Ensuring, at different stages, that the service you are building, operates how you intended.

 

how: behaviors under extreme inputs, feature implementation, project architecture, dependencies, security, interactions between services, performance, error recoverability, etc.

What you get

Less deployment failures, development hell / churn / cost, quality issues, time to market, reputational damage.

 

Better deployment frequency, healthier teams, project durability / profitability.

The Test Pyramid

credits: Mike Cohn

More expensive

Faster

Other types of tests?!

My code WORKS!!

Yes, but does it work well?

A well-developed application may still be subject to security, performance, architectural, resilience, cost, etc. issues.

You can of course follow logs, metrics, traces and KPIs after the fact but what if you shorten the cycle?

Today, we are interested in

Load Testing

But the other ones are cool too!

What is
Load

Testing?

Behaviors

How each individual will use my service? Different user groups, profiles, personas have different impacts on our systems.

Crowd effects

How a large population of individuals can impact our systems? What happens when they focus on a page and when they disperse? What effect did load on a page have on the others?

The anatomy of a Load Test

The anatomy of a Load Test (bis)

Request

VU

(Virtual User)

Scenario

+ think time

Open model

Inject a given number of VUs per unit of time.

No negative feedback: application will receive load at the same rate even if down.

Suited for pushing queue-based systems.

Closed model

Maintain a given number of active VU.

Negative feedback: application slows down, VUs complete slower.


Suited for pushing interactive systems.

There are different types of Load Tests!

  • Stress tests: reach limits to find bottlenecks
  • Benchmarks: evaluate relative performance
  • Soak tests: evaluate capacity over long periods of time
  • Spike testing: check reactions to sudden load peaks
  • Scalability testing: validate horizontal and vertical scaling
  • Configuration testing: A/B test configuration changes

Check this out!

Ok, we're done with this

What
about

Gatling?

Founded in 2012 in France 🐓

Open source and Enterprise

Heavy-weight of Load Testing

IDE plugins, protocol-agnostic, recorder, HTML reports, etc.

To get started

Good to know

  • Handles the load testing
  • You take care of the logic
  • I hope you love Scala or Java
  • Pretty easy to run and automate
  • Do not push too far if local machine

I want to scale my tests!

Synchronize the following commands:

  1. Start as many injectors as you need;
  2. Configure your scripts and classes;
  3. Start in "no report" mode;
  4. Retrieve all simulation logs;
  5. Generate the final report.

👋