Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aghassemi/tap-xunit
TAP to xUnit XML converter
https://github.com/aghassemi/tap-xunit
javascript junit tap tape xunit
Last synced: 2 months ago
JSON representation
TAP to xUnit XML converter
- Host: GitHub
- URL: https://github.com/aghassemi/tap-xunit
- Owner: aghassemi
- License: mit
- Created: 2014-10-08T17:20:22.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-05-05T17:29:19.000Z (over 2 years ago)
- Last Synced: 2024-11-10T03:08:33.674Z (2 months ago)
- Topics: javascript, junit, tap, tape, xunit
- Language: JavaScript
- Homepage:
- Size: 43 KB
- Stars: 42
- Watchers: 4
- Forks: 20
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tap - tap-xunit - xUnit output. (Reporters / JavaScript)
README
[![Build Status](https://travis-ci.org/aghassemi/tap-xunit.png)](https://travis-ci.org/aghassemi/tap-xunit)
[![Issue Stats](http://issuestats.com/github/aghassemi/tap-xunit/badge/pr)](http://issuestats.com/github/aghassemi/tap-xunit)
[![Issue Stats](http://issuestats.com/github/aghassemi/tap-xunit/badge/issue)](http://issuestats.com/github/aghassemi/tap-xunit)
tap-xunit
=========Converts [TAP](http://testanything.org/) to xUnit XML format.
TAP output from testing frameworks such as [tape](https://github.com/substack/tape) or [node-tap](https://github.com/isaacs/node-tap) can be piped directly to tap-xunit
```
node test.js | tap-xunit
```![console window showing tap-xunit example](https://cloud.githubusercontent.com/assets/2099009/5288038/60d5a2da-7ae6-11e4-8d5a-5de497b4b597.jpg)
# Installation
```
npm install tap-xunit -g
```# Usage
## CLI
```
node test.js | tap-xunitless 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 `````` 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 `````` 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