[CALC2] The exact calculator

This demo is just a bit more complicated then [CALC1] A simple calculator: this product-variant has one extra requirement.

A bit more complicated product

Demonstrator: Exact Calculator CALC2 ../../../_images/arrow-right-circle.svg
tags: demo2
project: RequirementsTraceability
links outgoing: CALC1

This calculator should work with Fractional Numbers, and be exact for very big numbers; as defined in Big fractional numbers (CALC2_1000ND)

Warning

This implies floats are not possible in the implementation

The extra requirement

Specification: Big fractional numbers CALC2_1000ND ../../../_images/arrow-right-circle.svg
tags: demo2
project: RequirementsTraceability

The Exact Calculator (CALC2) should work with fractions; where nominator and denominator can be very long: up to 1000 digits.

Hotfix the missing test

We also repair the missing test in demo1, but only for demo2 (Because it is still a demo!).

Test_Case: DIV test (demo2 only) CALC2_TEST_DIV_1 ../../../_images/arrow-right-circle.svg
tags: demo2
project: RequirementsTraceability
links outgoing: CALC_DIV, CALC2_1000ND

Subtract 1/3 from 1/2 and check the result is 1/6.

Note

This test is was intentionally “forgotten” as explained in the forgotten test.

Therefore it is only added for the Exact Calculator (CALC2).

See also

see the notes about the forgotten test for more info.

How to test?

The Big fractional numbers (CALC2_1000ND) requirement is a good example of a “nonfunctional” (actually: a non-distributable) specification. It is valid for all other requirements; all parts of the implementation should adhere to it.

Testing this requirement is also different too. The same tests are valid: we have to add, subtract, multiply and divide.
Only, now we have to use other numbers; really big ones!

Traditionally

In the traditional world, using the TMAP-terms, this approximately come down to:

  • Reuse the logic test.

  • Change a physical test (or add one).

Modern

When using an agile test-automation framework this implies

  • The ATS (Automated Test Script) isn’t altered.

  • Some “Test-Vectors” (or test-data) is added: the big-fractions.

Experience practice

  1. It is possible to have multiply “toplevel” ‘needs’. Here, that are Demonstrators, but it possible to use Products, Variants, and/or Releases etc, as well.

  2. Here, a new kind of ‘need’ is introduced: Specification. As you will see on the next page, it influences not only the implementation, but also testing.

  3. In the ‘details-row’, you can see it has (outgoing) links to many (all) earlier requirements.

Comments

comments powered by Disqus