Hello,
we need to have the list of test plans linked to a test case (using test case id) with
POST - /rest/raven/1.0/import/execution command?
Thanks.
Hi @Cyril
To retrieve a list of test plans linked to a test case, utilize the Xray API.
You can query test executions associated with the test case by using the following endpoint: GET /api/v2/testexec?jql=test=your_test_case_id. In the response, look for the testPlanKey field, which identifies the linked test plans.
Note that the /rest/raven/1.0/import/execution endpoint is specifically designed for importing test execution results and is not suitable for retrieving linked test plans.
By leveraging the Xray API, you can efficiently fetch the test plans related to your test case.
Hope this helps - Happy to help further!!Thank you very much and have a great one!Warm regards
thanks a lot for your help.
In fact, I need to use the test case id to be able to find the test plan without using the test execution (which does not yet exist).
Do you have any idea?
@Cyril
Retrieve the details of TEST-123.
GET /rest/api/2/issue/TEST-123
Identify that the custom field customfield_18045 represents the test plan.
url -X GET \
https://your-jira-instance.atlassian.net/rest/api/2/issue/TEST-123 \
-H 'Authorization: Bearer your-api-token' \
-H 'Content-Type: application/json'
Extract the value of customfield_18045, which might be TP-1.
In the response JSON
{
"fields": {
"customfield_18045": ["TP-1"]
}
Optionally, retrieve more details about TP-1 if needed.
GET /rest/api/2/issue/TP-1
Best Regards
issue solved.
It looks like you're new here. Sign in or register to get started.