Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Adding suiTest test case to test plan via API

Ilya Lyaukin June 30, 2015

Hi,

I`m using JIRA with suiTest plugin and want to create Test plan automatically from our automated tests.

In web Test plan creation form uses custom component to select test case templates. Is there any way to pass them through json API?

/createmeta for Test plan issue type contains

"customfield_13503": {
  "required": false,
  "schema": {
    "type": "string",
    "custom": "com.intenso.jira.plugins.suiTest:testCaseTemplates-selector",
    "customId": 13503
  },
  "name": "TC Templates",
  "hasDefaultValue": false,
  "operations": ["set"]
},

But passing test case templates list in customfield_13503 does not work.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Łukasz_Krupa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 30, 2015

Hi,

Use issueId instead of issueKey. If you have more test cases use comma to separate ids:

{
"fields": {
"customfield_10004": "10101,10102"
}
}

It works for me. That will create new Test Case under Test Plan.

What is your next step? How do you know which Test Case Templates are for your automated tests? 

 

 

 

Ilya Lyaukin July 1, 2015

Hi Lukasz, This did not work out too. BTW, when I query existing Test plan, I see list of test cases keys in this field, not test case templates. We're linking tests with test case templates in jira by name, and going to update test cases after test run (this step is working already, only trouble is creating test plan automatically).

Łukasz_Krupa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 1, 2015

That's strange it didn't work out. Could you attach your JSON, please? In example above I used existing (but empty) Test Plan and then HTTP PUT method to update testCaseTemplates-selector CF.

Ilya Lyaukin July 1, 2015

My json for create: {"fields": {"project": {"id": "13608"}, "customfield_15405": [{"value": "WMS"}], "issuetype": {"name": "Test plan"}, "customfield_13503": "126037,128135,128461,128256,126013,126016,128386,126009,128522,128175,128224", "summary": "WMS. New tasks 1.7.6"}} For update; {"fields": {"customfield_13503": "126037,128135,128461,128256,126013,126016,128386,126009,128522,128175,128224"}} Both do not work.

Łukasz_Krupa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 1, 2015

It looks ok. I am using JIRA 6.3.7 and SuiTest v2.9-j63. Which are yours versions?

TAGS
AUG Leaders

Atlassian Community Events