DesignStep object

A DesignStep object represents a design step of a test.

You get a DesignStep object from aDesignStepFactory object.

Public methods

This object supports the following methods.

Method Description

LockObject

Locks the object. Returns true if the object has been changed on the server.

Syntax: LockObject()

If an object is locked, no other user can change or delete it.

LockObject returns True if the object on the server was more recently changed than the local copy when LockObject was called. In this case, the local copy of the object is refreshed before LockObject returns.

If the object cannot be locked, an exception is thrown. Some cases of lock failure are if the object:

  • does not exist.

  • is locked by another user.

  • is locked by the same user in a different session.

Post

Posts all changed values into database.

For details, see  Post.

Refresh

Reads saved values, overwriting values in memory.

For details, see  Refresh.

Undo

Undoes changes to field values that have not been posted.

Syntax:Undo()

UnLockObject

Unlocks the object.

Syntax: UnLockObject()

Public properties

Property R/W Type Description

Attachments

R Object

The AttachmentFactory object for the defect. See AttachmentFactory object.

Syntax: DesignStep.Attachments

AutoPost

R/W Boolean

If true, the database is updated immediately when the field value changes.

Syntax: DesignStep.AutoPost

AutoUnlock

R/W Boolean

Indicates whether to make the item changeable to other users automatically after a Refresh or Post.

Syntax: DesignStep.AutoUnlock

Field

R/W Any

The value of the specified field.

Syntax: DesignStep.Field[fieldName]

Parameter:

  • fieldName. A string that represents the name of the field in the project database. Use all upper case.

FieldMultiValue

R/W Object

The MultiValue object of the specified field. See MultiValue object.

Syntax: DesignStep.FieldMultiValue[fieldName]

Parameter:

  • fieldName. A string that represents the name of the field in the project database. Use all upper case.

HasAttachment

R Boolean

Checks if the design step has one or more attachments.

Syntax: DesignStep.HasAttachment

ID

R Number

The item ID.

Syntax: DesignStep.ID

IsLocked

R Boolean

Checks if the design step is locked for editing.

Syntax: DesignStep.IsLocked

IsLocked is set by the LockObject method and is reset by the UnlockObject method.

If the object has an AutoUnlock property and the property is set to True, IsLocked is also reset by a Post or Refresh operation.

LinkTest

R Object

A test to be linked to the design step.

Syntax: Bug.LinkTest

LinkTestID R Number

The ID of the linked test.

Syntax: DesignStep.LinkTestID

Modified

R Boolean

Checks if the item has been modified since last refresh or post operation. If true, the field properties on the server side are not up to date.

Syntax: DesignStep.Modified

Order R/W Number

The order of the design step in the test procedure.

Syntax: DesignStep.Order

ParentTest R Object

The test object to which the design step belongs.

Syntax: DesignStep.ParentTest

StepDescription R/W String

The description of the design step.

Syntax: DesignStep.StepDescription

StepDescription returns the string as entered. If the description includes parameters, StepDescription returns the parameter enclosed by <<<>>>. For example, <<<username>>>.

StepExpectedResult R/W String

The expected results of the step.

Syntax: DesignStep.StepExpectedResult

StepExpectedResult returns the string as entered. If the expected result includes parameters, StepExpectedResult returns the parameter enclosed by <<<>>>. For example, <<<username>>>.

StepName R/W String

The design step name.

Syntax: DesignStep.StepName

TypeName

R String

The field's type.

Syntax: DesignStep.TypeName

Virtual

R Boolean

Checks if this is a virtual item, that is, an item that does not have a corresponding database record.

Syntax: DesignStep.Virtual

Back to top