What is an NFR?

On the blog we often write about software requirements analysis. For good reason: it is still an underrated stage of work on an application or IT system, yet an extremely important one, because it makes both the client and the delivery team aware of what they are actually facing. The tangible results of the analysis usually include a document called a software requirements specification, which has many chapters, including those on requirements. And while functional requirements are the core of systems and what people clearly associate with describing software, many people forget (or are not aware) that there is a second type of requirements, which complements functionality and lets it truly shine.

As you may guess, we mean nonfunctional requirements, which are commonly called NFRs, short for Non-Functional Requirements. Unlike functional requirements, which answer the question "what will the system do," these concern "how will the system do it." So here we are interested not in the operations available to the user, but in aspects such as:

  • security.
  • performance.
  • availability.
  • fault tolerance.
  • aesthetics.
  • how well it is documented (readability of the documentation).

And many, many more. Even the most feature-packed application may not succeed if no one takes care of the quality aspects, and we do not mean merely verifying that the returned results are correct. Against the competition, the little things that improve the use of the software also count, the ones that simply make the application a pleasure for the user.

NFRs usually show up in two areas: designing the software architecture and creating mockups and prototypes. They often change the approach even to fundamental matters such as the choice of technology or the whole idea for the interface. That is why it is worth making sure they are gathered (sometimes this happens right while discussing functionality) and asking the client when something is unclear. But we will get to that.

What does a nonfunctional requirement look like?

Functional requirements can be written in several ways: descriptive form, user stories or use cases. For NFRs the matter is, in theory, much simpler: it is usually just one or a few descriptive sentences. Here is an example:

The system forces users to use passwords at least 8 characters long that contain at least one uppercase letter and one digit.

Looks simple, doesn't it? Of course, the devil is in the details. The wording itself is the most important part, but it often is not enough to describe the criteria properly in a specification. A nonfunctional requirement usually also comes with the following attributes:

  • Identifier: most items in a requirements specification should get an identifier, for clarity and so that individual elements can be referred to unambiguously. Nonfunctional requirements are no exception, and they get code names too. In our case it is usually NFRXXX (where "XXX" is the next sequence number), although with a large number of requirements it is worth considering a more elaborate numbering scheme.
  • Category: the requirement relates to a specific domain, that is, a category. We will write more about them below.
  • Priority: the client's expectations of the software can be divided into critical ones, without which there is no point in thinking about building the system, ones that should be met, and ones that would be nice to have, but if they do not happen, so be it. In short, NFRs are also prioritized, usually with the H, M and L levels already discussed for risk analysis.
  • Difficulty: not all requirements are easy to meet, and the client also has to take this into account, mainly for the estimate. So the difficulty attribute (with levels similar to priority) lets us state how complex a given item is, or even indicate that it should be split into smaller elements.
  • Verification description: a good nonfunctional requirement is one that can be verified. The problem is that it is not always clear how to do that, so the method is sometimes outlined in a single sentence. This applies mainly to very formal projects with a high level of detailed documentation.

Of course, this is not a closed list, and usually only some of the attributes end up in the specification. This may depend on how "typical" the project is (when something is understood, it does not have to be spelled out in such detail), on the available budget and schedule, and on the client's expectations.

Categories of nonfunctional requirements

Earlier we mentioned categories, which are in effect nonfunctional areas in which you can look for quality aspects. For some they may be an unnecessary complication, but more experienced analysts will readily point out their advantages. These include:

  • putting requirements gathering in order and minimizing the risk of forgetting an area,
  • supporting the analysis by uncovering aspects that you would not think of at first (a kind of checklist),
  • dividing requirements into sections, which results, for example, in better meeting planning,
  • reducing ambiguity about what a given requirement actually concerns.

A hierarchy of categories set by the ISO 25010 standard is often proposed. It is widely used in the industry to define and assess software quality, and it is also taught at universities, for example at Poznań University of Technology thanks to Dr. Sylwia Kopczyńska, a tireless researcher of nonfunctional requirements. The standard's presence in academia has helped it spread.

