Course contentsShow
← Software Engineering
Lesson 1248 of 1,93337. Software Architecture FundamentalsFree lesson

Quality Attribute Scenarios

Using structured scenarios (stimulus, response, measure) to make quality requirements concrete and testable.

Quality Attribute Scenarios

You'll learn how to turn vague quality requirements into specific, measurable architecture tests.

The Problem with Vague Requirements

When stakeholders say "the system must be fast" or "it needs to be secure," what do they really mean? Fast for whom, under what conditions? Secure against which threats? Vague quality requirements lead to mismatched expectations and untestable architectures.

What Are Quality Attribute Scenarios?

A Quality Attribute Scenario is a structured, three-part statement that makes quality requirements concrete:

  1. Stimulus: What event or condition triggers this scenario (e.g., "1000 concurrent users attempt login")
  2. Response: How the system should react (e.g., "all requests are authenticated")
  3. Measure: The quantifiable success criteria (e.g., "with 95th percentile latency under 200ms")

Think of it like a scientific experiment: you define the input conditions (stimulus), what should happen (response), and how you'll know if it worked (measure).

Example Scenarios

Performance: "When 5000 users browse the product catalog simultaneously (stimulus), the system serves each request (response) with median latency under 100ms (measure)."

Availability: "When the primary database fails (stimulus), the system switches to standby (response) within 30 seconds with no data loss (measure)."

Security: "When an attacker attempts SQL injection on login (stimulus), the system blocks the request (response) and logs the attempt within 1 second (measure)."

Why This Matters

These scenarios become testable requirements. You can write load tests, simulate failures, or attempt security exploits to verify your architecture actually delivers. They also force stakeholders to clarify their priorities and help you identify trade-offs early.

Key Takeaway: Quality Attribute Scenarios transform fuzzy requirements into testable, measurable architecture specifications using the stimulus-response-measure pattern.