Main Content

createTestExecutionRecord

Create test execution record in OSLC service provider

Since R2021a

    Description

    example

    myTER = createTestExecutionRecord(myCreationFactory,title,testURL) creates a test execution record with the specified title for the test case specified by the resource URL testURL. The resource is created by creation factory myCreationFactory in the Open Services for Lifecycle Collaboration (OSLC) service provider..

    Examples

    collapse all

    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)

    Input Arguments

    collapse all

    OSLC resource creation factory, specified as an oslc.core.CreationFactory object.

    Test execution record title, specified as a character array.

    Resource URL of the test case to associate with the test execution record, specified as a character array.

    Output Arguments

    collapse all

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

    Version History

    Introduced in R2021a