Once you have created a coded step, click the View Class button to see the entire code-behind file.
- Just like a step that has been converted to code, a method in the code-behind file is represented as a step in the Steps tab.
- Do not remove the CodedStep attribute. This is how Test Studio recognizes custom coded steps versus other methods it should ignore.
- The name of the method becomes the step name. The Coded Step attribute description is listed as the description in the Steps tab.
- 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
The Add Code-Behind File button creates or navigates to the "code-behind" file (the C# or Visual Basic code that runs as part of a Test Studio test). You don't need to use a code-behind file to create and run a test, but it allows for more in-depth control over your test steps. Test Studio allows you to mix and match standard steps recorded through the UI with coded steps to allow for greater testing flexibility.
A code-behind file is automatically generated the first time you select Customize Step in Code from the Test Step Context Menu (performed on step 5 above). The code-behind file is nested under the parent test in Solution Explorer: