Main Content

getReportsOnTestCase

Get locally stored test case traceability link from OSLC test result resource object

Since R2021a

    Description

    testCaseURL = getReportsOnTestCase(myTR) returns the rdf:resource attribute of the RDF/XML element oslc_qm:reportsOnTestCase 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.

    example

    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

    Resource URL of the test case that the test result reports on, returned as a cell array.

    Version History

    Introduced in R2021a