Code-Behind File

Standalone version

You can create a code behind file for each test where you can implement coded steps and custom test classes.

There are two methods of creating a code behind file for your test.

1.  Add a coded step from the Step Builder.

2.  Right click on a step and select Edit in Code from the Test Step Context Menu.

Code-behind file.

  • Every method in the code-behind file is represented in the coded step drop down .

  • Every coded step can be mapped to any method in the code-behind file.

  • Do not remove the CodedStep attribute. This is how Test Studio recognizes custom coded steps versus other methods it should ignore.

  • The code-behind file has access to all Telerik run-time objects, like ActiveBrowser. This is an identical coding experience to the Telerik Testing Framework.

Visual Studio plugin

There are three ways how to add a code-behind file in Visual Studio plugin.

1.  Click Add code-behind file to your test button

Add Code Behind File

2.  Add a coded step from the Step Builder.

3.  Right click on a step and select Edit in Code from the Test Step Context Menu.

The code-behind file is nested under the parent test in Solution Explorer:

Code Behind File

See Also: