Gerben Jongerius
All projects

Xray Gradle Plugin

A Kotlin Gradle plugin that converts JUnit reports and submits test results to Xray from a Gradle task.

  • Kotlin
  • Gradle
  • JUnit

The challenge

How can a Gradle build publish automated test results to Xray as part of a repeatable workflow?

Architecture

  1. JUnit reports
  2. Gradle reporting task
  3. Xray API
The reporting task takes the test output, passes it through a JUnit report converter, and uses an API client to send the converted result to Xray.

Engineering decisions

Expose reporting as a Gradle task

Keep the publishing step visible in the build so it can be invoked from local or CI workflows.

Separate conversion and API calls

Keep report translation independent from the client that submits the results.

Engineering takeaway

Treat report conversion and result delivery as separate concerns. The converter can be exercised with report files independently of the external API.