Tests
Accessing the configuration
❌ Don't: Obtain UiPlayer configuration values from the .runsettings file
.runsettings fileprivate void TestScript(UiExecutionController controller)
{
// this is a bad idea
var params = this.GetParametersFromRunSettings();
}✔️ Do: Avoid asking for the configuration values in your code
✔️ Do: Use the controller's configuration
private void TestScript(UiExecutionController controller)
{
// configuration values are exposed as properties here
UiPlayerConfiguration config = controller.Configuration;
}Visual vs. Functional
❌ Don't: Mix visual equivalence and functional equivalence tests
✔️ Do: Separate visual and functional tests

Documenting test case methods
❌ Don't: Use Scenario as a test case summary
✔️ Do: Use an XML summary comment
✔️ Do: Use the test method string to document test case methods
Interacting with different technologies in a UITest script
❌ Don't: Use UIPlayer's Instance directly
✔️ Do: Use this.Execute
this.Execute✔️ Do: Create a new context with a different technology
Last updated
Was this helpful?