Main Content

oslc.qm.TestPlan

Test plan resource for OSLC quality management domain

Since R2021a

    Description

    The oslc.qm.TestPlan object represents test plan 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 plan resources by using the queryTestPlans function.

    Creation

    Create an oslc.qm.TestPlan object by using the createTestPlan function.

    Properties

    expand all

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

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

    • 1 indicates the test plan resource has uncommitted changes.

    • 0 indicates the test plan resource has no uncommitted changes.

    Data Types: logical

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

    • 1 indicates the test plan resource is fetched.

    • 0 indicates the test plan resource is not fetched.

    Data Types: logical

    Test plan title, specified as a character array.

    OSLC test plan 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
    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
    setResourcePropertySet local contents of resource property from 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 plan resources with a configured OSLC client, edit an existing test plan 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 plan resource type.

    myQueryCapability = getQueryService(myClient,'TestPlan');

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

    testPlans = queryTestPlans(myQueryCapability)
    testPlans = 
    
      1×2 TestPlan array with properties:
    
        ResourceUrl
        Dirty
        IsFetched
        Title
        Identifier

    Assign a test plan resource to the variable myTestPlan. Retrieve the full resource data from the service provider for the test plan resource. Examine the Title property.

    myTestPlan = testPlans(1);
    status = fetch(myTestPlan,myClient)
    status = 
    
      StatusCode enumeration
    
        OK
    title = myTestPlan.Title
    title =
    
        'Test Plan 1'
    

    Edit the test plan title and commit the change to the service provider.

    myTestPlan.Title = 'My New Test Plan Title';
    status = commit(myTestPlan,myClient)
    status = 
    
      StatusCode enumeration
    
        OK

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

    show(myTestCase)

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

    myCreationFactory = getCreationFactory(myClient,'TestPlan');

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

    newTestPlan = createTestPlan(myCreationFactory,'My New Test Plan');
    fetch(newTestPlan,myClient);
    newTestPlan
    newTestPlan = 
      TestPlan with properties:
    
        ResourceUrl: 'https://localhost:9443/qm/resource/itemName/_f56s...'
              Dirty: 0
          IsFetched: 1
              Title: 'My New Test Plan'
         Identifier: '301'

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

    show(newTestPlan)

    Version History

    Introduced in R2021a