Custom tests that change ALM entities that are subject to versioning must check in and out when changing the entities affected. Use TDAPIOLELib.IVersionControl.CheckOut and CheckIn. For more information, see the Open Test Architecture Reference.
To support pinning a test set to a version, implement the run Method so that it acquires the OTA Test
reference from the TSTest
. The Test
reference returned by the TSTest.Test
property is the correct pinned version.
To enable the versioning and baseline functionality, provide a configuration file. The file provides meta-data for versioning and baseline-related operations on the custom test. Legacy test type applications will run without adding this file. However, we strongly recommend that you add this file to your application to improve performance and reduce storage requirements.
No code changes are required to support Baselining beyond providing this configuration file.
Place the versioning configuration file on the Application Lifecycle Management server at \sa\DomsInfo\MetaData\TEST\.
Sample Versioning Configuration File
Versioning File |
Copy Code
|
---|---|
<Test Type="MyTestType"> <Repository> <Folders Filter="MyFolder|My2ndFolder"> <Folders Filter="MySubFolder|My2ndSubFolder" BlindCopy="true"> </Folders> <Files ID="FileSet1" Filter="*.mSF1|*.mSF2"/> <Files ID="FileSet2" Filter="myFile1.ext|myFile2.ext"/> </Folders> </Repository> <Versioning Enabled="true"/> <Baselining Enabled="true"> <Pinning Enabled="true"/> </Baselining> </Test> |
XML Elements
Element | Description |
---|---|
TestType | The name of the custom test type. |
Repository | The container for files and folders to be copied when creating new versions. |
Folders | The configuration of the directory tree to copy. A Folders element must have a Filter attribute. The ID and BlindCopy attributes are optional. If there is more than one Folders element at the same level in the same containing element, the ID attribute is mandatory. A Folders element can contain Folders elements and Files elements. |
Files | The configuration of the files to be copied in the folders defined in the containing Folders element. The Filter and ID attribute are optional. If there is more than one Files element at the same level in the same Folders container, the ID attribute is mandatory. |
Versioning | The value of the boolean Enabled attribute indicates whether versioning is enabled for the test type. Set Enabled to true if your implementation supports Versioning. |
Baselining | The value of the boolean Enabled attribute indicates whether baselining is enabled for the test type. Set Enabled to true if your implementation supports Baselining. The Baselining element can contain a Pinning element. |
Pinning | The value of the boolean Enabled attribute indicates whether pinning a run to a test set version is enabled for the test type. If this attribute is set true but the custom test type code does not support pinning, the most recent version of the test is used. |
XML Attributes
Attribute | Description |
---|---|
BlindCopy | If BlindCopy is true, the complete trees whose roots are the folders specified by the Filter are copied. If there is a Files element contained in the Folders element, it is ignored. To copy only selected files in a tree, do not use BlindCopy. Use nested Folders elements that contain Files elements with the appropriate Filter attributes. If BlindCopy is false or not present, only the files specified in the contained Files elements are copied. If there are no contained Files elements, the folders specified in the Filter attribute are created and remain empty. |
Enabled | Set to true if your implementation supports the feature. To support Pinning, get the Test object from the TSTest in the run Method. If your application changes any entity that is subject to version control, use the REST check-in and check-out resources or the TDAPIOLELib.IVersionControl.CheckOut and CheckIn when changing the entity. |
Filter | The Folder or File items to include. Wildcards are supported. |
ID | An identifier for an element is required when more than one element of the same type exists and the elements are direct children of the same parent element. The value of the ID must be unique among children of the same parent. |