Skip to content

Instantly share code, notes, and snippets.

@manvillej
Last active April 24, 2021 15:18
Show Gist options
  • Save manvillej/e19f54815650294d2bb2291f2646e1ca to your computer and use it in GitHub Desktop.
Save manvillej/e19f54815650294d2bb2291f2646e1ca to your computer and use it in GitHub Desktop.
(function process(/*ResolverEnvironment*/ env) {
var suite_id = env.getSource().sys_id.value;
var test_list_object = [];
var test;
var tests_in_suite = new GlideRecord("sys_atf_test_suite_test");
tests_in_suite.addEncodedQuery("test_suite=" + suite_id);
tests_in_suite.query();
while(tests_in_suite.next()) {
test = tests_in_suite.test.getRefRecord();
test_list_object.push(ATFGraphQLAPI.atfTestToJson(test));
}
return {
"results": test_list_object
};
})(env);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment