Skip to content

Conversation

@at8807602
Copy link
Contributor

I have created custom test step configuration script to retrieve the number & short description of the incident in the test step while performing the dependent server-side operations on incident table.

Above custom test step configuration script will help to get the "Number" & "Short Description" based on the sys_id of the incident. Let's say while performing any server dependent steps on incident table this custom step configuration script can be very usefullt to retrieve the details, not only about incident or number, short_description. Anybody can utilize this script to create custom step configuration script on different usecases o scenario.

Note: You need to define the inputs & outputs for this, in my case I have defined the 'sys_id' as an input and "Number" & "Short Description" as an output to store the values and use it anywhere. Also to make sure you define the "stepResult.setOutputMessage("Successfull")" and "stepResult.setOutputMessage("Unsuccessfull")"
Above custom test step configuration script will help to get the "Number" & "Short Description" based on the sys_id of the incident. Let's say while performing any server dependent steps on incident table this custom step configuration script can be very usefullt to retrieve the details, not only about incident or number, short_description. Anybody can utilize this script to create custom step configuration script on different usecases o scenario.

Note: You need to define the inputs & outputs for this, in my case I have defined the 'sys_id' as an input and "Number" & "Short Description" as an output to store the values and use it anywhere. Also to make sure you define the "stepResult.setOutputMessage("Successfull")" and "stepResult.setOutputMessage("Unsuccessfull")"
Above custom test step configuration script will help to get the "Number" & "Short Description" based on the sys_id of the incident. Let's say while performing any server dependent steps on incident table this custom step configuration script can be very usefullt to retrieve the details, not only about incident or number, short_description. Anybody can utilize this script to create custom step configuration script on different usecases o scenario.

Note: You need to define the inputs & outputs for this, in my case I have defined the 'sys_id' as an input and "Number" & "Short Description" as an output to store the values and use it anywhere. Also to make sure you define the "stepResult.setOutputMessage("Successfull")" and "stepResult.setOutputMessage("Unsuccessfull")"
Above custom test step configuration script will help to get the "Number" & "Short Description" based on the sys_id of the incident. Let's say while performing any server dependent steps on incident table this custom step configuration script can be very usefullt to retrieve the details, not only about incident or number, short_description. Anybody can utilize this script to create custom step configuration script on different usecases o scenario.

Note: You need to define the inputs & outputs for this, in my case I have defined the 'sys_id' as an input and "Number" & "Short Description" as an output to store the values and use it anywhere. Also to make sure you define the "stepResult.setOutputMessage("Successfull")" and "stepResult.setOutputMessage("Unsuccessfull")"
Add Custom Test Step Configuration Script to Fetch Number & Short Description
Add Custom Test Step Configuration Script to Fetch Number & Short Description
@ravichandra1998g ravichandra1998g self-assigned this Oct 2, 2025
Copy link
Contributor

@ravichandra1998g ravichandra1998g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@ravichandra1998g ravichandra1998g merged commit fb62c37 into ServiceNowDevProgram:main Oct 2, 2025
2 checks passed
@ravichandra1998g ravichandra1998g self-requested a review October 2, 2025 06:46
Copy link
Contributor

@ravichandra1998g ravichandra1998g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add .js file

or change the script file to .js

@at8807602
Copy link
Contributor Author

Hello @ravichandra1998g ,
As requested, I have changed the file name, now the file name is "Get_Number_&_Short_Description.js".

@ravichandra1998g
Copy link
Contributor

Please change the path as well.
This is a custom ATF step.
so it should be under Specialized Areas -> ATF tests

Copy link
Contributor

@ravichandra1998g ravichandra1998g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

submit another PR by changing path and creating new js file

@at8807602
Copy link
Contributor Author

at8807602 commented Oct 2, 2025

So, just a quick question. It's this PR is not considered.

@ravichandra1998g
Copy link
Contributor

Hello @at8807602 ,
I have reverted the changes from this PR.
You can use the same content and create another PR.

Do not create new file path under code snippets.
use existing file path structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants