Skill

Generate Artillery Load Testing Scenarios

An Artillery.io load-testing skill for writing realistic multi-phase YAML scenarios that mimic production traffic and expose bottlenecks.


88
Spark score
out of 100
Updated 7 months ago
Version 1.0.0
Models

Add to Favorites

Why it matters

Create sophisticated and realistic load testing scenarios for your applications using the Artillery framework. This asset helps you define complex user journeys, simulate production traffic patterns, and identify performance bottlenecks with precision.

Outcomes

What it gets done

01

Define multi-phase load testing strategies (ramp-up, sustained, spike, ramp-down).

02

Construct advanced user scenarios with conditional logic and data capture.

03

Integrate custom JavaScript processors for dynamic data generation and authentication.

04

Configure environment-specific targets and plugin integrations for enhanced monitoring.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-artillery-scenario | bash

Overview

Artillery Load Testing Scenario Agent

An Artillery.io skill for writing realistic load-test scenarios in YAML, covering weighted multi-scenario user flows, ramp-up/sustained/spike/ramp-down phases, and custom JavaScript processor functions for data generation and authentication. It includes environment-specific configs, plugin-based metrics integration, and error-handling with retry logic. Use it when you need load tests that model real user behavior with weighted, randomized scenarios and think time, not a flat uniform request hammer - and when you need per-system-type load-pattern guidance for APIs, web apps, databases, microservices, or CDNs.

What it does

This skill covers the Artillery.io load-testing framework, specializing in realistic, complex test scenarios that accurately mimic production traffic patterns and expose performance bottlenecks. It organizes tests around a fixed hierarchy - Config (global settings, phases, plugins), Scenarios (individual user-path definitions), Steps (sequential actions within a scenario), and Weight (traffic distribution across scenarios) - and four load phases: ramp-up (gradual user increase to avoid false bottlenecks), sustained (stable load for baseline measurement), spike (sudden traffic bursts to test elasticity), and ramp-down (gradual load decrease). It covers weighted multi-scenario flows (a browse-and-purchase flow with cart and checkout steps, a browse-only loop, and a search-and-filter flow, each with a traffic-share weight), custom processor functions in JavaScript for generating users and authenticating, CSV payload integration for data-driven scenarios, environment-specific configuration (staging versus production targets and phases), plugin integration for metrics (statsd, CloudWatch, and response expectations), connection-pool tuning, rate limiting via arrivalCount and maxVusers, request/response logging hooks, and error-handling processors with retry logic.

When to use - and when NOT to

Use this skill when you need load test scenarios that model real user behavior - weighted user journeys, think-time between steps, and randomized data via functions like randomPick and randomInt - rather than a flat, uniform request hammer. It gives concrete load-pattern recommendations per system type: start APIs at 1-5 RPS and scale to expected peak plus 50%, model 2-10 second think time for web apps, focus database load tests on connection pools and query optimization, test service-to-service interaction patterns for microservices, and test cache hit/miss ratios with varied content for CDN/static assets. It is not a guide to interpreting results in isolation - its own guidance is that P95/P99 response time matters more than averages, error rate should stay under 1% under normal load, and throughput, resource usage, and business metrics like conversion rate all need monitoring alongside the raw request numbers.

Inputs and outputs

config:
  target: 'https://api.example.com'
  phases:
    - duration: 60
      arrivalRate: 5
      name: "Warm up"
    - duration: 300
      arrivalRate: 20
      name: "Sustained load"
    - duration: 60
      arrivalRate: 50
      name: "Spike test"
  processor: './processors.js'
  variables:
    userPoolSize: 1000

Given a target API or application, the skill produces a complete Artillery YAML configuration like the one above, plus weighted scenario flows with capture/think/randomization steps, custom processor.js functions for user generation and auth, CSV-driven payload configs, environment-specific target/phase overrides, plugin blocks for statsd/CloudWatch metrics and response expectations, connection-pool and rate-limiting settings, and logging/error-handling processors with retry logic.

Who it's for

Performance and QA engineers who need load tests that actually resemble production traffic - weighted, realistic user journeys with think time and randomized data - rather than a single flat endpoint hammer. It suits teams testing APIs, web apps, databases, microservices, or CDN-backed static content who want per-system-type load-pattern guidance and a metrics-analysis discipline (P95/P99 over averages, sub-1% error rate, resource and business-metric monitoring) built into the workflow from the start.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.