Skip to content

nspector/node-junitwriter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JUnitWriter

A junit reporter for node.

Travis Status

Installation

This package is available on npm as: junitwriter

	npm install junitwriter

Methods

The documentation is work in progress

Writer

new Writer()

Creates an instance of the junit reporter. When creating an instance a testsuites rootnode is created internally which can be accessed through the function getTestsuites().

getTestsuites()

Retuns the testsuites root node.

addTestsuite(name)

Adds and retuns a testsuite node inside the testsuites root node.

save(destination, callback)

This function saves the content of the report to a file at the given destination.

Testsuites

addTestsuite(name)

Adds and retuns a testsuite node inside the testsuites root node.

incDisabled(amount)

incErrors(amount)

incFailures(amount)

incTests(amount)

setTime(seconds)

setName(name)

setSystemOut(out)

setSystemError(err)

showIds()

hideIds()

Testsuite

Testsuite can appear multiple times as a child element of testsuites.

addTestcase(name, classname)

incDisabled(amount)

incErrors(amount)

incFailures(amount)

incTests(amount)

setTime(seconds)

setTimestamp(timestamp)

setName(name)

setSystemOut(out)

setSystemError(err)

setHostname(hostname)

setPackage(package)

setSkipped(skipped)

isSkipped()

showId()

hideId()

addProperty(name, value)

removeProperty(name)

updateProperty(name, value)

addError(message, type)

addFailure(message, type)

Testcase

setName(name)

setClassname(classname)

setAssertions(assertions)

setTime(seconds)

License

LICENSE (MIT)

About

A junit reporter for node

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%