Main Content

createTestCase

Create test case in OSLC service provider

Since R2021a

    Description

    example

    myTestCase = createTestCase(myCreationFactory,title) creates a test case with the specified title created 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 case 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 case resource type.

    myCreationFactory = getCreationFactory(myClient,'TestCase');

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

    newTestCase = createTestCase(myCreationFactory,'My New Test Case');
    fetch(newTestCase,myClient);
    newTestCase
    newTestCase = 
      TestCase with properties:
    
        ResourceUrl: 'https://localhost:9443/qm/resource/itemName/_a9aS...'
              Dirty: 0
          IsFetched: 1
              Title: 'My New Test Case'
         Identifier: '301'

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

    show(newTestCase)

    Input Arguments

    collapse all

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

    Test case title, specified as a character array.

    Output Arguments

    collapse all

    OSLC test case resource, returned as an oslc.qm.TestCase object.

    Version History

    Introduced in R2021a