Record your test
Use the recorded testing code
Just start the recording mode and TAFX will record the actions you perform with the keyboard and mouse. The recording window shows the actions as they are recorded. In the picture you can also see that the objects are given meaningful names while you record your test (e.g. ButtonMultiply).
When you exit the recording mode you can decide how to use the resulting code. Add a new method in your test class or modify an existing. You can also just keep the recorded code in the clipboard.
User Interface map
| || |
Much effort has gone into producing meaningful code from the recording mode. Recording may be a fancy way of producing test code but much time is spent reading and changing the test code. This means that the code must be possible to change and maintain.
Can you understand what the test above does??
A map of the objects in your application is stored in Visual Studio in the UIMap designer. You can change the mapping of the objects if the UI of your application changes. In the picture you can see the resulting UIMap after the recording in the Calculator application.
| || |
Your test project is built into a stand-alone executable. When the test application starts the test runner window is shown. In this window you can see how the test runs through all the test code.