Main Content

getProducedTestExecutionRecord

Get locally stored test execution record traceability link from Open Services for Lifecycle Collaboration (OSLC) test result resource object

    Description

    example

    executionURL = getProducedTestExecutionRecord(myTR) returns the rdf:resource attribute of the RDF/XML element oslc_qm:producedByTestExecutionRecord for the test result myTR. 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.

    Examples

    collapse all

    This example shows how to get the OSLC test execution record resource URL that produced the test result and the test case resource URL that the test result reports on.

    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 result resource type. Query the service provider for existing test results.

    myQueryCapability = getQueryService(myClient,'TestResult');
    testResults = queryTestResults(myQueryCapability)
    testResults = 
    
      1×9 TestResult array with properties:
    
        ResourceUrl
        Dirty
        IsFetched
        Title
        Identifier

    Retrieve the test execution record resource URL for the test execution record that produced the test result.

    terURL = getProducedTestExecutionRecord(myTR)
    terURL =
    
      1×1 cell array
    
        {'https://localhost:9443/qm/_CfkIoWYpEeuAF8ZpKyQQtg'}

    Retrieve the test case resource URL for the test case that the test result reports on.

    testCaseURL = getReportsOnTestCase(myTR)
    testCaseURL =
    
      1×1 cell array
    
        {'https://localhost:9443/qm/_ibz6tGWYEeuAF8ZpKyQQtg'}

    Input Arguments

    collapse all

    OSLC test result resource, specified as an oslc.qm.TestResult object.

    Output Arguments

    collapse all

    OSLC test execution record resource URL, returned as a cell array.

    Introduced in R2021a