Create test result in OSLC service provider
creates a test result with the specified title for the test execution record and test case
specified by the resource URLs
myTR = createTestResult(
testURL, respectively. The resource result status is specified by
status. The resource is created by using the creation factory
myCF in the Open Services for Lifecycle Collaboration (OSLC) service
Create a New Test Result
This example shows how to submit a creation request for a new test result 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 result resource
myCreationFactory = getCreationFactory(myClient,'TestResult');
Use the creation factory to create a test result resource with the title
My New Test
Result and associate it with the test case resource URL specified by
testURL and the test execution record resource URL specified by
executionURL. Set the test result status to
Unverified. For more information about querying the service provider
for test cases and execution records, see Edit a Test Case and Commit Changes and Edit a Test Execution Record and Commit Changes. Retrieve the
full resource data from the service provider for the test result resource and inspect the
newTestResult = createTestResult(myCreationFactory, ... 'My New Test Result',testURL,executionURL,'Unverified'); fetch(newTestCase,myClient); newTestResult
newTestResult = TestResult with properties: ResourceUrl: 'https://localhost:9443/qm/oslc_qm/resources/CdffuW...' Dirty: 0 IsFetched: 1 Title: 'My New Test Result' Identifier: '1456'
Open the test result resource in the system browser by using the
myCF — Resource creation factory
OSLC resource creation factory, specified as an
title — Test result title
Test result title, specified as a character array.
executionURL — Test execution record resource URL
Resource URL of the test execution record to associate with the test result, specified as a character array.
testURL — Test case resource URL
Resource URL of the test case to associate with the test result, specified as a character array.
status — Test result status
Test result status, specified as a character array.
Introduced in R2021a