You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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 ?
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 to
https://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.
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:
Best regards,
Xpand Add-ons Team
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
please have you a script or a document to help me , I'am very new on JIra xray & jira rest api
thanks in advance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
{ "fields": { "project": { "key": "PROJECT_KEY" }, "summary": "[Name]", "description": "[Description]", "issuetype": { "name": "Test" // for example "Test Plan" ,also "Test Set" } } }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Guille Netsuite and @Lahiru Wijesinghe
First, let me share this link with you where you can find the differences between Test Sets and Test Plan in Xray context.
And here you can find information on how to:
Lastly, you can find all related information about REST API in our documentation and if you need to import tests results (tests runs information) into a Test, you can do also do it by using the REST API (see our guide).
For further information, please, contact the support team.
Best regards,
Xray Team
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.