OpenTestFromBaseline Method

Description

Opens an existing test from the specified ALM baseline.

Syntax

Visual Basic
Public Sub OpenTestFromBaseline( _
   ByVal TestPath As String, _
   ByVal Library As String, _
   ByVal Baseline As String, _
   Optional ByVal SaveCurrent/SaveAll As Boolean = False _
) 

Parameters

TestPath

The full ALM path of the test to open.
LibraryThe full library path for the library containing the baseline. For example: Libraries\MyLibFolder\LibName

Baseline

The name or ID of the baseline. If you specify the baseline ID, then enter an empty string for the Library argument.

SaveCurrent

(UFT One versions 2021 R1 and earlier)

Indicates whether to save changes for the selected open test, component, or application area in the currently open solution before opening the specified test.

  • True: Saves the selected open test, component, or application area in the currently open solution.

  • False: Closes the selected open test, component, or application area in the currently open solution without saving. (Default)

SaveAll

(UFT One versions 2022 and later)

Indicates whether to save changes for all open tests, components, and application areas in the currently open solution before opening the specified test.

  • True: Saves all open tests, components, and application areas in the currently open solution.

  • False: Closes all open tests, components, and application areas in the currently open solution without saving. (Default)

Remarks

When you open a test from a baseline, it always opens in read-only mode. To open a version-controlled test for editing, use the Test.CheckOut method and then open the test using the Application.Open method.

Example

Open an Run a Test from a Specific Baseline in an ALM Library

See Also

Application Object