How to Calculate the Number of Tests - Consideration of Embedded Signals
Signals can take different values at different times. Signals can change their values and depending on the point in time, the calculation can be different, as other signals must also be taken into account in the calculation.
The amount of tests varies essentially with the number of signals, the number of value changes and the number of value changes. In the following, the partial combinatorics are first considered and then the full combinatorics are presented.
Signal Switching Over Time between different values: This visualization shows how the duration of a signal can be varied with different time intervals to verify all possible paths in the code
Signal Changes with Different Timings: A signal can change its value at different times. It is important to know that there are software functions that perform different calculations at different times.
Examples include software that calculates hysteresis times, debounces signals, or controllers. Depending on the purpose of the function, a signal change at different times can produce different reactions.
Combination of Signal Switching Over Time between different values & Signal Changes with Different Timings
The formula to calculate the necessary number of tests is depicted as follows:
Where:
By analyzing the image, we can determine all the possible combinations and the corresponding number of tests necessary to ensure comprehensive test coverage. This approach ensures that all possible signal states and timing behaviors are verified, which is crucial for the reliability and robustness of the embedded system.
Combinations of Signal Switching: This visualization shows how two signals can be changed at different times. For each switch point, there are three options: before the other signal changes, simultaneously, and after the other signal changes.
领英推荐
Where:
Where:
The sum of the full combinatorics (X) is calculated according to the following formula:
Conclusion
The formulas provided are instrumental in determining the number of possible combinations that can arise when testing multiple signals. It becomes readily apparent that even with a few signals, the number of representative values can quickly lead to high combinatorial complexity. This complexity must be considered when selecting the number of representatives.
Moreover, the number of signals is of critical importance. If a device under test (DUT) has too many interfaces, the exponential dependencies can rapidly lead to an unmanageable number of tests. This scenario must be taken into account, especially during the software architecture and design phases.
Note: These formulas illustrate the full combinatorial potential (for calculating necessary tests in black-box testing). It is important to recognize that full combinatorial testing is not always required. With white-box analysis, certain combinations can potentially be excluded. This consideration should be reflected in the test strategy.
CMRX memory protected realtime microkernel for MCUs | Software is not a crankshaft
8 个月Just swap the word "signal" for word "state". Magically, it will become valid for state changes inside the software, which can happen concurrently. People of automotive do pretty terrible job realizing these two are basically the same.