Without further ado, there are even three levels of categorization here. The first helps more in deciding which topics to raise with a given person, and of the other two the first is often the one chosen. Still, it is worth knowing the whole hierarchy, because it widens your horizons when analyzing a system before it even exists. Below is the breakdown, described in more detail in the document cited above.

  • Product quality
    • Functional suitability
      • Functional completeness
      • Functional correctness
      • Functional appropriateness
    • Performance efficiency
      • Time behavior
      • Resource utilization
      • Capacity
    • Compatibility
      • Co-existence
      • Interoperability
    • Usability
      • Appropriateness recognizability
      • Learnability
      • Operability
      • User error protection
      • User interface aesthetics
      • Accessibility
    • Reliability
      • Maturity
      • Availability
      • Fault tolerance
      • Recoverability
    • Security
      • Confidentiality
      • Integrity
      • Non-repudiation
      • Accountability
      • Authenticity
    • Maintainability
      • Modularity
      • Reusability
      • Analysability
      • Modifiability
      • Testability
    • Portability
      • Adaptability
      • Installability
      • Replaceability
  • Quality in use
    • Effectiveness
    • Efficiency
    • Satisfaction
    • Freedom from risk
    • Context coverage
      • Context completeness
      • Flexibility

As you can see, these points reach practically every aspect that can be considered at the software level. Among them are security (in the sense of both security and safety, so covering both intentional actions and accidental events), aesthetics, deployment, performance and protection against errors. Naturally, there is no obligation to raise every aspect with the client or even to follow this standard, but it is worth at least going through the list and considering whether any of these situations, in which the system's behavior needs thought, actually apply to our software.

It is best to write requirements so that they can be measured easily

SMART: the traits of a good requirement

We described earlier how to write a nonfunctional requirement. Following that outline does not mean, however, that the specified NFRs will be good. So what will make them so, and what does it actually mean for a requirement to be "good"?

There is a technique called SMART (also written S.M.A.R.T.) that helps define goals, for example in project management. It was proposed in 1981 by George T. Doran, Arthur Miller and James Cunningham, and since NFRs are in effect goals to be met, it works for our topic as well. It is also worth mentioning that the acronym is sometimes extended with the additional traits E and R (making SMARTER), but that is not part of the canon and should be treated as a curiosity and a possible extension.

All right, but what is SMART and how can it help us? Piotr Miklosik already wrote about it in the article on the requirements specification, as have many other authors elsewhere on the web, but for completeness we should expand on it here. For a nonfunctional requirement to really improve software quality and, more importantly, the satisfaction of the client and users, we should follow these guidelines.

A requirement should be easy to understand and concrete (Simple and Specific). Nobody benefits from a description that is ambiguous, can be interpreted in different ways or is simply incomprehensible. Here you have to be strict and describe precisely what it is about.

Example of a good requirement: Login passwords are issued to users by a user with the administrator role.
Example of a bad requirement: Users can use passwords sent by administrators. (what are the passwords for, do users "can" or "must," who is an administrator...)

Probably the most important letter is "M," because it means the requirement must be measurable (Measurable). Imagine the parties to a project disagreeing about whether a given NFR has been met. Without clear verification criteria the situation is ambiguous, because each side will negotiate in its own favor, and that suits nobody. On top of that, programmers need clear information about the goal they are aiming for.

Example of a good requirement: The report of ordered materials is generated in at most 10 seconds.
Example of a bad requirement: The report of ordered materials is generated quickly. (what does "quickly" mean)

Remember when I mentioned difficulty? Expectations of software can of course be high, but they need to be achievable (Achievable or Attainable). This most often concerns performance or resources, but you also cannot count requirements that are beyond the competence of the people on the project when there is no budget for, say, outsourcing.

Example of a good requirement: The web application must allow all functions to be used with an internet connection of 10 MB/s bandwidth.
Example of a bad requirement: The web application must allow all functions to be used without an active internet connection. (despite appearances, this can make sense, but it is usually impossible to meet unless you use techniques such as PWA, data caching or operation in internal networks)

