summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/test-utils/failedTestReport.js
blob: ed88ccde4f2d8d82944817529a8f6b55befa8740 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
var stdin = process.stdin;
var inputJSON = '';
var startJSON = false;
stdin.resume();
stdin.setEncoding('utf8');

stdin.on('data', function (chunk) {
	if (chunk.startsWith('{')) {
		startJSON = true;
	}
	if (startJSON) {
		inputJSON += chunk;
	}
});

stdin.on('end', function () {
	let report = JSON.parse(inputJSON);
	if (!report.numFailedTestSuites) {
		return;
	} else {
		console.log('--------------------------------');
		console.log('Failure Summary: \n');
	}
	report.testResults.forEach((suite) => {
		if(suite.status === 'failed') {
			console.log('Suite: ' + suite.name);
			suite.assertionResults.forEach((test) => {
				if (test.status === 'failed') {
					console.log('\tTest: ' + test.title);
				}
			});
		}
	});
});
class="s">'vfc-gvnfm-vnfres-res' branch: 'master' mvn-settings: 'vfc-gvnfm-vnfres-settings' mvn-goals: 'clean install' mvn-opts: '-Xmx1024m -XX:MaxPermSize=256m' - project: name: vfc-gvnfm-vnfres-java-clm jobs: - gerrit-maven-clm nexus-iq-namespace: 'onap-' project: vfc/gvnfm/vnfres project-name: 'vfc-gvnfm-vnfres' build-node: ubuntu1604-builder-4c-4g branch: 'master' mvn-settings: 'vfc-gvnfm-vnfres-settings' - project: name: vfc-gvnfm-vnfres-info project-name: vfc-gvnfm-vnfres jobs: - gerrit-info-yaml-verify build-node: centos7-builder-2c-1g project: vfc/gvnfm/vnfres branch: master