Hendrik Engler
ServiceNow Employee

Test Management 2.0 is a simple tool to fully manage manual tests, versions, and even comprehensive test plans for a manual test management process. While you should aim to automate testing as much as possible via Automated Test Framework (ATF), manual test management still plays a vital role, either for end-user specific UAT (User Acceptance Tests) or as a baseline for future automation.

 

Test management is part of the platform (nowadays included in the SPM subscription) for quiet a while and there have not been many updates since. However, through out various engagements there are some specific requirements and features you might miss.

 

The feature at a glance

Running a test version (usually by an assigned tester) allows you to mark all test steps (if they require validation) as passed, blocked or failed. In case of the latter two, you are allowed to add a comment and even an attachment (like a screenshot) to explain the issue. Obviously, for a passed step you do not have this option. It is a valid requirement to also add comments and observations for a passed step and with some minor adjustments, we can make this happen. This would also include to display the comments and attachments on the final test result record for review:

 

HendrikEngler_0-1787310081071.pngFeature at a glance

 

 

Impact and customization

Notice that this feature can only be made available by customizing some minor out-of-the-box assets (macros primarily). Hence in case there shall be an update to them in future updates - if any - this will be reported as a skipped update you need to tackle. The changes needed are very simple and minor, hence less risky in this context. Last but not least, there have not been any significant updates for a while, making it less likely you need to deal with an updated feature set.

 

How to implement

As we can see, there are two components we need to adjust and both are macros. First the macro used to render the steps in the test run (popup window) and second another macro (formatter) embedded on the test result record. Luckily the whole functionality to add a comment / attachment and render them is fully implemented, it is simply (via a condition) prevented for the passed test step scenario.

 

  1. Modify the macro for the test step execution popup

    The test_step_list macro is rendering the test steps and allows the tester per step to mark them as passed, blocked or failed. Within the macro we simply need to find the following section (line 137), create a copy of the container for the comments field and adjust the condition to be displayed for the passed state:

    HendrikEngler_0-1787319257025.pngCopy and add a container for the comments


    Further down the line find the container section for attachments, simply update the condition to include the passed state:

    HendrikEngler_0-1787319706134.pngUpdate the attachments container condition

     

  2. Modify the macro for the test result form

    The test_step_result macro is rendering the test step results on the respective form layout. Here we simply need to update / extend the condition (line 37) to assure comments / attachments get outlined on the form also for the passed state:

    HendrikEngler_0-1787320939673.pngUpdate the condition to include the passed state

     

 

Well that's it. If you do not want to do the code changes on your own, you may use the attached update set. Import it, perform the preview and commit accordingly.

Version history
Last update:
yesterday
Updated by:
Contributors