It can also happen that the client lists a great many constraints for the project, but after analysis it turns out that not all of them make sense in the given case. This topic was already touched on under the letter "A," but remember that a requirement must be relevant (Relevant). If it is not, there is no justification for putting it in the specification, because it will only muddy the picture and needlessly bother everyone who reads the documentation. It is hard to give an example here. You could say, for instance, that requiring multilingual support makes no sense for an application meant for a single company that communicates in Polish, though it is not ruled out that different language versions will be needed in the future as the circle of users grows. A much better illustration would be the requirement "The system stores monetary amounts to two decimal places" for a system that will not process financial values at all.

And finally, a requirement should be placed properly in time (Timed), though it is worth noting that the requirements specification (including the register of nonfunctional requirements) is not the same as a schedule. It may contain information about the client's priorities, but remember that ensuring nonfunctional requirements are met is a continuous process and has to be maintained as the functionality grows. For example, what good is it that filter memory is provided for the user list, if later sprints add lists of customers and orders, where this requirement also has to be remembered? Still, there may be a situation in which a given NFR must (and can) be met by a specific moment, and then it is worth adding an appropriate note.

SMART is not the only method that helps in creating goals or nonfunctional requirements. There are others worth knowing, but the technique discussed here, from the 1980s, is still widely used.

A technique for gathering nonfunctional requirements

The classic process of obtaining NFRs, as presented in software engineering or project management classes, goes roughly like this:

  1. Meetings are scheduled with various stakeholders: the client, technical people and users (these should be separate, independent meetings).
  2. A separate list of categories and subcategories is prepared for each meeting (not every interested group cares about all aspects of the system).
  3. At the meetings the categories are presented one by one and the client's expectations in each area are discussed (on the principle that every idea is a good one).
  4. After the presentation, the collected points are discussed and priorities are set.
  5. After all the meetings, the register of NFRs is presented for acceptance.

Let's be honest, though: under normal conditions and for small and medium projects, this way of working is not feasible in practice. It takes a lot of time and coordinated schedules, and the client usually cares about time. It is a very good way to work, but in most projects (apart from critical ones or those with a huge budget) you have to take a common-sense approach and follow a few principles.

First, clients, when discussing their expectations of the system, usually focus on functionality. But very often, while defining it, they also bring up quality topics, pointing out things they will pay attention to or that they have seen in other applications. Such moments are the basic source of nonfunctional requirements, even if we are not aware of them in a live conversation. That is why it is very important to build the habit of taking good notes, whose later analysis builds up our register of NFRs (among other things).

Second, the more projects we analyze and specify, the more experience and historical data we have. And since many systems are structurally similar (even though they are completely different functionally), the range of NFRs may be similar too. That means it is worth building such internal catalogs of the most common nonfunctional requirements and using the list when writing a specification for a new system. Even if individual items are not used, they can set off thought processes that lead us to consider similar aspects. There are also formally described methods based on templates, such as NoRT by the already mentioned Dr. Sylwia Kopczyńska, but where a budget is a factor, building internal catalogs should also give good results while saving time.

Third, it is worth using the categories mentioned earlier and going through them yourself during requirements analysis. There is a good chance that you will list the items that matter for the project yourself (based on knowledge gained, even unconsciously, during meetings with the client), and mark others as likely, to ask the client about. That way we can do part of the work and arrange a verification with concrete material already in hand, which not only puts us in a good light but also gets us the most important information at a lower cost.

Of course, every time the register of NFRs, like the other elements of the requirements specification, has to be accepted by the client and supplemented with any gaps they point out.

Summary

Is it worth identifying and writing down nonfunctional requirements? Of course it is. They set the constraints that matter for the architecture and let us choose better the tools we will use in delivery. They also have a big effect on the estimate, adding items to the cost calculation or modifying the hour estimates of other requirements. At the same time, specifying them well and implementing them later significantly raises the quality of the system, which gives it a better chance of succeeding and winning over users. And that is what everyone working on the project wants.

Best regards and thank you, Jakub Rojek.