Requirements Traceability [CALC2]

As in “[CALC1] A simple calculator”, we can automatically generate the an overview of the requirements.

The tree view

@startuml

' Nodes definition 

frame "<size:12>Requirement</size>\n**Generic Add**\n<size:10>CALC_ADD</size>" as CALC_ADD [[.._SystemEngineering_RequirementsTraceability_demo_demo1.html?highlight_Generic+Add_CALC_ADD]] #C5EBC3 {
  }
frame "<size:12>Requirement</size>\n**Generic Sub**\n<size:10>CALC_SUB</size>" as CALC_SUB [[.._SystemEngineering_RequirementsTraceability_demo_demo1.html?highlight_Generic+Sub_CALC_SUB]] #C5EBC3 {
  }
frame "<size:12>Requirement</size>\n**Generic**\n**Multiply**\n<size:10>CALC_MULT</size>" as CALC_MULT [[.._SystemEngineering_RequirementsTraceability_demo_demo1.html?highlight_Generic+Multiply_CALC_MULT]] #C5EBC3 {
  }
frame "<size:12>Requirement</size>\n**Generic Divide**\n<size:10>CALC_DIV</size>" as CALC_DIV [[.._SystemEngineering_RequirementsTraceability_demo_demo1.html?highlight_Generic+Divide_CALC_DIV]] #C5EBC3 {
  }
folder "<size:12>Test_Case</size>\n**Basic addition**\n**test**\n<size:10>CALC_TEST_ADD_1</size>" as CALC_TEST_ADD_1 [[.._SystemEngineering_RequirementsTraceability_demo_demo1.html?highlight_Basic+addition+test_CALC_TEST_ADD_1]] #F6E27F {
  }
folder "<size:12>Test_Case</size>\n**Big  addition**\n**test**\n<size:10>CALC_TEST_ADD_2</size>" as CALC_TEST_ADD_2 [[.._SystemEngineering_RequirementsTraceability_demo_demo1.html?highlight_Big++addition+test_CALC_TEST_ADD_2]] #F6E27F {
  }
folder "<size:12>Test_Case</size>\n**Subtract test**\n<size:10>CALC_TEST_SUB_1</size>" as CALC_TEST_SUB_1 [[.._SystemEngineering_RequirementsTraceability_demo_demo1.html?highlight_Subtract+test_CALC_TEST_SUB_1]] #F6E27F {
  }
folder "<size:12>Test_Case</size>\n**Multiplication**\n**test**\n<size:10>CALC_TEST_MULT_1</size>" as CALC_TEST_MULT_1 [[.._SystemEngineering_RequirementsTraceability_demo_demo1.html?highlight_Multiplication+test_CALC_TEST_MULT_1]] #F6E27F {
  }
node "<size:12>Demonstrator</size>\n**Exact**\n**Calculator**\n<size:10>CALC2</size>" as CALC2 [[.._SystemEngineering_RequirementsTraceability_demo_demo2.html?highlight_Exact+Calculator_CALC2]] #9DC5BB {
  }
component "<size:12>Specification</size>\n**Big fractional**\n**numbers**\n<size:10>CALC2_1000ND</size>" as CALC2_1000ND [[.._SystemEngineering_RequirementsTraceability_demo_demo2.html?highlight_Big+fractional+numbers_CALC2_1000ND]] #FEDCD2 {
  }
folder "<size:12>Test_Case</size>\n**DIV test (demo2**\n**only)**\n<size:10>CALC2_TEST_DIV_1</size>" as CALC2_TEST_DIV_1 [[.._SystemEngineering_RequirementsTraceability_demo_demo2.html?highlight_DIV+test+_28demo2+only_29_CALC2_TEST_DIV_1]] #F6E27F {
  }

' Connection definition 

CALC_ADD --> CALC2
CALC_SUB --> CALC2
CALC_MULT --> CALC2
CALC_DIV --> CALC2
CALC_TEST_ADD_1 --> CALC_ADD
CALC_TEST_ADD_1 --> CALC2_1000ND
CALC_TEST_ADD_2 --> CALC_ADD
CALC_TEST_ADD_2 --> CALC2_1000ND
CALC_TEST_SUB_1 --> CALC_SUB
CALC_TEST_SUB_1 --> CALC2_1000ND
CALC_TEST_MULT_1 --> CALC_MULT
CALC_TEST_MULT_1 --> CALC2_1000ND
CALC2_1000ND --> CALC_ADD
CALC2_1000ND --> CALC_SUB
CALC2_1000ND --> CALC_MULT
CALC2_1000ND --> CALC_DIV
CALC2_1000ND --> CALC2
CALC2_TEST_DIV_1 --> CALC_DIV
CALC2_TEST_DIV_1 --> CALC2_1000ND

@enduml

Lessons learned

  1. We can directly see that specification Big fractional numbers (CALC2_1000ND) influences all existing test-cases.

  2. Each test depends on both a (functional) requirement and a (non-functional) specification (at least in this case).

  3. The requirements-relations can become more complicated, even by adding only one requirement!

Can you imagine what will happen when we add a handful of requirements to the calculator (memory, square-root, powers)? Or, a few more non-functionals (speed-of-operation, floats). Then the complexity quickly raises even for such a simple product. And it becomes hard to predict which tests have to be adapted or rerun.

Likewise, when a few requirements become altered in an upcoming sprint: can you predict which tests will have to change? A graph, as above, will certainly help in working that out.

The table view

ID

Type

Title

Incoming

Outgoing

CALC2

demo

Exact Calculator

CALC_ADD

req

Generic Add

CALC_SUB

req

Generic Sub

CALC_MULT

req

Generic Multiply

CALC_DIV

req

Generic Divide

CALC2_1000ND

spec

Big fractional numbers

CALC_TEST_ADD_1

test

Basic addition test

CALC_TEST_ADD_2

test

Big addition test

CALC_TEST_SUB_1

test

Subtract test

CALC_TEST_MULT_1

test

Multiplication test

CALC2_TEST_DIV_1

test

DIV test (demo2 only)

Lessons learned

  1. The advantage of a table-view is that is will only grow in one direction: it just becomes a bit longer.

  2. Even for a big project, it’s a great page to bookmark and use as a start-page for all kinds of requirements.
    Probably, you like to split it into the kind of ‘need’.

It would be great to show a classical Requirements Traceability matrix (RTM) too. This table shows the relations between all the requirements and all the tests.

Note

As ‘needs’ currently does not support classical RTMs, I can’t generate/show it here. See a manually made TRM to get the idea. As you will see: it’s easy to read.
However, its quite hard to grasp deep relations; then the tree above is more helpfull.

Next steps

We might add more product-variants, or more sprints to convince you that requirement-traceability is important. The only effect is more pages with (trivial) requirements, specifications or other ‘needs’. And the same to generated overviews; the later cost only a small number of lines, independent of the size of the product. So we will leave that as an exercise.

As a bonus, we will show you one more generated graph: All needs [BigTree], combining the Simple Calculator (CALC1) and Exact Calculator (CALC2) requirements.

Whenever you have more quistions, you can email me Albert.Mietus.

Comments

comments powered by Disqus