Main Content

createTestScript

Create test script in OSLC service provider

Since R2021a

    Description

    example

    myTestScript = createTestScript(myCreationFactory,title) creates a test script with the specified title by using the 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 script 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 script resource type.

    myCreationFactory = getCreationFactory(myClient,'TestScript');

    Use the creation factory to create a test script resource with the creation factory with the title My New Test Script. Retrieve the full resource data from the service provider for the test script resource and inspect the resource.

    newTestScript = createTestScript(myCreationFactory, ...
        'My New Test Script');
    fetch(newTestScript,myClient);
    newTestScript
    newTestScript = 
      TestScript with properties:
    
        ResourceUrl: 'https://localhost:9443/qm/resource/itemName/_b19w2...'
              Dirty: 0
          IsFetched: 1
              Title: 'My New Test Script'
         Identifier: '498'

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

    show(newTestScript)

    Input Arguments

    collapse all

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

    Test script title, specified as a character array.

    Output Arguments

    collapse all

    OSLC test script resource, returned as an oslc.qm.TestScript object.

    Version History

    Introduced in R2021a