Main Content

getRunsTestCase

Get locally stored test case traceability link from OSLC test execution record resource object

Since R2021a

    Description

    testCaseURL = getRunsTestCase(myTER) returns the rdf:resource attribute of the RDF/XML element oslc_qm:runsTestCase for the test execution record myTER. For more information about RDF/XML elements, see An XML Syntax for RDF on the World Wide Web Consortium website and QM Resource Definitions on the Open Services for Lifecycle Collaboration (OSLC) website.

    example

    Examples

    collapse all

    This example shows how to get the test case resource URL for the test case run by a test execution resource with a configured OSLC client.

    After you have created and configured the OSLC client myClient as described in Create and Configure an OSLC Client for the Quality Management Domain, create a query capability for the test execution record resource type. Query the service provide for existing test execution records.

    myQueryCapability = getQueryService(myClient,'TestExecutionRecord');
    TERs = queryTestExecutionRecords(myQueryCapability)
    TERs = 
    
      1×2 TestExecutionRecord array with properties:
    
        ResourceUrl
        Dirty
        IsFetched
        Title
        Identifier

    Retrieve a test case resource URL run by one of the test execution records.

    myTER = TERs(1);
    testCaseURL = getRunsTestCase(myTER)
    testCaseURL =
    
      1×1 cell array
    
        {'https://localhost:9443/qm/resources/_NMg4MWJzEeuAF8ZpKyQQtg'}

    Input Arguments

    collapse all

    OSLC test execution record resource, specified as an oslc.qm.TestExecutionRecord object.

    Output Arguments

    collapse all

    Resource URL of the test case that the test execution record runs, returned as a cell array.

    Version History

    Introduced in R2021a