Custom Test Type Example > Creating the Sample Executable Files

Creating the Sample Executable Files

Following the steps in this example, you can create a simple working remote test execution mechanism. The example uses Microsoft Visual Basic 6.0.

MyTestType Example

Using Microsoft Visual Basic, create a new ActiveX Exe project in which to create a TestType.

In the class properties window, change the Instancing property to 6 - GlobalMultiUse.

Implement theTestType methods and properties by pasting the TestType Example from the TestType reference.

Choose Project > Properties. Click the General tab. Change the project's name to MyTestType. Select Unattended Execution and Upgrade ActiveX Controls. In the same tab, in the Threading Model section, select the Thread Per Object option. Save the project as MyTestType.

Choose File > Make MyTestType.exe to compile the class and register it with the Windows operating system.

MyRunAgent Example

Using Microsoft Visual Basic, create a new ActiveX EXE project in which to create a RemoteAgent. In Projects > References, check the "OTA COM Type Library."

Implement the methods and properties of RemoteAgent by pasting the Remote Agent Example from the RemoteAgent reference.

In the class properties window, change the Instancing property to
6 - GlobalMultiUse.

Choose Project > Properties and click the General tab. Change the project's name to MyRunAgent. Select Unattended Execution and Upgrade ActiveX Controls. In the same tab, in the Threading Model section, select the Thread Per Object option.

Click the Component tab and select Remote Server Files.

Save the project as MyRunAgent.

Choose File > Make MyRunAgent.exe to compile the class and register it with the Windows operating system.

MyScriptViewer Example

Using Microsoft Visual Basic, create a new ActiveX Control project in which to create a ScriptViewer. In Projects > References, check the "OTA COM Type Library."

Implement the methods and properties of ScriptViewer by pasting the Script Viewer Example from the ScriptViewer reference.

Choose Project > Properties. Click the General tab, and rename the project MyScriptViewer. Save the project under this name.

Add a Text Control named Text1 to the main form.

Choose File > Make MyScriptViewer.ocx to compile the ActiveX control class and register it with the Windows operating system.

Next: Adding the Class IDs to the Sample


© 1993 - 2013 Hewlett-Packard Development Company, L.P.