Once a test is recorded, there are a number of ways the generated test can be specialized.
Selecting a Custom Base Test Class
It often makes sense to create reusable base test classes that define reusable fixture setup logic. These base tests can be specified in the New UI Test wizard.
Specifying Setup Handlers
Robust tests are independent in that they depend very little on
pre-established application state. Test independence can be
promoted by capturing all of the test’s expectations about
the application under state in setup condition handlers
defined in the test’s
setUp method. Common
conditions can be selected in the New UI Test wizard.