Formulating requirements using ISO/IEC/IEEE 29148-2011/2018

  softwareengineering

I’m trying to formulate some requirements using the ISO/IEC/IEEE 29148 standards. I know that the following is correct according to the standards.

The system [Subject] shall stop [Action] only when the stop-button is pressed [Condition].

I’m trying to do the same but for two conditions, as follows:

The system shall stop only when either the stop-button is pressed or when the x-things is reached.

I don’t feel like this is correct but maybe it is? I couldn’t find any straight-forward answer to my question in the standards but maybe someone here has some experience with writing formal requirements?

0

One of the characteristics of a good requirement is that it is atomic. That is, the requirement defines one and only one behavior. Although not the only way, requirements with conjunctions (such as “and” and “or” and “nor”) tend to not be atomic and should be rewritten.

The two conditions, stopping when the button is pressed and when a condition is reached should be specified as two individual requirements. Each one should be traceable to a requirement (maybe there’s a single higher level requirement or user need that encapsulates both), verifiable or testable, consistent with the other requirements, and so forth.

As an aside – other words, like “only”, can also be problematic for testability. How do you prove that something only happens in certain situations, given the wide range of situations and circumstances that may arise? Always consider the characteristics of good requirements.

LEAVE A COMMENT