StepFactory Object : AddItem Method |
There are two options for ItemData:
(0) Name - The step name (string, required).
(1) Status - The step status (string, optional).
Possible values are:
You can define additional status values.
- NO_RUN - Default. The step is never executed.
- NOT_COMPLETED - Execution of the step has not been completed.
- FAILED - The step failed during test execution.
- PASSED - The step passed during test execution.
- N/A - The execution status for the step is not available.
(2) Desc - A description of the step (string, optional).
(3) Path - The file path of the step (string, optional).
(4) LineNum - The step line number (string, optional). The default value is "0."
Visual Basic |
---|
Public Function AddItem( _ ByVal ItemData As Variant _ ) As Object |
There are two options for ItemData:
(0) Name - The step name (string, required).
(1) Status - The step status (string, optional).
Possible values are:
You can define additional status values.
- NO_RUN - Default. The step is never executed.
- NOT_COMPLETED - Execution of the step has not been completed.
- FAILED - The step failed during test execution.
- PASSED - The step passed during test execution.
- N/A - The execution status for the step is not available.
(2) Desc - A description of the step (string, optional).
(3) Path - The file path of the step (string, optional).
(4) LineNum - The step line number (string, optional). The default value is "0."
Passing NULL as the ItemData argument creates a virtual object, one that does not appear in the project database. After creating the item, use the relevant object properties to fill the object, then use the Post method to save the object in the database.
This is the recommended technique for creating most objects that will be saved in the database. Exceptions are noted where appropriate in the specific factory object descriptions.
You can also pass an ItemData argument identifying the item to be added. When this syntax is used, no check is performed on whether all required fields have been initialized. This is safe when the item is never going to be added to the database, as in populating a list for display.