Hello,
I am using Jira v8.5.1 and I am currently working on a project that involves XRAY APIs.
I need to import a Cucumber Test file, so I'm using the POST /rest/raven/1.0/import/feature API.
But now, the client is asking me to import it into a specific XRAY Test Repository.
I could not find so far any solution to this in the documentation. I found how to create a repository, but not how to upload a feature file directly into it.
Do you have any idea how I could achieve this ?
Thanks a lot for your help.
Cedric
This improvement suggestion is currently Under Consideration.
Although we don't yet have a release date to include it in the product, we considered this an important feature, and we're looking to release it when possible.
Thank you.
Kind regards,
Rogério Paiva [Xray Support Team]
Hi X-Ray! We're 1,5 year later now since the previous response. Are there any plans to have the import take note of the position in the repository automatically? It would avoid us a lot of manual work to put the Tests on the right place. I imagine that in case you import a ZIP file with feature files in folders, it would automatically try to map the folder names to Repository paths. Current behaviour is that the folder in which the feature resides is becoming a JIRA Label. Another solution would be have a Label-to-Repository-path option in X-Ray itself?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Cedric,
Currently, this is not possible. However, we have this suggestion already in our backlog: XRAY-4408
Best Regards,
Team Xray
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Cedric Mathis,
Can you please let me know how you are using POST /rest/raven/1.0/import/feature API. I am facing issues with this API. Please send me header section and complete URL for this request.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am using a simple curl for this API :
curl -H "Content-Type:multipart/form-data" -u $CREDENTIALS -F "file=@$FILE_LOCATION" https://$JIRA_URL/rest/raven/1.0/import/feature?projectKey=$PROJECT_KEY
With parameters :
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<status>
<status-code>404</status-code>
<message>null for uri: https://JIRAURL/rest/raven/1.0/import/feature?projectKey=$projectKey</message>
</status>
I am getting this response when I am hitting this request using POSTMAN. Credentials I have passed as Basic Auth in header of request
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.
I needed an account to Jira, but that's it. There are no specific rights (basic rights, jira-users).
The "null for uri" is like the page you're trying to reach does not exist.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the same problem!
http://mysite.atlassian.net/rest/raven/1.0/import/feature?projectKey=myproject, I have this uri and I'm authenticating with token in basic auth.
Postman returns null for uri 404, and I don't know what is missing...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Julia,
Personnaly, I did it with curl, like this, and this is working just fine:
curl -H 'Content-Type:multipart/form-data' -u $USERNAME:'$PASSWORD' -F 'file=@${IMPORT_FILE}' https://${JIRA_URL}/rest/raven/1.0/import/feature?projectKey=${PROJECT_KEY}
Just be sure that the user is defined in Jira, and that should do it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Cedric,
I have same issue. The only diferent thing is that i use a Token for authenticated and when I send the request, the response is 404.
The Token was correctly generated and i checked it.
Maybe I don't use correctly the API for Jira Cloud and Xray?
Is correct for Jira Cloud and Xray, use this url, "https://myCompany.atlassian.net/rest/raven/1.0/import/feature?projectKey=${PROJECT_KEY}"
Regards.
Edit: It solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad to see that it is solved.
Nevertheless, let me leave a general explanation of how the API works in Xray Cloud:
Thank you.
Kind regards,
Rogério Paiva [Xray Support Team]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.