Microcontroller modules are introduced to a life test system to apply stimuli and stress patterns to the unit under test. The firmware must evaluate the status or operational function of the tested device for a multitude of different applications. A finite-state machine design for the microcontroller is presented that is configurable via a communication bus. The controller acts according to the given test plan description. Various sources can trigger events to cause a transition in the state machine. Custom Lua script code is executed in each state in order to control and communicate with the test hardware.