https://github.com/sgtcoolguy/danger-plugin-junit
Add your Junit XML test failures to Danger
https://github.com/sgtcoolguy/danger-plugin-junit
danger-js danger-plugin junit
Last synced: about 2 months ago
JSON representation
Add your Junit XML test failures to Danger
- Host: GitHub
- URL: https://github.com/sgtcoolguy/danger-plugin-junit
- Owner: sgtcoolguy
- License: mit
- Created: 2018-11-30T19:19:06.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T18:45:02.000Z (almost 3 years ago)
- Last Synced: 2025-08-08T21:59:50.941Z (2 months ago)
- Topics: danger-js, danger-plugin, junit
- Language: TypeScript
- Size: 1.36 MB
- Stars: 1
- Watchers: 1
- Forks: 5
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# danger-plugin-junit
[](https://travis-ci.org/sgtcoolguy/danger-plugin-junit)
[](https://badge.fury.io/js/danger-plugin-junit)> Add your Junit XML test failures to Danger
## Usage
Install:
```sh
npm install danger-plugin-junit --save-dev
# or
yarn add danger-plugin-junit --dev
```At a glance:
```js
// dangerfile.js
import junit from 'danger-plugin-junit'async function main() {
await junit({ pathToReport: './build/reports/**/TESTS*.xml' })
}main()
.then(() => process.exit(0))
.catch(err => {
fail(err.toString());
process.exit(1);
});
```The default `pathToReport` value is `'./build/reports/**/TESTS*.xml'`
The value is a [glob](https://www.npmjs.com/package/glob) string to gather up test result files.This plugin will only report test failures and errors. If any tests fail, it will report a single `fail()` message and record a table of the failed tests using `markdown()`.
An example of what is produced is below:
## Changelog
See the GitHub [release history](https://github.com/sgtcoolguy/danger-plugin-junit/releases).
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md).