Skip to content

Provide easier way to manage report in CI/CD

Following

the user can find out the UUID and an attachment and download it.

But this would be tricky to script in a CI/CD.

On one side, we would need a mechanism to filter the attachments we want, the criteria should be:

  • the test technology (JUnit, Cucumber…)
    or
    the fact that the attachment is related to the whole workflow (e.g. the Allure report or the orchestrator logs)
  • a filename pattern (e.g. “target/surefire-reports/*.xml”)
  • [nice to have] the status of the test (e.g. only the failing tests); is this possible?

We should then get all the matching attachments.

But, because of TM datasets and some technologies which use a fixed attachment name (e.g. Robot Framework), we need to avoid file name collision. Additionally, the mechanism used to avoid collision should be exploitable easily by a human.
It may be, for example:

  • A directory whose name is generated from the test reference
  • A subdirectory whose name is an increment (so if the test is executed several times, the attachments are separated)
    The problem is that, in the case of a dataset, the user would have to scan all subdirectories in order to find the one to the dataset row he is interested in.
  • The attachment file system path and file name.
    Having the path would allow GitLab to manage the screenshots (https://docs.gitlab.com/ee/ci/testing/unit_test_reports.html#view-junit-screenshots-on-gitlab) , but is this possible?