# wdio-junitcsv

> Convert wdio ouptut from Junit reportr XML to CSV

Latest version **2.1.1** (published 2023-10-03) · GNU license · 0 weekly downloads

## Install

```sh
npm install wdio-junitcsv
pnpm add wdio-junitcsv
yarn add wdio-junitcsv
bun add wdio-junitcsv
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.1 |
| Published | 2023-10-03 |
| First published | 2021-11-24 |
| Weekly downloads | 0 |
| License | GNU |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 45.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Nullish |
| Maintainers | nullish |
| Keywords | junit,wdio,webdriverio |

## Links

- npm: https://www.npmjs.com/package/wdio-junitcsv
- Repository: https://github.com/sonyzach/usfm-validator
- Homepage: https://github.com/sonyzach/usfm-validator#readme
- Issues: https://github.com/sonyzach/usfm-validator/issues
- npm.io page: https://npm.io/package/wdio-junitcsv

## Dependencies (5)

- [uuid](https://npm.io/package/uuid.md) ^8.3.2
- [xpath](https://npm.io/package/xpath.md) ^0.0.32
- [colors](https://npm.io/package/colors.md) ^1.4.0
- [strip-ansi](https://npm.io/package/strip-ansi.md) ^6.0.0
- [joinxmlfiles](https://npm.io/package/joinxmlfiles.md) ^1.1.0

## Recent versions

- 2.1.1 (latest) — 2023-10-03
- 2.1.0 — 2023-09-10
- 2.0.0 — 2022-12-13
- 1.3.0 — 2022-12-02
- 1.1.1 — 2022-11-02
- 1.2.0 — 2021-11-30
- 1.1.0 — 2021-11-27
- 1.0.0 — 2021-11-24

## README

# wdio-junitcsv
Converts Junit reports for Webdriver IO into CSV format.

## Node package installation

```bash
npm install wdio-junitcsv
```

## Usage

The script takes one argument, a directory path, which it parses for Junit reporter format XML files and merges them into a single CSV file. Output is returned to STDOUT which can be piped to a file or clipboard.

### Command line

```bash
node junitcsv ./path/to/reports
```

### Imported as Node.js module

```javascript
const wdioJunitCSV = require('wdio-junitcsv');

console.log(wdioJunitCSV('./path/to/reports/'));
```

## CSV ouptut fields

| Field name | Description                                                                      |
| ---------- | -------------------------------------------------------------------------------- |
| UUID       | Universal unique identifier for test case - generated from timestamp of test run |
| uniqueId   | ID combining first three characters from test attributes (script ID, test ID, browser name, platform name, device name) |
| specPath   | Directory path to which test suite belongs |
| scriptId   | ID for script extracted from suite name. If present, formed from initial alpha character and subsequent numeric characters |
| testId     | ID for test case extracted from test name. If present, formed from initial alpha character and subsequent numeric characters |
| suiteName | Name of test suite |
| browserName | Browser name from capabilities where supplied |
| platformName | Operating system |
| deviceName | Device name - defaults to desktop for desktop browser sessions |
| testName | Name of test case within suite |
| state | Passed or failed, based on whether `<failed>` element is present in Junit test case |
| error | Taken from error message in Junit report |
| urlInitial | First URL encountered when running the test |
| urlExpected | When a test case fails on URL matching, extracts the expected URL |
| urlActual | When a test case fails on URL matching, extracts the actual URL returned |
| imageVariance | When using `wdio-image-comparison-service` and the test fails, returns the reported degree of variance beteen images |
| start | Time stamp for when test was started |
| duration | Duration of test suite in seconds |

---
_Source: https://npm.io/package/wdio-junitcsv · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
