# jasmine-xml2html-converter

> A node module to convert jasmine xml reports to html

Latest version **0.0.2** (published 2015-08-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install jasmine-xml2html-converter
pnpm add jasmine-xml2html-converter
yarn add jasmine-xml2html-converter
bun add jasmine-xml2html-converter
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2015-08-27 |
| First published | 2015-08-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Basavana Gowda |
| Maintainers | bgowda |
| Keywords | jasmine report, junit report, protractor, html report |

## Links

- npm: https://www.npmjs.com/package/jasmine-xml2html-converter
- Repository: https://github.com/basavanag/jasmine-xml2html-converter
- Issues: https://github.com/basavanag/jasmine-xml2html-converter/issues
- npm.io page: https://npm.io/package/jasmine-xml2html-converter

## Dependencies (1)

- [xmldoc](https://npm.io/package/xmldoc.md) ~0.3.0

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2015-08-27
- 0.0.1 — 2015-08-27

## README

jasmine-xml2html-converter
=================================

A node module to convert jasmine/junit generated xml reports into formatted html reports

repo : https://github.com/basavanag/jasmine-xml2html-converter

How to use
----------------------------------
* Coverting the xml file to html

  			var HTMLReport = require('jasmine-xml2html-converter');

    		// Call custom report for html output
    		testConfig = {
      			reportTitle: 'Test Execution Report',
      			outputPath: './test_out/e2e/chrome'
    		};
    		new HTMLReport().from(reportPath + '/junitresults.xml', testConfig);

* Using with protractor conf.js file

        // A callback function called once tests are finished.
        onComplete: function() {
          var path = require("path");
          var browserName, browserVersion;
          var reportPath = path.join(__dirname, '..', '/test_out/e2e/');
          var capsPromise = browser.getCapabilities();
          capsPromise.then(function (caps) {
          browserName = caps.caps_.browserName.toLowerCase();
          browserName = browserName.replace(/ /g,"-");
          browserVersion = caps.caps_.version;
          return null;
        });
        
        var HTMLReport = require('jasmine-xml2html-converter');
        reportPath += browserName;

        // Call custom report for html output
        testConfig = {
          reportTitle: 'Test Execution Report',
          outputPath: reportPath,
          seleniumServer: browser.seleniumAddress,
          applicationUrl: browser.baseUrl,
          testBrowser: browserName + ' ' + browserVersion
        };
        new HTMLReport().from(reportPath + '/junitresults.xml', testConfig);
      }

Test config object
----------------------------------
* Defaults : testConfig = {} 
* To override reportTitle & outputPath of the output html file : testConfig = { reportTitle: 'Test Execution Report', outputPath: './test-out' }
* To add data to the report summary of the output html file: testConfig = { Browser: IE }

Sample html report
----------------------------------
![Alt text](https://raw.githubusercontent.com/basavanag/jasmine-xml2html-converter/master/sample_test_report.png?raw=true)

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