- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2016 03:30 PM
If a tester uses the guided execution and uploads an attachment, where can we see the attachment? It is not in the test plan.
I don't see it in Metric Results either.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2016 04:07 PM
Hi Vanessa -
I was testing this a few weeks back and noticed the same thing you came across.
Through the Helsinki release, the attachments are not being copied over on submission or save of the test.
When i asked for a recommendation on how to access the attachments, it was to use the record based view of test executions instead of the assessment/survey "Guided Test" method. This way the tester could attach to the correct record.
While this may work in some cases, it may not be the ideal solution.
The alternative is a code based (partial) solution for this issue. I used this in a demonstration, but its NOT PRODUCTION CODE 🙂
Here is the catch - this code copies the attachment to all of the test execution steps.
This can be good and bad -
Good: the attachment will be available from the step it failed
Bad: Irrelevant attachments will exist on execution steps.
This alludes to what Chuck Tomasi@ was saying re: the target record.
If we only copy the attachment to the test case, then its not as easily available on the execution step.
The challenge here is which record it should equate to in the test execution. There is currently only one "attachment" for the entire test execution, so when someone goes to view the execution step, where should the attachment really be?
It would be interesting to get your feedback on this. I would appreciate if you could open up a ticket with ServiceNow support on this issue to explain what the problem is. https://hi.service-now.com This will find its way to the Product Backlog through our Service Management process. Feel free to post the ticket number here so i can track it.
Regarding the code to copy the attachment:
We sync up test results from assessments to test plan through the SCRIPT INCLUDE tm_AssessmentResultSync.
In that there is a method syncResults
In that around line 26 you will find code like this
this.updateResult(testCase, testCaseMetric, asmtInstance);
GlideSysAttachment.copy(tm_TestManagement.ASMT_INSTANCE, asmtInstanceDecorator.getValue('sys_id'), tm_TestManagement.TEST_CASE_INSTANCE, testCase.getValue('sys_id'));
}
Add the line in Green there and it will copy attachments from assessment to test cases.
One thing to note, if testers takes test cases through assessment multiple times, attachments will get copied multiple times.
So may be you need to add a logic to delete attachments and copy again.
NOTE: Please do not add this directly in production. It was code used for demonstration purposes only. It needs fully tested against your use case.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2016 03:34 PM
Hi Venessa,
What is "guided execution" referred here? I am assuming this is related to service catalog.
If yes then it should be in request table i.e sc_request.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2016 03:38 PM
Hi
I'm referring to guided test execution in Test Management.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2016 03:40 PM
Can you please share screenshot?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2016 03:47 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2016 03:49 PM
That would indicate the file is stored somewhere else. Can you share a screenshot of the sys_attachments list (sorted by descending updated date)?