Plug-in Development

 

Test Script Runner is developed using the Component Object Model (COM) which allows you to develop your own test software and add it to the testing system. You can develop you plug-in using any language that supports COM.

 

There are two COM interfaces that you need to implement in order to add a tester to the system:-

ITester1

An object implementing this interface provides the system with all the information required to know what actions your tester can perform and to execute those actions. An action returns one of the results TestPassed (the action was successful), TestFailed (the action was unsuccessful), TestNotImplemented (the action has not yet been implemented), TestError (the action is invalid or could not be performed) or TestAborted (the action was aborted), it can also return an array or values associated with the test. If there are no return values then the result of an action can be applied to a script variable. If there are return values then these are applied to the script variable instead. If you implement this interface as define in this help it will also provide you with documentation showing what parameters the actions take and their default values.

The tester documentation is selected via the Help->Tester Documentation Command.

ITesterCreator1

An object implementing this interface provides the system with the details of what testers can be created via it and a mechanism for creating those tester objects. This object must be registered in the system registry in order to allow the system to create it given its class identifier (CLSID) or program identifier.

 

The following sections show how to create a tester object with the name Demo which has four actions:-

1.       Pass

This action takes no parameters, has no return values and simply returns the result TestPassed.

2.       Fail

The action takes no parameters, has no return values and simply returns the result TestFailed.

3.       Random

The action takes an integer as its parameters and randomly returns TestPassed or TestFailed depending upon the ratio 1/parameter. For example if you supply 10 you will get a failure rate of 1 in 10. This will return TestError if the parameter is missing or is not greater than 0.

4.       RandomValue

This action takes an integer as its parameter and returns a random value between 0 and parameter-1. It will return TestPassed if the parameter is greater than 0 otherwise it will return TestError.

Tester Development using Microsoft Visual Studio C++ 6.0

Tester Development using Microsoft Visual Studio 2005 C++

Tester Development using Microsoft Visual Studio 2005 C#