Follow these steps:
This class gives LISA all the information that is required to execute your data set logic.
public class SomeDataSet extends DataSetImpl
{
}
Your data set object is a Remote RMI object, and is therefore able to throw a RemoteException from its constructor and some methods.
This method provides the name that is used to identify the companion in the LISA Test Case Editor.
public String getTypeName()
{
return "Nifty Data Set";
}
The string that the getTypeName method returns is the default name of a new data set.
This method provides LISA with the parameters you need for your companion to be executed. You must also call the super class implementation of this method. The LISA Test Case Editor allows you to edit the parameters that are shown here. The parameters are given to you at the time of execution. You do not have to implement this method if your companion does not require parameters.
public ParameterList getParameters() throws RemoteException
{
ParameterList pl = super.getParameters();
// ...
return pl;
}
For more information about Parameters and ParameterLists, see Extending the LISA Software.
These methods are provided so that the data set can be initialized from either XML or the ParameterList system within LISA.
public void initialize(Element dataset) throws TestDefException public void initialize(ParameterList pl, TestExec ts) throws TestDefException
LISA calls this method when another row is needed from the data source for the data set. If an error occurs or you otherwise want to prevent the test from executing normally, throw a TestRunException.
synchronized public Map getRecord() throws TestRunException, RemoteException
If you are out of rows in the data source, you must specifically code for the two possible conditions that the user wants:
The following example shows possible psuedo-code for this function:
Read next row If no-next-row, Then If there is no "at end" parameter specified, Then Re-open the data source Read next row Else Return null Return row values
Note: The API for the DataSet interface includes the public String getType() method. This method returns the classname of the class implementing this interface.
|
Copyright © 2014 CA Technologies.
Tous droits réservés.
|
|