Vijay Upadya, Microsoft
Often times while testing state-based systems, testers have the need to validate the behavior of software on performing a specific action while a component is in a specific state. However this is not easily possible using traditional testing techniques because the state transitions are either not visible/observable externally to tests or, in cases where they are visible, are not controllable in real time by tests. One technique that addresses this challenge is dynamic instrumentation, in which the system under test is dynamically instrumented using binary interception techniques that then enable tests to observe and control the product as it transitions through its various states.
Testing state-based systems can be quite challenging and costly. The primary challenge in testing such systems is the need for deterministically covering all the states and state transitions of interest in an effective and efficient manner. This paper will talk about the technique we are using in our team to test such a system using dynamic instrumentation. The paper will discuss this testing approach, the tools used to do dynamic instrumentation and how to write tests to leverage the dynamically instrumented product code to simulate different states and state transitions. This paper will also demonstrate how the approach lends itself well for creating data driven tests and ways it can be used to augment the existing test automation.