Short answer: the real world is noisy. If you write tests that assume clean input data you are not exercising the system in a real environment. So let us talk about noise.
Types of noise and sources of noise
For this article, I will define noise as signal data entering the system from the outside of the system. Sources of noise include
- Resolution limits: all measuring devices have a limit to their resolution. A ruler with 1/8th-inch markings cannot accurately measure 1/16th-inch resolution.
- External interference: Frequently there are secondary effects that change the measurement. For example, when measuring a voltage it is common to have noise in the signal from other wires running nearby. (Which is why for some sensitive measurements shielded cables are used)
- Dynamic property: In some instances, the value of the property being measured is changing rapidly; any given measurement may be an outlier.
- Human error: For devices that human operators, well we make mistakes in how we enter information…
Types
of noise, generally, map on to the sources of noise.
- Quantization (resolution): Characterized by “jumps” in the value. In dynamic systems must be tolerant of the jumps. For static (e.g. post-run analysis) the jumps can be “smoothed” using functions.
- White (external): Characterized by random values around the “actual” signal. Generally can be filtered using standard transfer functions.
- Outlier (dynamic): Characterized by occasional values outside the trending values. If the “standard” range is known then these outlier values can be ignored.
- Systematic (human): Characterized by systems being executed in a non-standard order. Systems need to be made recoverable from non-standard execution order.
Testing the wild-noise
The
basic strategy for testing with noise is to “inject noise” into the system under test. How we inject can again be mapped back to our 4 types of noise
- Floor functions (quantization): Use a floor function to resolve signals to the nearest value of the inputs resolution.
- White noise generator (white): White noise generators are common functions. One important note, if the same “seed” is used for the white noise for all runs then this test has an inherent flaw.
- White noise generator (outlier): There is a special case of the white noise generator where signals are more episodic and, generally, of a larger value. In these cases, a statistical model of the outlier signals is helpful in creating this white noise generator.
- Decision tree analysis (human): Creating test cases for human error can be the most difficult. For state logic, it is possible to analyze the system to determine all possible paths.
In the end, including noise in your tests will result in more robust systems.



Simulink, the exception to the rule is the
data is easy to work with, allows you to quickly share information between functions and to reduce interfaces. At the same time, it makes debugging code more difficult (where was X set?) and reduces reusability of code by expanding the dependencies of a function. But… there are times when global data is the correct solution.






ist die gleiche Probleme sehen das Autoindustrie vor 20 Jahr; Zusätzlich zu, dass sie konfrontiert sind regulatorische Fragen. Die Medizinprodukteindustrie ist, nur natralich, vorsichtig wann neue Prozesse übernehmen. because of this “use cases” from other industries are required for validation of the process.

Model as the single truth: When we look at the elaboration process that a Model-Based Design process follows it is clear that the iterative nature of an agile process is a close fit. Models can both provide a tight integration with requirements while allowing for the fast evolution of those requirements. In fact, the use of simulation as part of the development process allows developers to quickly find issues with their requirements.



Issues 1 (lack of ownership) 3 (lack of awareness and documentation, and 6 (bugs) can be addressed by having a person or group who has the task of creating and 


first question focuses on maintaining current functionality. The second and third look at how to make things better. Improvements to processes can be made either through refactoring of existing processes (or creating new processes) or through the adoption of new tools.
As a last note; if as part of your migration you are are updating your testing environment then you need to validate the behavior of your testing environment. This is generally done through manual inspection of a subset of the full test suite. The key factor is to have a subset that contains a full set of all types of tests are performed by the testing environment.






