Currently, i am planning to import test results in JIRA through REST API. But, what is the expected json format for cucumber/json or any other.
Because when i try to import i am getting the following error "Error in creating test run. Reason : {priority=Priority is required.}".
I could not find the expected format anywhere. Please help me providing a sample format which will successfully creates test run using REST API
Hi @susee_jeeva
You can take a look at this page
https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/
Regards
The link which you have shared is for JIRA Server. But we are using JIRA Cloud so the localhost:8080 will not work for us. Could you please share documentation to create issues in JIRA Cloud.
Waiting for your reply
Thanks,
Susee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @susee_jeeva
You can take a look at this page:
https://docs.atlassian.com/software/jira/docs/api/REST/1000.824.0/
Try this to know all metadata required to create an issue in JIRA.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is what i needed. Thank you so much. By using these REST APIs i am able to create my own issues.
Regards,
Susee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @susee_jeeva
Look at your create screen,the priority fields is maybe required. If so you can make it optionnal or add the priority and its value in your json
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply. But, i am not creating test run manually. I need the test run to be created using REST API.
So, it requires,
apiKey -> which i have provided
format -> which i have provided as cucumber/json
file -> for which i need a expected json structure.
Currently, i am using the following json in my test.json file, in which i have no confident
{
"priority": "high",
"info" :
{
"project": "QCMP",
"priority": "high",
"summary": "Ready",
"description": "Krytoi test"
},
"tests" : [
{
"priority": "high",
"testKey" : "QCMP-37",
"start" : "2016-04-21T14:00:00+01:00",
"finish" : "2016-04-23T16:47:35+03:00",
"comment" : "https://www.google.by/",
"status" : "PASS"
}
]
}
So, i think i need a sample json, which i will provide in the file parameter, so that i can create the test run with test cases.
I am using postman to access REST API
Please, let me know your thoughts.
Thanks,
Susee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @susee_jeeva
Even if you are note creating manually,if the field priority is mandatory in the create screen in jira you have to put it on yor json file, make sure the value allowed is exactly the same that you have on your json.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please find the updated test.json content below.
{
"priority": "P3-Medium",
"info" :
{
"project": "QCMP",
"priority": "P3-Medium",
"summary": "Ready",
"description": "Krytoi test"
},
"tests" : [
{
"priority": "P3-Medium",
"testKey" : "QCMP-37",
"start" : "2016-04-21T14:00:00+01:00",
"finish" : "2016-04-23T16:47:35+03:00",
"comment" : "https://www.google.by/",
"status" : "PASS"
}
]
}
As you can notice, i have provided the priority as P3-Medium and this value is allowed in my JIRA.
But, the problem is, i am not sure of the json structure which i am using. So, i have provided the priority property in all objects available in the above json.
So, if an expected sample json structure is available, i can update my existing json's structure.
So, all i need is, i need to create a test run through REST API.
Please provide your valuable thoughts.
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.