See all operations
POST: projects/{project_id}/test-sets/{test_set_id}/test-case-mapping/{test_case_id}?owner_id={owner_id}&existing_test_set_test_case_id={existing_test_set_test_case_id}&planned_date={planned_date}
Description
Maps a test set to a test case, so that the test case is part of the test set. User must be able to modify test cases and test sets.
You can only pass in a test case id not a test case folder id. Position cannot be set in this method. If a custom order is desired, you must use the PUT method after creation to achieve it.
How to Execute
To access this REST web service, you need to use the following URL (make sure to replace any parameters (eg {project_id}) with the relevant value (eg 1):
https://api.inflectra.com/Spira/Services/v7_0/RestService.svc/projects/{project_id}/test-sets/{test_set_id}/test-case-mapping/{test_case_id}?owner_id={owner_id}&existing_test_set_test_case_id={existing_test_set_test_case_id}&planned_date={planned_date}
Request Parameters
Name
|
Description
|
project_id
|
The id of the current project
|
test_set_id
|
The id of the test set being mapped
|
test_case_id
|
The id of the test case being mapped
|
owner_id
|
Optional: the owner of the test case within this test set
|
existing_test_set_test_case_id
|
Optiona: the id of the existing entry we want to insert it before (if not set, will be simply added to the end of the list)
|
planned_date
|
The planned date for the test case in this test set (needs to be in UTC using the format: yyyy-MM-ddTHH:mm:ss.fff)
|
Request Body
<ArrayOfRemoteTestSetTestCaseParameter xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v7_0.DataObjects">
<RemoteTestSetTestCaseParameter>
<ConcurrencyGuid i:nil="true" />
<Guid i:nil="true" />
<LastUpdateDate i:nil="true" />
<Name i:nil="true" />
<TestCaseParameterGuid i:nil="true" />
<TestCaseParameterId>0</TestCaseParameterId>
<TestSetTestCaseId>0</TestSetTestCaseId>
<Value i:nil="true" />
</RemoteTestSetTestCaseParameter>
</ArrayOfRemoteTestSetTestCaseParameter>
[{"TestSetTestCaseId":0,
"TestCaseParameterId":0,
"TestCaseParameterGuid":null,
"Name":null,
"Value":null,
"Guid":null,
"ConcurrencyGuid":null,
"LastUpdateDate":null}]
Return Data
The JSON and XML examples below show the shape of one entry that will be returned. It does not show an example of how that entry will be populated.
<ArrayOfRemoteTestSetTestCaseMapping xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v7_0.DataObjects">
<RemoteTestSetTestCaseMapping>
<ConcurrencyGuid i:nil="true" />
<Guid i:nil="true" />
<LastUpdateDate i:nil="true" />
<IsSetupTeardown>false</IsSetupTeardown>
<OwnerGuid i:nil="true" />
<OwnerId i:nil="true" />
<PlannedDate i:nil="true" />
<Position i:nil="true" />
<TestCaseGuid i:nil="true" />
<TestCaseId>0</TestCaseId>
<TestSetGuid i:nil="true" />
<TestSetId>0</TestSetId>
<TestSetTestCaseId>0</TestSetTestCaseId>
</RemoteTestSetTestCaseMapping>
</ArrayOfRemoteTestSetTestCaseMapping>
[{"TestSetTestCaseId":0,
"TestSetId":0,
"TestCaseId":0,
"TestSetGuid":null,
"TestCaseGuid":null,
"OwnerId":null,
"OwnerGuid":null,
"PlannedDate":null,
"IsSetupTeardown":false,
"Position":null,
"Guid":null,
"ConcurrencyGuid":null,
"LastUpdateDate":null}]