mikepenz/xray-action

Bug: Using Xray format on Jira Server causes to 404 error

radamlhind opened this issue · 4 comments

Hey there,

just wanted to use the XRAY Importer Github Action to inject our test results in Github Actions to our Jira. We use Jira Server and Xray format. Just saw that the importer run into problems:
Server responded with error (Unexpected token < in JSON at position 0): <?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>404</status-code><message>null for uri: https://xxx.com/rest/raven/2.0/import/execution//multipart</message></status>

With a look on the URL, I noticed that there seems to be an issue within your xray-action. Noticed that you give the ability to use the test exec formats "xray" and "cucumber" to separate the API URL, but recording to XRAY API doc, only xray format is allowed (see https://docs.getxray.app/display/XRAY/v2.0#/Import/post-import-execution-multipart).

I already created a MR to solve this issue by just using xray text exec format: #621

Thank you very much for the PR.

Looking into the changes. I am not certain on these changes. Looking into the sample code from xray I can see that their code differentiates for the raven endpoint. (and that code should be correct)

https://github.com/Xray-App/xray-code-snippets/blob/main/use_cases/import_automation_results/java/xray-code-snippets/src/main/java/com/xblend/xray/XrayResultsImporter.java#L229-L254

Hey @mikepenz . Just had another look into the XRAY API doc and didn’t noticed the following hint: „… all endpoints from version 1.0 are also available in version 2.0“. So you are right, the cucumber endpoint should still work.

Anyway, we need a solution for the ability to use xray format as by now the action will try to send the files to the endpoint https://xxx.com/rest/raven/2.0/import/execution//multipart which causes to an 404 due to the not needed file format. Maybe I will have time to dig into it this weekend.

BR, René

@mikepenz Updated the MR, but not quite happy with the solution. 😄 If you have another one, would be awesome if you can provide it as our project depends on the xray importer and would love to use your Action!