1. tap-xunit
TAP to xUnit XML converter.
tap-xunit
Package: tap-xunit
Created by: aghassemi
Last modified: Mon, 27 Jun 2022 03:51:01 GMT
Version: 2.4.1
License: MIT
Downloads: 111,448
Repository: https://github.com/aghassemi/tap-xunit

Install

npm install tap-xunit
yarn add tap-xunit

Build Status
Issue Stats
Issue Stats
tap-xunit

Converts TAP to xUnit XML format.

TAP output from testing frameworks such as tape or node-tap can be piped directly to tap-xunit

node test.js | tap-xunit

console window showing tap-xunit example

Installation

npm install tap-xunit -g

Usage

CLI

node test.js | tap-xunit

less results.tap | tap-xunit --package="MyCompany.MyTool" > results.xml

By default TAP comments are used as test-suite names and considered to mark test boundaries. CLI flag --dontUseCommentsAsTestNames can be used to turn that feature off, in which case comments are ignored and
all assertions go inside a single <testsuite name="Default"> with name Default

Library

var converter = require('tap-xunit');

// Optional configuration
var opts = {}

var tapToxUnitConverter = converter(opts);

tapInputStream.pipe(tapToxUnitConverter).pipe(xUnitOutStream);

Options

Options can be passed as CLI arguments by being prefixed with --

dontUseCommentsAsTestNames

default: false

By default TAP comments are used as test-suite names and considered to mark test boundaries.
This option can be used to turn that feature off, in which case comments are ignored and
all assertions go inside a single <testsuite name="Default"> with name Default

replaceWithUnicodeDot

default: false

Whether the '.' in test-suite names should be replaced with a Unicode homoglyph.
This feature exists because many xUnit reporters assume '.' in test-suite name implies package hierarchy, which may not be the case.

package

default: ''

If specified, all test-suites will be prefixed with the given package name.
NOTE: replaceWithUnicodeDot option does not apply to package and . can be used to specify package hierarchy.

License

MIT

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code