Requirement diagram (Mermaid)

A requirement diagram links requirements to the elements that satisfy them and the tests that verify them. It is the diagram auditors are really asking for.


#What this example shows

  • Typed requirements with id, text, risk and verification method.

  • satisfies and verifies relationships, which mean different things.

  • Elements, which are the concrete things doing the satisfying.


#A worked example

Open it, edit it, or copy the source below.

Requirement diagram (Mermaid)

The source, which you can paste into a new diagram and edit:

requirementDiagram

  requirement session_expiry {
    id: REQ-1
    text: Sessions expire after 30 minutes of inactivity.
    risk: high
    verifymethod: test
  }

  requirement configurable_expiry {
    id: REQ-2
    text: Expiry is configurable per tenant.
    risk: medium
    verifymethod: test
  }

  element session_service {
    type: service
  }

  element admin_settings {
    type: ui
  }

  element expiry_tests {
    type: test suite
  }

  configurable_expiry - refines -> session_expiry
  session_service - satisfies -> session_expiry
  admin_settings - satisfies -> configurable_expiry
  expiry_tests - verifies -> session_expiry

#Making it your own

  • Give requirements stable ids. The diagram is worthless if they change.

  • satisfies, verifies, refines and derives are different relationships. Use them precisely.

  • One diagram per feature. A whole-product version is unreadable.



Copy it. Change one line. See what happens.