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

  1. Click the Create an Empty Functional Test Script button reate an Empty Functional Test Script on the Functional Test toolbar or click File > New > Add Empty Script or Project > Add Empty Script.
  2. 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.
  3. Click Open to display the Select Script Assets page.

    Test UI creates a local object map for your script.

  4. (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.
  5. Click Finish to create the new script.

    Test UI displays the script in the Solution Explorer.

  6. 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 Insert Recording into Active Functional Test Script on the product toolbar. On Recording toolbar, click the Insert Script Support Commands button Insert Script Support Commands.

    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 Display Help on the Recording toolbar for information about the options on the Recording toolbar.

  7. To put the script under source control:
    1. Right-click the new script in the Solution Explorer, and click Check In.
    2. In the Check In dialog, click Check In. For more information, see About Software Configuration Management.