How to use xunit-viewer - 2 common examples

To help you get started, we’ve selected a few xunit-viewer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Automattic / wp-calypso / test / e2e / lib / reporter / magellan-reporter.js View on Github external
files.forEach( reportPath => {
		if ( ! reportPath.match( /xml$/i ) ) {
			return;
		}
		try {
			const xmlString = fs.readFileSync( `${ reportDir }/${ reportPath }`, 'utf-8' );
			const xmlData = XunitViewerParser.parse( xmlString );
			failuresCount += xmlData[ 0 ].tests.filter( t => t.status === 'fail' ).length;
		} catch ( e ) {
			console.log( `Error reading report file, likely just timing race: ${ e.message }` );
		}
		copyReports( slackClient, reportDir, reportPath, testRun.guid );
	} );
github Automattic / wp-e2e-tests / lib / reporter / magellan-reporter.js View on Github external
files.forEach( reportPath => {
		if ( ! reportPath.match( /xml$/i ) ) {
			return;
		}
		try {
			const xmlString = fs.readFileSync( `${ reportDir }/${ reportPath }`, 'utf-8' );
			const xmlData = XunitViewerParser.parse( xmlString );
			failuresCount += xmlData[ 0 ].tests.filter( t => t.status === 'fail' ).length;
		} catch ( e ) {
			console.log( `Error reading report file, likely just timing race: ${ e.message }` );
		}
		copyReports( slackClient, reportDir, reportPath, testRun.guid );
	} );

xunit-viewer

parses xunit xml into xunit viewer

MIT
Latest version published 3 months ago

Package Health Score

69 / 100
Full package analysis

Popular xunit-viewer functions