Creating a test script without recording in the Visual Studio IDE
As an alternative to recording, you can create a script to enter VB.NET code manually.
About this task
HCL DevOps Test UI (Test UI) includes import statements for files you need to compile and comments that contain archiving information. Test UI uses the script name as the class name and sets up TestMain, where you can add the commands to include in the script.
All Functional Test scripts use a default helper base class. You can create your own helper base class if you want to add additional methods or override the methods within RationalTestScript. For more information, see Changing the Default Script Helper Base Class.
To create a new Functional Test script manually:
Procedure
- Click the Create an Empty Functional Test Script button on the Functional Test toolbar or click or .
- In the Add New Item dialog, type a script name in the Name field or click Browse to select a folder for the script in the Location field. The name must be a valid Vclass name.
- Click Open to display the Select
Script Assets page.
Test UI creates a local object map for your script.
- (Optional) To use a different test object map, helper base class, or test dataset, select them from the Select Script Assets page. You can also set the dataset record selection order and set a default test object map and helper base class.
- Click Finish to create the new script.
Test UI displays the script in the Solution Explorer.
- Start adding code to the script.
You can use the Test Object Map to add objects and methods to the script.
To insert any features into the script, such as a timer, call script command, log entry, script delay, or comment, click the Insert Recording into Active Functional Test Script button on the product toolbar. On Recording toolbar, click the Insert Script Support Commands button .
You can also use buttons on the Recording toolbar to start an application from the script or create a verification point. Click the Display Help button on the Recording toolbar for information about the options on the Recording toolbar.
- To put the script under source control:
- Right-click the new script in the Solution Explorer, and click Check In.
- In the Check In dialog, click Check In. For more information, see About Software Configuration Management.