Video
At Codemotion Amsterdam, Lars Wolff talks about how to introduce and execute load test and performance testing in DevOps teams and how they benefit from regular test practice.
The example test case from the presentation, see below to run it.
// System under Test – the target system you'll generate traffic against
definition.setTarget("testapp.loadtest.party");
// your Load Generator Cluster
definition.setTestOptions({
cluster: { sizing: "preflight", },
});
// user base of 10.000 unique users
// doing a user journey
// in highest hour in a week
var $userBase = 10000;
var $newUserPerSecond = $userBase / 60 / 60;
definition.setArrivalPhases([
// for 5 minutes
// start RATE new clients/users per second
{ duration: 5 * 60, rate: $newUserPerSecond }, // 100%
{ duration: 5 * 60, rate: $newUserPerSecond * 2 }, // 200%
{ duration: 5 * 60, rate: $newUserPerSecond * 3 }, // 300%
{ duration: 5 * 60, rate: $newUserPerSecond * 4 }, // 200%
]);
// the user Journey
definition.session("flower-shop-user-journey", function(session) {
session.get("/flowers", {
tag: "flower-list"
});
session.wait(30); // wait for 30 seconds
var flower = session.ds.generate("random_number", { range: [1000, 9999]});
session.get("/flowers/:flowerId", {
tag: "flower-detail",
params: {
flowerId: flower
}
});
session.wait(30); // wait for 30 seconds
session.post("/flower-cart/add", {
tag: "add-flower-to-cart",
payload: JSON.stringify({
"item": {
"qty": session.ds.generate("random_number", { range: [1, 9]}),
"flower_id": flower
}
})
});
});
Just copy & paste it to app.stormforger.com and start a load test 🙂
And then, you can checkout how to define non-functional requirements.
Happy Load Testing 🙂
Start getting resizing recommendations minutes from now.
Watch An Install
Free trial includes full version on 1 cluster for 30 days!
We use cookies to provide you with a better website experience and to analyze the site traffic. Please read our "privacy policy" for more information.