- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2019 02:38 PM
I am using an ATF Server Script to test a Script Include that I developed. My new step is the first step in my Test. I would like to use Parameterized testing and include one of the Parameters as an argument for testing one of the methods in my Script Include, How do I retrieve a Parameter value from inside the script?
The comments in the template of the Server Side Script mentions jasmine and functions such as:
- steps(PREVIOUS_STEP_SYS_ID).<variable name>
- assertEqual()
- stepResult.setOutputMessage("");
- outputs.<variable name>
I guess, I was expecting a method such as:
- parameters.getValue("variable_name")
Solved! Go to Solution.
- Labels:
-
Automated Test Framework

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2019 04:49 PM
Server tests are not supported unfortunately, from their docs page:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2019 04:49 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2020 09:01 AM
Here's an alternate solution:
1. Record Insert (for example, an Incident)
- Store a parameter in the description field
2. Server-Side Script
- Retrieve the record inserted and use the description field as the parameter
// In server-side script
//*************************
var createBufferIncident = 'a1...d7'; // sysid of previous Record Insert step
var bufferIncident = new GlideRecord('incident');
bufferIncident.get(steps(createBufferIncident).record_id);
// Use bufferIncident.description to access the stored parameter
gs.info(bufferIncident.description);
Hope this helps!
Alberto

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2022 12:57 AM
Oh, what a pity.
This limit seems still valid on Tokyo release.
There is a workaround to run a test on a function in a server include with a set of different parameters? Or I have to create a test step for each different param that I want to test?