Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Sep 11, 2018 12:16

by Nato Vasilevski

If you don’t have proper reporting results, because your test results appear as unknown in Digital Zoom, this article is for you.

Please do not forget to hit the “Like” button if you found what you have been searching for. Thank you in advance!

To create this, I have used a priory written scenario where the reporting was marking most of the results as unknown and none of them was marked as failed.


In the beginning we had the following scenario:

jasmine.getEnv().addReporter({
	suiteStarted:(result) => {
                    reportingClient.testStart(result.fullName)},

    specStarted:(result) => {
					reportingClient.stepStart(result.fullName);},

	specDone:(result) => {
					reportingClient.stepEnd();},

	suiteDone:(result) => {
					if(result.status === 'failed') {
							reportingClient.testStop({
									status:Reporting.Constants.results.failed});}
					else {
							reportingClient.testStop({
									status:Reporting.Constants.results.passed});}}})


Results in Digital Zoom:


It is to be seen that the reporting fragment is put in the suiteStart and suiteDone, which is confusing the Digital Zoom as there are multiple specs in one suite and if one spec fails and another spec is marked as successful, there cannot be proper reporting result.

Yet if all the specs are passed, the whole suite gets marked as passed as we can see in the screenshot.


In order the results from the test to be properly fed to the Digital Zoom a slight change is necessary as follows:

jasmine.getEnv().addReporter({
	suiteStarted:(result) => {},
	specStarted:(result) => {
					reportingClient.testStart(result.fullName);},
	specDone:(result) => {
					if(result.status === 'failed') {
							reportingClient.testStop({
										status:Reporting.Constants.results.failed});}
					else{
							reportingClient.testStop({
										status:Reporting.Constants.results.passed});}},
	suiteDone:(result) => {}})


Results in the Digital Zoom:


As it is to be seen the reporting fragments have been embedded in the specStart and specDone and this is feeding the proper information to the Digital Zoom to show proper results.