avajs / avajs/ava

Support a proper junit reporter

Open
#3,262 1 comment 4 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
20.8k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

## Feature

Add a JUnit reporter and allow saving the output to a file.

## Motivation

JUnit reporting format is a standard used by many CI/CD tools, like gitlab, CircleCI, etc.

If you do CI/CD, JUnit reporting is great to improve user experience while maintaining software packages and related tests.

In addition, NodeJS test runner supports very well out-of-the-box the junit reporter and concurrency at the same time. Since ava lacks proper support for junit reporting, it risks to become outdated and lose effectiveness.

## The problem

Ava does not support JUnit reporter.

Even though it supports tap reporters, and you can use tap parser to transform the tap output into a junit reporter, however ava does not provide full information to the tap reporter and therefore does not allow to build a proper junit report.

As example, time duration is missing.

There is an [issue open](https://github.com/avajs/ava/issues/1668) to add duration, however doing it only on `--serial` would be not enough to build a proper junit report.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing AVA's existing TAP reporter support and the related duration issue #1668. Determine how a JUnit reporter should preserve test duration and concurrent results, and how its output should be saved to a file. Done means AVA can produce a proper JUnit report with the required information while retaining concurrency support.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.