Quality Requirements
Making Non-Functional Requirements Measurable
A non-functional requirement specifies a required quality of a system or a constraint on its operation or development. You encounter these requirements when a system can provide the requested behaviour but still be too slow, unavailable, difficult to use, or insufficiently protected. The aim is to replace broad expectations with statements whose satisfaction can be assessed.
Specify the quality in context
A statement such as “the service shall be fast” identifies a concern, but leaves important decisions unanswered. Fast for which operation, under what workload, and according to which measurement? A search taking one second might be acceptable for a large archive but unsuitable for an interactive control system.
Non-functional requirements can apply across a system or to a particular operation. They are not necessarily optional, and numerical requirements are not automatically well specified. “Response time shall be below two seconds” still leaves the workload, timing boundaries, and treatment of slow requests uncertain.
The boundary with functional requirements concerns what the statement specifies. Retrieving a booking describes behaviour; limiting how long retrieval takes describes a quality of that behaviour. Some concerns, including security, can require both behaviour and measurable quality constraints.
Make acceptance explicit
An acceptance criterion is a condition used to decide whether a requirement has been satisfied. For a measurable quality target, identify the operation or resource, operating conditions, metric and unit, threshold, and measurement window or test procedure.
Broad expectation | More measurable requirement |
|---|---|
Search should be fast. | During the specified 15-minute test with 400 simultaneous users, at least 98% of completed searches shall finish within 0.8 s, measured from request receipt to response completion at the server. |
The service should be available. | During each calendar month, the service shall be available for at least 99.9% of scheduled service minutes, including maintenance interruptions. |
New users should find booking easy. | In the specified test, at least 18 of 20 first-time participants shall complete a booking within three minutes without assistance. |
These statements still need supporting detail where it affects interpretation. For example, a workload specification can name the request mix, dataset, and network conditions. A usability test needs a defined task and participant selection procedure. Keep the operating conditions attached to the threshold when reporting results.
For a deadline-based response-time requirement, calculate:
Specify eligibility and how failed or unfinished requests are handled. Otherwise, a measurement might appear better simply because difficult requests were omitted.
Interpret the chosen metric
Different metrics answer different questions. An average response time describes the arithmetic mean; it does not directly describe tail latency. A requirement about the proportion finishing before a deadline therefore needs evidence about that proportion.
Example: In the illustrated batch, 80 requests take 0.2 s, 15 take 0.8 s, and five take 3.0 s. The average is (80(0.2)+15(0.8)+5(3.0))/100=0.43 s, while 95% finish within one second. An average below one second does not mean every request finishes within one second.
Availability uses a time-based denominator:
where T is eligible service time and D is downtime within that time. Define the observation period, what counts as unavailable, and whether planned interruptions count before using this equation.
Quality targets can also compete: stronger protection may add processing work, for example. Evaluate the stated targets together under their specified conditions. Passing a test establishes a result within the scope of that evidence; it does not guarantee every future workload will behave identically.
What to remember
- Specify the quality, conditions, metric, threshold, and measurement rule.
- Use the denominator and observation window named in the requirement.
- Distinguish averages, deadline percentages, and availability.
- Judge each required target explicitly rather than trading one result against another.
Example: Acceptance Targets for a Booking Service
Example: A booking service has two non-functional requirements. During a specified 15-minute test with 400 simultaneous users, at least 98% of completed booking searches must finish within 0.8 s. Separately, monthly availability must be at least 99.9% during scheduled opening hours.
In the search test, 10,000 requests complete and 9,700 meet the deadline. There are no failed or unfinished requests, and all specified workload and timing conditions are met.
For the availability measurement, the month contains 20 scheduled service days of 12 hours each. The service is unavailable for 12 minutes during those hours, with no other interruptions. Its eligible service time is the scheduled time included in the availability calculation. All interruptions during scheduled hours count, including maintenance.
a) Does the search test satisfy the response-time requirement?
First, calculate the required timely count from the total number of completed requests:
The minimum required timely count is ________. The permitted number outside the deadline is therefore 10000−9800=200 requests, so the allowed late count is ________.
Next, calculate the observed timely percentage:
The response-time requirement fails: 97.0% is below 98%, and the timely count is 100 requests short. Completing every request does not establish that enough requests completed within the deadline.
b) What is the maximum permitted downtime during the scheduled service hours?
First, convert the eligible service time to minutes:
The eligible service time is ________. Time outside the scheduled hours is excluded by the stated requirement.
Next, convert the availability target to an unavailable fraction. An available fraction of 0.999 permits an unavailable fraction of 1−0.999=0.001.
The maximum permitted downtime is 14.4 minutes. This budget applies to all counted interruptions combined, rather than separately to each interruption.
c) Does the observed availability satisfy its requirement, and does the service meet both requirements? Give availability to three decimal places.
First, subtract the counted downtime from eligible service time:
The available service time is ________. Next, divide by the same eligible-time denominator and convert to a percentage:
The observed availability is 99.917%, so the availability requirement passes. The 12 minutes of downtime also falls below the 14.4-minute allowance, which checks the result.
The service does not meet both requirements because its response-time requirement failed. Passing availability does not offset that separate failure.
A software team is organizing quality requirements for a document editor. Match each quality attribute to the property it addresses.
How well information and operations are protected against unauthorized access or alteration
How consistently the software performs its specified functions under stated conditions over a stated period
How effectively and efficiently the software can be analyzed, modified, and tested by its intended maintainers
How effectively, efficiently, and satisfactorily specified users achieve their goals in a specified context
How effectively and efficiently the software can be transferred between specified operating environments
Security
Usability
Portability
Maintainability
Reliability
A document service requires at least 95% of requests in each test batch to finish within 2.0 s, including requests finishing at exactly 2.0 s. Every request in these batches completes, and all other specified test conditions are met.
Batch A has 200 requests, of which 191 meet the deadline. Batch B has 400 requests, of which 376 meet it. Batch C has 500 requests, of which 480 meet it.
Complete the table with the minimum required timely count as an exact integer and the verdict pass or fail. Assess each batch separately.
| Batch | Minimum timely requests | Verdict |
| A | ||
| B | ||
| C |