This is an overview to help you understand the code example. The example assumes the existence of some unknown testing tool.
There are two tests of some type known to the testing tool. Tests of this type are composed of units of code called TestActions. TestActions are maintained independently. A test can be composed of any number of TestActions. Tests can also use TestActions that belong to other tests.
In this example there are two such tests, QueryAvailability and IssueTicket. IssueTicket is composed two TestActions, Authenticate and LaunchJob. The Authenticate TestAction is also used by the QueryAvailability test. In addition, when running QueryAvailability, a resource file is needed. The resource is a run-time library.
The fact that the user assets represent TestActions to the testing tool is not passed to ALM. The fact that the resource is a run-time library is also not passed. ALM has no knowledge of the nature of the assets nor of the logical meaning of the relations.
After the setup is complete, the tests can be downloaded to edit or run.
When downloading for editing, pass "EDIT" as the Condition argument for the Download function. The result is:
The resource file is not downloaded for editing.
When downloading to run the tests, pass "RUN" as the Condition argument for the Download function. The result is:
The download function returns an XML document describing the entities downloaded. Below is an example of such a document:
<Owners>
<Owner>
<OwnerId>25</OwnerId>
<OwnerType>TEST</OwnerType>
<Name><![CDATA[QueryAvailability&cd;></Name>
<FSPath><![CDATA[Test\QueryAvailability_25\25\25&cd;></FSPath>
<QCPath><![CDATA[Subject\newFolder1\QueryAvailability&cd;></QCPath>
<Relation>
<RelatedId>1025</RelatedId>
<RelatedType>USER_ASSETS</RelatedType>
<Name><![CDATA[Authenticate&cd;></Name>
<FSPath><![CDATA[Test\IssueTicket_26\26\26&cd;></FSPath>
<QCPath><![CDATA[Subject\newFolder1\IssueTicket&cd;></QCPath>
<Condition>NONE</Condition>
<Order>1</Order>
</Relation>
<Relation>
<RelatedId>1009</RelatedId>
<RelatedType>RESOURCES</RelatedType>
<Name><![CDATA[Resource for running QueryAvailability&cd;></Name>
<FSPath><![CDATA[resources\1009&cd;></FSPath>
<QCPath><![CDATA[Resources\Resource for running QueryAvailability37&cd;></QCPath>
<Condition>RUN</Condition>
<Order>2</Order>
</Relation>
</Owner>
</Owners>
See the code example.