Main Content

oslc.qm.TestExecutionRecord

Test execution record resource for OSLC quality management domain

    Description

    The oslc.qm.TestExecutionRecord object represents test execution record resources in the quality management domain of the Open Services for Lifecycle Collaboration (OSLC) service provider. After creating and configuring oslc.Client and oslc.core.QueryCapability objects, query the service provider for available test execution record resources by using the queryTestExecutionRecords function.

    Creation

    Create an oslc.qm.TestExecutionRecord object by using the createTestExecutionRecord function.

    Properties

    expand all

    Navigation URL for the test execution record resource, specified as a character array.

    Indicator for uncommitted changes to the test execution record resource, specified as a logical 1or 0 where:

    • 1 indicates the test execution record resource has uncommitted changes.

    • 0 indicates the test execution record resource has no uncommitted changes.

    Data Types: logical

    test execution record resource fetch status, specified as a logical 1 or 0 where:

    • 1 indicates the test execution record resource is fetched.

    • 0 indicates the test execution record resource is not fetched.

    Data Types: logical

    Test execution record title, specified as a character array.

    OSLC test execution record resource identifier, specified as a character array.

    Object Functions

    addResourcePropertyAdd resource property to local OSLC resource object
    addTextPropertyAdd text property to local OSLC resource object
    commitSend local changes to OSLC service provider
    fetchRetrieve full resource data from OSLC service provider
    getPropertyGet local contents of text property from OSLC resource object
    getRDFGet resource RDF/XML data from OSLC resource object
    getResourcePropertyGet local contents of resource property from OSLC resource object
    getRunsTestCaseGet locally stored test case traceability link from OSLC test execution record resource object
    removeRemove resource from OSLC service provider
    removeResourcePropertyRemove resource property from local OSLC resource object
    setPropertySet local contents of text property for OSLC resource object
    setRDFSet RDF content for local OSLC resource object
    setResourceUrlSet resource URL for local OSLC resource object
    showView OSLC resource in system browser

    Examples

    collapse all

    This example shows how to submit a query request for test execution record resources with a configured OSLC client, edit an existing test execution record resource, and commit the changes to the service provider.

    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.

    myQueryCapability = getQueryService(myClient,'TestExecutionRecord');

    Submit a query request to the service provider for the available test execution record resources.

    testERs = queryTestExecutionRecords(myQueryCapability)
    testERs = 
    
      1×2 TestExecutionRecord array with properties:
    
        ResourceUrl
        Dirty
        IsFetched
        Title
        Identifier

    Assign a test execution record resource to the variable myTestER. Retrieve the full resource data from the service provider for the test execution record resource. Examine the Title property.

    myTestER = testERs(1);
    status = fetch(myTestER,myClient)
    status = 
    
      StatusCode enumeration
    
        OK
    title = myTestER.Title
    title =
    
        'Test Case 1'
    

    Edit the test execution record title and commit the change to the service provider.

    myTestER.Title = 'My New Test Execution Record Title';
    status = commit(myTestER,myClient)
    status = 
    
      StatusCode enumeration
    
        OK

    Open the test execution record resource in the system browser by using the show function.

    show(myTestER)

    This example shows how to submit a creation request for a new test execution record 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 creation factory for the test execution record resource type.

    myCreationFactory = getCreationFactory(myClient,'TestExecutionRecord');

    Use the creation factory to create a test execution record resource with the title My New Test Execution Record and associate it with the test case resource URL testURL from a test case. For more information about querying the service provider for test cases, see Edit a Test Case and Commit Changes. Retrieve full resource data from the service provider for the test execution record resource and inspect the resource.

    newTestER = createTestExecutionRecord(myCreationFactory, ...
        'My New Test Execution Record',testURL);
    fetch(newTestCase,myClient);
    newTestER
    newTestER = 
      TestExecutionRecord with properties:
    
        ResourceUrl: 'https://localhost:9443/qm/oslc_qm/resources/CfkIoW...'
              Dirty: 0
          IsFetched: 1
              Title: 'My New Test Execution Record'
         Identifier: '301'
    

    Open the test execution record resource in the system browser by using the show function.

    show(newTestER)
    Introduced in R2021a