Hi, I cannot find how to create/get testplan or testset via rest-api.
I search in Jira's native REST API, but I still cannot find how to do it.
Could someone help me ?
Hi Kamil,
Creating a testplan or testset via rest-api is similar to creating a test.
You can find the steps/example in this links:
https://confluence.xpand-addons.com/display/XRAY31/Tests+-+REST#Tests-REST-CreatingandEditingTests-JiraRESTAPI
https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/#creating-an-issue-examples
Best regards,
Xpand Add-ons Team
hi @José Domingues [Xray],
please have you a script or a document to help me , I'am very new on JIra xray & jira rest api
thanks in advance
{ "fields": { "project": { "key": "PROJECT_KEY" }, "summary": "[Name]", "description": "[Description]", "issuetype": { "name": "Test" // for example "Test Plan" ,also "Test Set" } } }
Hi,
could we have some further example as on the way to attach a test set to a test plan?
Can it be done on the API request of the creation of the test set?
Thanks in advance
Good morning.As a topic starter we use Jira + X-Ray.I can't create a TestPlan via jira api.
When I send a post request to https://jira_host/jira/rest/api/2/issue/with body
{ "fields": { "project": {"key": "PROJECT_KEY"}, "summary": "[Name]", "description": "[Description]", "issuetype": {"name": "Test Plan"},}, "update": { "issuelinks": [ {"add": {"type": {"id": "11700"}, "outwardIssue": {"key": "ISSUE_KEY"}}}]},}
I get an error with status code 400: errors: {"issuelinks": "Введите запрос для связи"}"Введите запрос для связи" means specify issue to link, I don't know exactly how it in english version.
If I create a Test Plan using the web interface then I must specify a link to the ISSUE_KEY.
I've found workaround: I can create two issues and than change issue type for one of them:
Creation parameters for post request:
{ "fields": { "project": {"key": "PROJECT_KEY"}, "summary": "[Name]", "description": "[Description]", "issuetype": {"id":"10701"} }}
After creation I send PUT request tohttps://jira_host/jira/rest/api/2/issue/ISSUE_ID for change issue type.
with body:
{ "fields": { "issuetype": {"name": "Test Plan"}}, "update": { "issuelinks": [ { "add": { "type": { "id": "11700" }, "outwardIssue": { "key": "KEY_TO_LINK"}}}]}}
After above manipulations I have desired result. But I don't like this approach.Please, help me to figure out. Are the any features of creation an ISSUE that must be related with another one.
It looks like you're new here. Sign in or register to get started.