Test Management Attachments

luislarrea
ServiceNow Employee
ServiceNow Employee

When running a test in test management 2.0, when a test is blocked or passed the option to add comments and add attachments is enabled. Is it possible to enable those options for the passed tests as well?

 

Regards

1 ACCEPTED SOLUTION

DastagiriReddy
ServiceNow Employee
ServiceNow Employee

Hi luislarrea,

 

Yes, it is possible to customize.

 

http://<your_instance>/sys_ui_macro.do?sys_id=a9deb3b85b32030036c32c1cf0f91a9d&sysparm_view=&sysparm_domain=null&sysparm_domain_scope=null&sysparm_record_row=1&sysparm_record_rows=1&sysparm_record_list=nameSTARTSWITHtest_step_list%5eORDERBYDESCsys_updated_on

  • Add a passed style in the header
  • Add comment section similar to blocked or failed 
  • Update the `step_side_line` class element condition 
  • Update the `step_attachment_container` condition

 

For your reference attaching Customized UI Macro code. 

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
	<g2:doctype name="html" />
    <g:inline template="dir_checker.xml" />
    <html ng-app="sn.testManagement" lang="${jvar_text_language}" class="${jvar_text_direction}" data-doctype="true" dir="${jvar_text_direction}">
		<head>
			<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
			<meta name="apple-mobile-web-app-capable" content="yes" />
			<g:inline template="html_page_meta.xml" />
			<link href="${gs.getProperty('glide.product.icon')}" rel="shortcut icon" />
			<!-- CSS -->
			<j:set var="jvar_theme" value="$[gs.getPreference(new GlideThemeUtil().getThemeVersion())]" />
			<!-- JS -->
			<g:inline template="ng_head_inline_script.xml" />
			<g:requires name="scripts/js_includes_test_management.js" includes="true" />
			<g2:evaluate var="jvar_test_result_count">
				var gr = new GlideRecord('sn_test_management_test_run');
				gr.get('$[sysparm_test_run_id]');
				var testCount = gr.getValue('total_tests');
				// Update the run by field to the current user
				gr.setValue('run_by', gs.getUserID());
				gr.update();
				testCount;
			</g2:evaluate>
			<g2:evaluate var="jvar_test_index">
				var index = 0;
				var indexValid = false;
				var totalCount = parseInt('$[jvar_test_result_count]');
				if (!gs.nil('$[sysparm_test_index]')) {
					index = parseInt('$[sysparm_test_index]');
					indexValid = index ${AMP}lt; totalCount;
				}

				if (!indexValid) {
					var lastVisitedTestResult = TestRun.getLastRunTestByCurrentUser('$[sysparm_test_run_id]');
					if (!gs.nil(lastVisitedTestResult))
						index = parseInt(lastVisitedTestResult);

					indexValid = index ${AMP}lt; totalCount;
					if (!indexValid)
						index = 0;
				}
				TestRun.setLastRunTestByCurrentUser('$[sysparm_test_run_id]', index);
				index;
			</g2:evaluate>
			<g2:evaluate var="jvar_test_result" object="true">
				var index = parseInt('$[jvar_test_index]');
				var testResult;
				var gr = new GlideRecord('sn_test_management_test_result');
				gr.addQuery('test_run', '$[sysparm_test_run_id]');
				gr.orderBy('test_version.test.number');
				gr.chooseWindow(index, index + 1, false);
				gr.query();
				if (gr.next())
				testResult = gr;
				testResult;
			</g2:evaluate>
			<g2:evaluate var="jvar_test_steps" object="true">				
				new TestStepResultService().getStepResults('$[jvar_test_result.getValue('sys_id')]');
			</g2:evaluate>
			<g2:evaluate var="jvar_test" object="true">
				var test = new GlideRecord('sn_test_management_test_version');
				test.get('$[jvar_test_result.getValue('test_version')]');
				test;
			</g2:evaluate>
			<g2:evaluate var="jvar_test_position_text">
				var position = String(parseInt('$[jvar_test_index]') + 1);
				var count = '$[jvar_test_result_count]';
				var text = gs.getMessage('{0} out of {1}', [position, count]);
				text;
			</g2:evaluate>
			<style> <!-- Customized -->
				.passed {
					background-color: #1f8476;
				}
			</style>
		</head>

		<body>
			<now-message key="File not downloaded" value="${gs.getMessage('The file {0} did not pass security scan and cannot be downloaded.')}"></now-message>
			<j2:if test="$[jvar_test_result_count &lt;= 0]">
				<div class="test-run-error">
					<span class="icon icon-ellipsis"></span>
					<span class="test-run-error-message">
						$[gs.getMessage('This run contains no tests')]
					</span>
				</div>
			</j2:if>
			<j2:if test="$[jvar_test_result_count &gt; 0]">
				<script type="text/ng-template" id="pause_test_dialog.html">
					<g:inline template="sn_test_management_pause_test_dialog.xml" />
				</script>
				<div ng-controller="testExecutionCtrl as txc" ng-cloak="">
					<script>
						 angular.module("sn.testManagement").run(function(testManagementData){
							testManagementData.load("testSteps", JSON.parse("$[JS:jvar_test_steps]"));
							testManagementData.load("testIndex", "$[JS:jvar_test_index]");
							testManagementData.load("testResultCount", "$[JS:jvar_test_result_count]");
						});
					</script>
					<input type="hidden" id="test_run_id" name="test_run_id" value="$[jvar_test_run_id]" />
					<nav class="nav navbar-default" >
						<div uib-tooltip="$[jvar_test.getValue('short_description')]" tooltip-placement="bottom-left" tooltip-append-to-body="true" class="test-description text-ellipsis">$[jvar_test.getValue('short_description')]</div>
					</nav>
					<form name="step_list" novalidate="">
					<div ng-if="txc.testSteps.length === 0" class="test-run-error">
						<span class="icon icon-ellipsis"></span>
						<span class="test-run-error-message">
							$[gs.getMessage('This test is not available')]
						</span>
					</div>
					<ul ng-if="txc.testSteps.length > 0" class="test_steps">
						<li ng-repeat = "step in txc.testSteps">
							<div class="flex-box flex-box-v-center padding_test_step">
								<div class="step-desc">{{step.step}}</div>
								<div class="step-icon-container" ng-if="step.needs_verification == 1" ng-init="txc.setInitialStepResultStatus(step)">
									<img class="step-icon" ng-src="{{step.icons.PASSED}}" alt="" ng-click="txc.setStepStatus(step, 'PASSED')" tabindex="0" uib-tooltip="${HTML: gs.getMessage('Passed')}" tooltip-append-to-body="true" aria-label="${gs.getMessage('Mark as passed')}" role="button" />
									<img class="step-icon" ng-src="{{step.icons.FAILED}}" alt="" ng-click="txc.setStepStatus(step, 'FAILED')" tabindex="0" uib-tooltip="${HTML: gs.getMessage('Failed')}" tooltip-append-to-body="true" aria-label="${gs.getMessage('Mark as failed')}" role="button" />
									<img class="step-icon" ng-src="{{step.icons.BLOCKED}}" alt="" ng-click="txc.setStepStatus(step, 'BLOCKED')" tabindex="0" uib-tooltip="${HTML: gs.getMessage('Blocked')}" tooltip-append-to-body="true" aria-label="${gs.getMessage('Mark as blocked')}" role="button" />
								</div>
							</div>
							<div class="step_comment_container padding_test_step">
								<div class="step_comment" uib-collapse="!(step.status == 'blocked')">
									<label>${gs.getMessage('Comment')}</label>
									<textarea class="form-control" name="{{step.id}}" id="{{step.id}}" ng-if="step.status == 'blocked'" ng-model-options="{allowInvalid: true}" resize-content="" ng-change="txc.updateComment(step)" ng-model="step.comment" aria-label="${gs.getMessage('Comment')}"></textarea>
								</div>
								<div class="step_comment" uib-collapse="!(step.status == 'failed')">
									<label>${gs.getMessage('Comment')}</label>
									<textarea class="form-control" name="{{step.id}}" id="{{step.id}}" ng-if="step.status == 'failed'" ng-model-options="{allowInvalid: true}" resize-content="" ng-change="txc.updateComment(step)" ng-model="step.comment" aria-label="${gs.getMessage('Comment')}"></textarea>
								</div>
								<div class="step_comment" uib-collapse="!(step.status == 'passed')"> <!-- Customized -->
									<label>${gs.getMessage('Comment')}</label>
									<textarea class="form-control" name="{{step.id}}" id="{{step.id}}" ng-if="step.status == 'passed'" ng-model-options="{allowInvalid: true}" resize-content="" ng-change="txc.updateComment(step)" ng-model="step.comment" aria-label="${gs.getMessage('Comment')}"></textarea>
								</div>
								<div class="step_side_line" ng-class="{'blocked': step.status == 'blocked', 'failed': step.status == 'failed', 'passed': step.status == 'passed'}"></div> <!-- Customized -->
							</div>
							<div class="step_attachment_container" ng-if="step.status == 'blocked' ||  step.status == 'failed' || step.status === 'passed'"> <!-- Customized -->
								<div class="add_attachment flex-box flex-box-v-center padding_test_step pull-left" role="button" tabindex="0" upload-file="">
									<span class="icon-add-circle-empty flex-box flex-box-v-center flex-box-h-center"></span>
									<span>${gs.getMessage('Add Attachment')}</span>
								</div>
								<div class="clearfix"></div>
								<input class="upload" type="file" multiple="" ng-file-select="txc.uploadFile(step, $files)" style="display: none;" />
								<ul class="step_attachment_list">
									<li ng-repeat="file in step.files track by file.sys_id" class="flex-box flex-box-v-center step_attachment_item_container" ng-click="txc.handleAttachmentClick($event,file)" ng-class="{'infected_file': file.state === 'not_available'}">
										<span class="step_attachment_image" ng-if="file.image $[AMP]$[AMP] !file.progress" ng-style="::{'background-image': 'url(' + file.thumbSrc + ')'}" />
										<span class="step_attachment_icon" ng-if="!file.image $[AMP]$[AMP] !file.progress" ng-switch="" on="file.ext">
											<span ng-switch-when="pdf" class="{{::txc.fileIcons.pdf}}"></span>
											<span ng-switch-when="doc" class="{{::txc.fileIcons.doc}}"></span>
											<span ng-switch-when="docx" class="{{::txc.fileIcons.doc}}"></span>
											<span ng-switch-when="ppt" class="{{::txc.fileIcons.ppt}}"></span>
											<span ng-switch-when="txt" class="{{::txc.fileIcons.txt}}"></span>
											<span ng-switch-when="xls" class="{{::txc.fileIcons.xls}}"></span>
											<span ng-switch-when="zip" class="{{::txc.fileIcons.zip}}"></span>
											<span ng-switch-default="" class="icon-document"></span>
										</span>
										<div class="step_attachment_detail_container flex-box flex-box-v-center" ng-if="!file.progress">
											<div class="step_attachment_item_detail flex-box">
												<div class="file_name_text flex-ellipsis">
													<span title="{{::file.file_name}}">{{::file.file_name}}</span>
													<span ng-if="::file.state === 'not_available'">$[SP][${gs.getMessage('Unavailable')}]</span>
												</div>
												<div class="file_size_text">{{::file.size}}</div>
											</div>
											<div class="step_attachment_actions">
												<div class="step_attachment_icon_container flex-box">
													<a ng-if="::file.state !== 'not_available'" ng-click="$event.stopPropagation();" class="btn btn-icon icon-download flex-box flex-box-v-center flex-box-h-center" ng-href="{{txc.getDownloadLink(file)}}" title="${HTML: gs.getMessage('Download')}" role="button"></a>
													<span class="btn btn-icon icon-delete flex-box flex-box-v-center flex-box-h-center" title="${gs.getMessage('Delete')}" role="button" ng-click="txc.deleteAttachment($event, step,file,$index)"></span>
												</div>
											</div>
										</div>
										<uib-progressbar ng-if="file.progress" value="file.progress"></uib-progressbar>
									</li>
								</ul>
							</div>
						</li>
					</ul>
						<div class='test_step_actions flex-box flex-box-v-center' ng-class="(txc.testResultCount > 1) ? 'flex-box-content-space-between' : 'flex-box-content-flex-end'">
							<div class="test_step_position_text" ng-if="txc.testResultCount > 1">
								$[jvar_test_position_text]
							</div>
							<div class='test_step_form_button'>
								<button type="button" class="btn btn-default pause-button" ng-click="txc.pauseTestExecution()">${gs.getMessage('Pause')}</button>
								<button type="button" class="btn" ng-class="txc.doneButton.classes" ng-click="txc.completeTestExecution($event,step_list, '$[sysparm_test_run_id]')" data-error="${gs.getMessage('Please add comments to failed or blocked steps')}">${gs.getMessage('Done')}</button>
							</div>
							<div class='test_step_navigate_buttons' ng-if="txc.testResultCount > 1">
								<a class="btn btn-default btn-previous-test icon-chevron-left" tabindex="0" role="button" uib-tooltip="${gs.getMessage('Previous Test')}" tooltip-append-to-body="true" tooltip-placement="auto" aria-label="${gs.getMessage('Go to previous test')}" ng-href="{{txc.prevButton.href}}" ng-disabled="txc.prevButton.disabled"></a>
								<a class="btn btn-primary btn-next-test icon-chevron-right" tabindex="0" role="button" uib-tooltip="${gs.getMessage('Next Test')}" tooltip-append-to-body="true" tooltip-placement="auto" aria-label="${gs.getMessage('Go to next test')}" ng-href="{{txc.nextButton.href}}" ng-disabled="txc.nextButton.disabled"></a>
							</div>
						</div>	
					</form>
				</div>
			</j2:if>
		</body>
	</html>
