
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2023 09:48 AM
Is it possible to pass values from a Run Server Side Script test step to proceeding test steps?
After investigating, and finding out that I had to ADD an Output Variable to the Run Server Side Script test step (Automated Test Framework > Administration > Step Configurations > Run Server Side Script > Output Variables), I thought this bit of code would allow me to actually obtain a field value and pass it to proceeding test steps, but no, this doesn't work.
(function(outputs, steps, params, stepResult, assertEqual) {
var gr = new GlideRecord('problem');
// gr.get(steps('0bc8dc5d1bd0bd10ee9420ecac4bcb4e').record_id);
gr.addQuery('sys_id',steps('0bc8dc5d1bd0bd10ee9420ecac4bcb4e').record_id);
gr.query();
if(gr.next()) {
outputs.u_jirakey = gr.u_jira_key;
outputs.table = 'problem';
// outputs.record_id = gr.insert();
// outputs.table = 'problem';
}
})(outputs, steps, params, stepResult, assertEqual);
I don't know if this SHOULD show up in the test results, but when I look at the results for this step I see this...
Anyone else run into this??
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2023 09:53 AM
Have you attempted to set a static value for those two output variables in your script? Currently it is nested inside your query and I cannot determine if that query is just unsuccessful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2023 09:53 AM
Have you attempted to set a static value for those two output variables in your script? Currently it is nested inside your query and I cannot determine if that query is just unsuccessful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2023 08:22 AM
I did and it worked with the static values. I was able to identify and extract the data I needed, but ultimately we went in another direction.