Test Management 2.0: Collect Actual Result, attachments, and comments on a Pass Test Step

SusanWinKY
Kilo Sage

We've been asked to allow a tester to provide actual results, attachments, and comments on a Pass test step in Test Management 2.0 similar to how this can be done for a Failed or Blocked test step in TM 2.0. Has anyone managed to customize this?

We've submitted an Idea for this (that represents a couple of ideas that were closed as "Unlikely to implement") but can no longer wait for this to be developed into the product.  We need to build it ourselves.  We'd appreciate any advice you can give us. Thanks.


Susan Williams, Lexmark
6 REPLIES 6

Hi @Chris Everding 

Thanks for you response

Yes the changes contain the Washington version.

 

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
    <g:requires name="scripts/angular_includes_1.5.11.js" />
    <g:requires name="scripts/app.test_management/test-step-result/js_includes_test_step_result.js" includes="true" params="r=$[new global.AgileGlobalUtils().getFlushStamp('jsjsjscache')]"/>
    <g:requires name="styles/app.test_management/test-step-result.css" params="c=$[gs.getProperty('css.version')]_$[new TestManagementGlobalUtils().getFlushStamp('csscsscsscache')]&amp;theme=${jvar_theme}"/>
    <g2:evaluate var="jvar_step_results" object="true">
        new TestStepResultService().getStepResults('$[current.getUniqueValue()]');
    </g2:evaluate>
    <now-message key="File not downloaded" value="${gs.getMessage('The file {0} did not pass security scan and cannot be downloaded.')}"></now-message>
    <div class="sn_step_result" ng-cloak="" sn-ng-formatter="sn.testManagement.testStepResult" id="testStepResultApp" ng-controller="TestStepResultCtrl as vm">
        <script>
            angular.module("sn.testManagement.testStepResult").run(function(dataStore){
                dataStore.setData("testStepResults",JSON.parse("$[JS:jvar_step_results]"));
            });
        </script>
        <div>
            <div class=" col-xs-12 col-md-1_5 col-lg-2 control-label">$[SP]</div>
        </div>
        <div class="col-xs-10 col-md-9 col-lg-8 form-field input_controls">
            <ul class="step_result_list">
                <li class="flex flex-column" ng-repeat="result in vm.stepResults">
                    <div class="step_result_content row">
                        <div class="word-break col-xs-9" aria-label="${gs.getMessage('Test step')}: {{::result.step}}" tabindex="0">{{::result.step}}</div>
                        <div ng-if="::result.step_result" class="col-xs-3">
                            <div class="flex flex-v-center step-result" aria-label="${gs.getMessage('Step result')}: {{::result.step_result}}" tabindex="0">
                                <span>{{::result.step_result}}</span>
                                <span ng-if="::result.step_result" class="icon-circle-solid flex flex-h-center flex-v-center" ng-class="::{'test-passed': result.step_result_value === 'passed', 'test-failed': result.step_result_value === 'failed', 'test-blocked': result.step_result_value === 'blocked', 'text-dark': result.step_result_value === 'not_executed'}"></span>
                            </div>
                        </div>
                    </div>
                    <div ng-if="::result.step_result_value === 'passed' ||result.step_result_value === 'failed' || result.step_result_value === 'blocked'">
                        <div class="step_result_comment_container" ng-if="result.comment">
                            <div class="step_result_comment_label">${gs.getMessage('Comment')}</div>
                            <div class="step_result_comment word-break" tabindex="0" aria-label="{{::result.comment}}">{{::result.comment}}</div>
                        </div>
                        <div class="step_result_attachment_container">
                            <ul>
                                <li class="step_attachment_item flex flex-v-center" ng-repeat="file in result.files track by file.sys_id" ng-click="vm.handleAttachmentClick($event,file)" ng-class="::{'infected_file': file.state === 'not_available'}">
                                   <div class="step_attachment_preview flex flex-v-center flex-h-center">
                                       <span class="step_attachment_image" ng-if="::file.image" ng-style="::{'background-image': 'url(' + file.thumbSrc + ')'}" />
                                        <span class="step_attachment_icon" ng-if="::!file.image" ng-switch="" on="file.ext">
                                            <span ng-switch-when="pdf" class="icon-document-pdf"></span>
                                            <span ng-switch-when="doc" class="icon-document-doc"></span>
                                            <span ng-switch-when="docx" class="icon-document-doc"></span>
                                            <span ng-switch-when="ppt" class="icon-document-ppt"></span>
                                            <span ng-switch-when="txt" class="icon-document-txt"></span>
                                            <span ng-switch-when="xls" class="icon-document-xls"></span>
                                            <span ng-switch-when="zip" class="icon-document-zip"></span>
                                            <span ng-switch-default="" class="icon-document"></span>
                                        </span>
                                    </div>
                                    <div class="flex flex-1 flex-v-center step_attachment_detail_container">
                                        <div class="flex flex-1 flex-column step_attachment_detail">
                                            <div class="flex-ellipsis"><span aria-label="${gs.getMessage('File name')}" class="step_attachment_file_name" title="{{::file.file_name}}" tabindex="0">{{::file.file_name}}</span>
                                                <span ng-if="::file.state === 'not_available'">$[SP][${gs.getMessage('Unavailable')}]</span>
                                            </div>
                                            <div class="step_attachment_file_size" aria-label="${gs.getMessage('File size')}" tabindex="0">{{::file.size}}</div>
                                        </div>
                                        <div>
                                            <a ng-if="::file.state !== 'not_available'" ng-click="$event.stopPropagation();" ng-href="{{vm.getDownloadLink(file)}}" class="btn btn-icon icon-download flex flex-h-center flex-v-center" title="${gs.getMessage('Download')}"></a>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="step_result_sideline" ng-class="::{'step-passed': result.step_result_value === 'passed','step-failed': result.step_result_value === 'failed', 'step-blocked': result.step_result_value === 'blocked'}"></div>
                </li>
            </ul>
        </div>
        <div class="col-xs-2 col-md-1_5 col-lg-2 form-field-addons">
        </div>
    </div>
</j:jelly>
Highlighted the code with underline and bold.Please suggest any modification is required on the same.i changes only in test_step_result UI Macro.
Thanks in advance

You likely figured this out, but for the test runner itself, you also need to modify the "test_step_list" macro.