0

I use Serenity Junit archetype and I want to send back the results and update tests in XRAY.

Junit has very limited support, it can't be used at all for data driven tests and the test is mapped to a Generic test which doesn't have steps and datasets. Therefore I have to use XRAY JSON format to submit all the info I need.

The testcases are created manually in XRAY, they are of type "Manual". Using this format I can update correctly both all the iterations and all the steps. The problem is that Serenity JSON report even though it has a lot of info, it doesn't have everything that XRAY needs to correctly update the ticket.

I tried to omit adding in the JSON file "steps" object since they are already created in XRAY but omitting the field will delete the steps in XRAY too.

A nice thing would be to have in Serenity a custom report, ready to be updated in XRAY. Also XRAY should give the possibility to update only some fields without deleting what was omitted.

Did anybody try to submit the results from Serenity Junit to XRAY via XRAY own JSON format?

Thanks in advance

  • 1. Can you please clarify how exactly you're building the Xray JSON report? 2. So you're creating a manual test in Xray and then you aim to implement some test in JUnit that "automates" the Test you have in Xray, is that it? – Sérgio May 03 '22 at 15:18
  • Hi Sergio. Yes, I am creating a manual step in x-ray with steps and datasets. Then I am implementing the test in Serenity. The test name must match the name of the issue because it is written in the JSON files created by serenity after each run. One file for each test is created. After the run, programatically I read all the JSON files from serenity, I take the fields I need , and I create one big JSON file having different schema of course.This represents the X-ray JSON format. How the X-ray JSON file should look like you can check it in their documentation. – Barta Mihai May 04 '22 at 15:14
  • Then this file is imported in a test execution in x-ray and the test are updated. This way we can see separately the status for each csv line and foreach step. – Barta Mihai May 04 '22 at 15:15
  • Cool, love to see that :) btw, I work for the Xray team. On your question, I'm not anyone in particular using that flow. It would be great to have a tool to make a bit, more or less, what you have done. – Sérgio May 04 '22 at 15:50
  • Yes, indeed. A custom serenity plugin to automatically create the X-ray JSON would be the best solution since serenity has almost everything we need to create it. – Barta Mihai May 04 '22 at 16:45
  • One thing that I couldn't create because I didn't have that info in serenity is the "testinfo.steps" object , especially "data" field. But since this is static and it can be created in x-ray once, I realized that if I send it having null value it will remain unchanged in x-ray. – Barta Mihai May 04 '22 at 16:51

0 Answers0