T2 Test Generation, Simulation and Diagnosis