Suppose you have a state transition diagram. What is the best way to "Formally" write requirement(s) that capture the state transitions depicted in the diagram. Over the years I have used two approaches and both work, but each time I work with new people there seems to be disagreements on how best to "Formally" capture the state transitions. "Formally" capture is required because traceability matrices are used that map to "Test Cases" and "Software Units (ie. Classes and/or Modules)".
- The system shall transition between states as depicted in Figure 1 XYZ Transition Diagram.
Look at the diagram and write a requirement for each transition.
- Upon power up the system shall start in the Comms-Init State.
- Upon establishing communications the system shall transition to the Initialization State.
- (ie. A requirement for each state transition)
The benefit to method 1 is that it is one requirement and very easy to write.
The con to method 1 is that pictures don't work well with traceability matrices and it is more difficult to verify that you've covered all the transitions.
The benefit to method 2 is that each transition can be mapped to the explicit test cases and modules in their respective traceability matrices.
The con is that it is more work writing all the extra requirements and sometimes putting into clear and accurate words what the picture clearly shows is not as easy as it sounds. Also, the additional requirements seem to add more clutter as opposed to value, which makes reading the requirements less understandable rather than more.
While I suspect the answer in the simple case like I described is that it depends on the project or it doesn't really matter. The issue on my new project is that things are slightly more complicated (there are modes in addition to states that interplay). Thus, method 2 will potentially explode into a lot of requirements.
So I am asking the question because this is one of those "practices" that I have been doing without really knowing "Why". I don't generally like to work that way, so I am hoping that someone can point out valid reasons why one approach is "more proper" than the other and in the process I will learn the "Why", which will let me understand how best to tailor for the slightly more complicated scenarios.