</j:jelly>

 

Thanks

DastagiriReddy

View solution in original post

6 REPLIES 6

DastagiriReddy
ServiceNow Employee
ServiceNow Employee

Hi luislarrea,

 

Yes, it is possible to customize.

 

http://<your_instance>/sys_ui_macro.do?sys_id=a9deb3b85b32030036c32c1cf0f91a9d&sysparm_view=&sysparm_domain=null&sysparm_domain_scope=null&sysparm_record_row=1&sysparm_record_rows=1&sysparm_record_list=nameSTARTSWITHtest_step_list%5eORDERBYDESCsys_updated_on

  • Add a passed style in the header
  • Add comment section similar to blocked or failed 
  • Update the `step_side_line` class element condition 
  • Update the `step_attachment_container` condition

 

For your reference attaching Customized UI Macro code. 

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
	<g2:doctype name="html" />
    <g:inline template="dir_checker.xml" />
    <html ng-app="sn.testManagement" lang="${jvar_text_language}" class="${jvar_text_direction}" data-doctype="true" dir="${jvar_text_direction}">
		<head>
			<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
			<meta name="apple-mobile-web-app-capable" content="yes" />
			<g:inline template="html_page_meta.xml" />
			<link href="${gs.getProperty('glide.product.icon')}" rel="shortcut icon" />
			<!-- CSS -->
			<j:set var="jvar_theme" value="$[gs.getPreference(new GlideThemeUtil().getThemeVersion())]" />
			<!-- JS -->
			<g:inline template="ng_head_inline_script.xml" />
			<g:requires name="scripts/js_includes_test_management.js" includes="true" />
			<g2:evaluate var="jvar_test_result_count">
				var gr = new GlideRecord('sn_test_management_test_run');
				gr.get('$[sysparm_test_run_id]');
				var testCount = gr.getValue('total_tests');
				// Update the run by field to the current user
				gr.setValue('run_by', gs.getUserID());
				gr.update();
				testCount;
			</g2:evaluate>
			<g2:evaluate var="jvar_test_index">
				var index = 0;
				var indexValid = false;
				var totalCount = parseInt('$[jvar_test_result_count]');
				if (!gs.nil('$[sysparm_test_index]')) {
					index = parseInt('$[sysparm_test_index]');
					indexValid = index ${AMP}lt; totalCount;
				}

				if (!indexValid) {
					var lastVisitedTestResult = TestRun.getLastRunTestByCurrentUser('$[sysparm_test_run_id]');
					if (!gs.nil(lastVisitedTestResult))
						index = parseInt(lastVisitedTestResult);

					indexValid = index ${AMP}lt; totalCount;
					if (!indexValid)
						index = 0;
				}
				TestRun.setLastRunTestByCurrentUser('$[sysparm_test_run_id]', index);
				index;
			</g2:evaluate>
			<g2:evaluate var="jvar_test_result" object="true">
				var index = parseInt('$[jvar_test_index]');
				var testResult;
				var gr = new GlideRecord('sn_test_management_test_result');
				gr.addQuery('test_run', '$[sysparm_test_run_id]');
				gr.orderBy('test_version.test.number');
				gr.chooseWindow(index, index + 1, false);
				gr.query();
				if (gr.next())
				testResult = gr;
				testResult;
			</g2:evaluate>
			<g2:evaluate var="jvar_test_steps" object="true">				
				new TestStepResultService().getStepResults('$[jvar_test_result.getValue('sys_id')]');
			</g2:evaluate>
			<g2:evaluate var="jvar_test" object="true">
				var test = new GlideRecord('sn_test_management_test_version');
				test.get('$[jvar_test_result.getValue('test_version')]');
				test;
			</g2:evaluate>
			<g2:evaluate var="jvar_test_position_text">
				var position = String(parseInt('$[jvar_test_index]') + 1);
				var count = '$[jvar_test_result_count]';
				var text = gs.getMessage('{0} out of {1}', [position, count]);
				text;
			</g2:evaluate>
			<style> <!-- Customized -->
				.passed {
					background-color: #1f8476;
				}
			</style>
		</head>

		<body>
			<now-message key="File not downloaded" value="${gs.getMessage('The file {0} did not pass security scan and cannot be downloaded.')}"></now-message>
			<j2:if test="$[jvar_test_result_count &lt;= 0]">
				<div class="test-run-error">
					<span class="icon icon-ellipsis"></span>
					<span class="test-run-error-message">
						$[gs.getMessage('This run contains no tests')]
					</span>
				</div>
			</j2:if>
			<j2:if test="$[jvar_test_result_count &gt; 0]">
				<script type="text/ng-template" id="pause_test_dialog.html">
					<g:inline template="sn_test_management_pause_test_dialog.xml" />
				</script>
				<div ng-controller="testExecutionCtrl as txc" ng-cloak="">
					<script>
						 angular.module("sn.testManagement").run(function(testManagementData){
							testManagementData.load("testSteps", JSON.parse("$[JS:jvar_test_steps]"));
							testManagementData.load("testIndex", "$[JS:jvar_test_index]");
							testManagementData.load("testResultCount", "$[JS:jvar_test_result_count]");
						});
					</script>
					<input type="hidden" id="test_run_id" name="test_run_id" value="$[jvar_test_run_id]" />
					<nav class="nav navbar-default" >
						<div uib-tooltip="$[jvar_test.getValue('short_description')]" tooltip-placement="bottom-left" tooltip-append-to-body="true" class="test-description text-ellipsis">$[jvar_test.getValue('short_description')]</div>
					</nav>
					<form name="step_list" novalidate="">
					<div ng-if="txc.testSteps.length === 0" class="test-run-error">
						<span class="icon icon-ellipsis"></span>
						<span class="test-run-error-message">
							$[gs.getMessage('This test is not available')]
						</span>
					</div>
					<ul ng-if="txc.testSteps.length > 0" class="test_steps">
						<li ng-repeat = "step in txc.testSteps">
							<div class="flex-box flex-box-v-center padding_test_step">
								<div class="step-desc">{{step.step}}</div>
								<div class="step-icon-container" ng-if="step.needs_verification == 1" ng-init="txc.setInitialStepResultStatus(step)">
									<img class="step-icon" ng-src="{{step.icons.PASSED}}" alt="" ng-click="txc.setStepStatus(step, 'PASSED')" tabindex="0" uib-tooltip="${HTML: gs.getMessage('Passed')}" tooltip-append-to-body="true" aria-label="${gs.getMessage('Mark as passed')}" role="button" />
									<img class="step-icon" ng-src="{{step.icons.FAILED}}" alt="" ng-click="txc.setStepStatus(step, 'FAILED')" tabindex="0" uib-tooltip="${HTML: gs.getMessage('Failed')}" tooltip-append-to-body="true" aria-label="${gs.getMessage('Mark as failed')}" role="button" />
									<img class="step-icon" ng-src="{{step.icons.BLOCKED}}" alt="" ng-click="txc.setStepStatus(step, 'BLOCKED')" tabindex="0" uib-tooltip="${HTML: gs.getMessage('Blocked')}" tooltip-append-to-body="true" aria-label="${gs.getMessage('Mark as blocked')}" role="button" />
								</div>
							</div>
							<div class="step_comment_container padding_test_step">
								<div class="step_comment" uib-collapse="!(step.status == 'blocked')">
									<label>${gs.getMessage('Comment')}</label>
									<textarea class="form-control" name="{{step.id}}" id="{{step.id}}" ng-if="step.status == 'blocked'" ng-model-options="{allowInvalid: true}" resize-content="" ng-change="txc.updateComment(step)" ng-model="step.comment" aria-label="${gs.getMessage('Comment')}"></textarea>
								</div>
								<div class="step_comment" uib-collapse="!(step.status == 'failed')">
									<label>${gs.getMessage('Comment')}</label>
									<textarea class="form-control" name="{{step.id}}" id="{{step.id}}" ng-if="step.status == 'failed'" ng-model-options="{allowInvalid: true}" resize-content="" ng-change="txc.updateComment(step)" ng-model="step.comment" aria-label="${gs.getMessage('Comment')}"></textarea>
								</div>
								<div class="step_comment" uib-collapse="!(step.status == 'passed')"> <!-- Customized -->
									<label>${gs.getMessage('Comment')}</label>
									<textarea class="form-control" name="{{step.id}}" id="{{step.id}}" ng-if="step.status == 'passed'" ng-model-options="{allowInvalid: true}" resize-content="" ng-change="txc.updateComment(step)" ng-model="step.comment" aria-label="${gs.getMessage('Comment')}"></textarea>
								</div>
								<div class="step_side_line" ng-class="{'blocked': step.status == 'blocked', 'failed': step.status == 'failed', 'passed': step.status == 'passed'}"></div> <!-- Customized -->
							</div>
							<div class="step_attachment_container" ng-if="step.status == 'blocked' ||  step.status == 'failed' || step.status === 'passed'"> <!-- Customized -->
								<div class="add_attachment flex-box flex-box-v-center padding_test_step pull-left" role="button" tabindex="0" upload-file="">
									<span class="icon-add-circle-empty flex-box flex-box-v-center flex-box-h-center"></span>
									<span>${gs.getMessage('Add Attachment')}</span>
								</div>
								<div class="clearfix"></div>
								<input class="upload" type="file" multiple="" ng-file-select="txc.uploadFile(step, $files)" style="display: none;" />
								<ul class="step_attachment_list">
									<li ng-repeat="file in step.files track by file.sys_id" class="flex-box flex-box-v-center step_attachment_item_container" ng-click="txc.handleAttachmentClick($event,file)" ng-class="{'infected_file': file.state === 'not_available'}">
										<span class="step_attachment_image" ng-if="file.image $[AMP]$[AMP] !file.progress" ng-style="::{'background-image': 'url(' + file.thumbSrc + ')'}" />
										<span class="step_attachment_icon" ng-if="!file.image $[AMP]$[AMP] !file.progress" ng-switch="" on="file.ext">
											<span ng-switch-when="pdf" class="{{::txc.fileIcons.pdf}}"></span>
											<span ng-switch-when="doc" class="{{::txc.fileIcons.doc}}"></span>
											<span ng-switch-when="docx" class="{{::txc.fileIcons.doc}}"></span>
											<span ng-switch-when="ppt" class="{{::txc.fileIcons.ppt}}"></span>
											<span ng-switch-when="txt" class="{{::txc.fileIcons.txt}}"></span>
											<span ng-switch-when="xls" class="{{::txc.fileIcons.xls}}"></span>
											<span ng-switch-when="zip" class="{{::txc.fileIcons.zip}}"></span>
											<span ng-switch-default="" class="icon-document"></span>
										</span>
										<div class="step_attachment_detail_container flex-box flex-box-v-center" ng-if="!file.progress">
											<div class="step_attachment_item_detail flex-box">
												<div class="file_name_text flex-ellipsis">
													<span title="{{::file.file_name}}">{{::file.file_name}}</span>
													<span ng-if="::file.state === 'not_available'">$[SP][${gs.getMessage('Unavailable')}]</span>
												</div>
												<div class="file_size_text">{{::file.size}}</div>
											</div>
											<div class="step_attachment_actions">
												<div class="step_attachment_icon_container flex-box">
													<a ng-if="::file.state !== 'not_available'" ng-click="$event.stopPropagation();" class="btn btn-icon icon-download flex-box flex-box-v-center flex-box-h-center" ng-href="{{txc.getDownloadLink(file)}}" title="${HTML: gs.getMessage('Download')}" role="button"></a>
													<span class="btn btn-icon icon-delete flex-box flex-box-v-center flex-box-h-center" title="${gs.getMessage('Delete')}" role="button" ng-click="txc.deleteAttachment($event, step,file,$index)"></span>
												</div>
											</div>
										</div>
										<uib-progressbar ng-if="file.progress" value="file.progress"></uib-progressbar>
									</li>
								</ul>
							</div>
						</li>
					</ul>
						<div class='test_step_actions flex-box flex-box-v-center' ng-class="(txc.testResultCount > 1) ? 'flex-box-content-space-between' : 'flex-box-content-flex-end'">
							<div class="test_step_position_text" ng-if="txc.testResultCount > 1">
								$[jvar_test_position_text]
							</div>
							<div class='test_step_form_button'>
								<button type="button" class="btn btn-default pause-button" ng-click="txc.pauseTestExecution()">${gs.getMessage('Pause')}</button>
								<button type="button" class="btn" ng-class="txc.doneButton.classes" ng-click="txc.completeTestExecution($event,step_list, '$[sysparm_test_run_id]')" data-error="${gs.getMessage('Please add comments to failed or blocked steps')}">${gs.getMessage('Done')}</button>
							</div>
							<div class='test_step_navigate_buttons' ng-if="txc.testResultCount > 1">
								<a class="btn btn-default btn-previous-test icon-chevron-left" tabindex="0" role="button" uib-tooltip="${gs.getMessage('Previous Test')}" tooltip-append-to-body="true" tooltip-placement="auto" aria-label="${gs.getMessage('Go to previous test')}" ng-href="{{txc.prevButton.href}}" ng-disabled="txc.prevButton.disabled"></a>
								<a class="btn btn-primary btn-next-test icon-chevron-right" tabindex="0" role="button" uib-tooltip="${gs.getMessage('Next Test')}" tooltip-append-to-body="true" tooltip-placement="auto" aria-label="${gs.getMessage('Go to next test')}" ng-href="{{txc.nextButton.href}}" ng-disabled="txc.nextButton.disabled"></a>
							</div>
						</div>	
					</form>
				</div>
			</j2:if>
		</body>
	</html>
</j:jelly>

 

Thanks

DastagiriReddy

Is there any way to make the "Passed" comments and attachments display on the Test Runs? At the moment even with the above code, if you leave a passed comment and attachment they still do not display on the test run.

Is this something out of the box that is already provided by Service Now? 

Hi Dastagiri,

I tried the above code, but passed comment and attachment they still do not display on the test run.

Please help us on this.

Thanks, Jay