📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

What is a quality attribute scenario, and how do you turn one into a fitness function that runs in CI?

Mid-Level Theory Intermediate

🎯 Key points

  • Stimulus = the triggering event; environment = conditions; response measure = numeric threshold
  • Response measure must be a number (p95 300 ms, 99.9% availability, 1-day change lead time)
  • Fitness functions: load tests, architecture tests, SLO alerts
  • Load test as a CI/CD stage with pass/fail criteria (Azure Load Testing, k6 thresholds)
  • Architecture tests (NetArchTest, ArchUnitNET) run with the unit tests
  • Revisit scenarios as scale and priorities change; automate only the critical few

⏱ 30-second answer

A quality attribute scenario makes a non-functional requirement testable. It names the stimulus (what happens: 500 search requests a second), the environment (under what conditions: normal peak, one zone down) and the response measure (the number that decides pass or fail: p95 under 300 ms).

A fitness function automates that check so it runs continuously:

  • a load test (Azure Load Testing or k6) run as a pipeline stage in Azure DevOps or GitHub Actions, with a pass/fail criterion like p95(response_time_ms) > 300 that fails the build;
  • an architecture test (NetArchTest, ArchUnitNET) that fails if Payments references Applications;
  • an SLO alert in Application Insights / Azure Monitor for what only production can show.

Scenarios are revisited as load and priorities change. The trade-off: every fitness function costs pipeline time and upkeep, so automate the few attributes that really matter.

🔍 What the interviewer is checking

Checks they can turn vague non-functional requirements into measurable scenarios and automated checks in the pipeline.

Green flags

  • Names all three parts of a scenario and gives a numeric response measure
  • Shows how a load or architecture test fails the CI/CD pipeline
  • Knows some attributes are only checkable in production (SLO alerts)

Red flags

  • "The system should be fast and scalable" with no numbers
  • Checks quality attributes once at design time and never again

↩ Usually asked after

More in Senior-Level Architecture

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me