Particulars for CALC1

Hint

You can skip the particulars parts, when you not interested in the technical details of this particular tool.

Caution

I configured the extra-option :project: to needs (which is set to RequirementsTraceability) for all needs in this article, and uses it in filter for all overviews. As I use needs in multiple parts (“projects”) on this site, and they shouldn’t be mixed-up.

Probably, you don’t need this when your documentation is only. Than you should ignore the lines:

  • :project: RequirementsTraceability

  • :filter: 'RequirementsTraceability' in project

Else, if you do use multiple sets of needs in one document, see this as extra lesson :-)

A product (start of the V)

To define the Simple Calculator (CALC1) product the following is described:

.. demo:: Simple Calculator
   :ID: CALC1
   :project: RequirementsTraceability

   For this demo ...

You can see this product has the ID CALC1 and some text. No links are needed, they will be added automatically by requirements, which are described “later”.

With requirements (one step down into the V)

The requirement Generic Add (CALC_ADD) has an ID too, and a link to the products it is valid for; here CALC1 and CALC2.

.. req:: Generic Add
   :ID: CALC_ADD
   :links: CALC1;CALC2
   :project: RequirementsTraceability

   All calculators ... able to sum ...

All requirements are described in the same way, as well as each individual requirement can be linked to one or more products (or product-variants). As this demo has (already) two products, and this requirement is valid for both; you see them listed here.

And tests (the other side of the V)

A test (-case) is also a ‘need’. It is defined in the same approach: a title, an ID and the links to all requirements that are tested by this one. Here, that is only CALC_ADD.

.. test:: Basic addition test
   :id: CALC_TEST_ADD_1
   :links: CALC_ADD
   :project: RequirementsTraceability

   Sum two numbers and verify ...

Again, the same construction is repeated for all tests.

Tracing the requirements

Generaring the “requirements tree” as displayed here is very easy:

.. needflow::
   :tags: demo1;general
   :filter: 'RequirementsTraceability' in project

Likewise is showing the table overview:

.. needtable::
   :tags: demo1;general
   :style: table
   :columns: id;type;title;incoming;outgoing
   :sort: type

See the documentations of needs (https://sphinxcontrib-needs.readthedocs.io) for details on all options.

Comments

comments powered by Disqus