What does a characterization test do?

What does a characterization test do?

The goal of characterization tests is to help developers verify that the modifications made to a reference version of a software system did not modify its behavior in unwanted or undesirable ways. For example, if one observes that f(3.14) == 42, then this could be created as a characterization test.

How do you write a characterization test?

Manual Creation of Characterization Tests

  1. Use a piece of code in a test harness.
  2. Write an assertion that you know will fail.
  3. Run the test and let the failure tell you what the actual behavior is.
  4. Change the test so that it expects the behavior that the code actually produces.
  5. Repeat.

What is a golden test?

A golden test is an IO action that writes its result to a file. To pass the test, this output file should be identical to the corresponding «golden» file, which contains the correct result for the test. To get started with golden testing and this library, see Introduction to golden testing.

What’s the difference between unit testing and functional testing?

Unit tests tell a developer that the code is doing things right; functional tests tell a developer that the code is doing the right things. A well explained real-life analogy of unit testing and functional testing can be described as follows, Many times the development of a system is likened to the building of a house.

What’s the difference between characterization and other types of testing?

This highlights the key difference between characterization testing and other forms of testing. The purpose of characterization testing is to document your system’s actual behavior, not check for the behavior you wish your system had. Once, when I first started programming, I was asked to fix a bug.

What is the purpose of a unit test?

A unit test can verify different behavioral aspects of the system under testing, but mainly it verifies that the system under testing produces the correct results. From the developer’s perspective, the purpose of unit testing is to create a strong codebase at a cheap cost.

How does an automated characterization test tool work?

An automated characterization test tool will exercise existing code with a wide range of relevant and/or random input values, record the output values (or state changes) and generate a set of characterization tests.