Skip to content

Instantly share code, notes, and snippets.

@manvillej
Last active April 18, 2021 13:33
Show Gist options
  • Save manvillej/1a4305d756cf16b8cdb43a1b5f4ab629 to your computer and use it in GitHub Desktop.
Save manvillej/1a4305d756cf16b8cdb43a1b5f4ab629 to your computer and use it in GitHub Desktop.
version 2.0 with Test results
var ATFGraphQLAPI = {
atfTestToJson: function(test){
return {
"active": test.getDisplayValue("active"),
"sys_id": test.getValue("sys_id"),
"name": test.getValue("name"),
"description": test.getValue("description")
};
},
atfTestResultToJson: function(testResult){
return {
"id": testResult.getUniqueValue(),
"pending": testResult.getValue("pending_time"),
"duration": testResult.getValue("run_time"),
"startTime": testResult.getValue("start_time"),
"endTime": testResult.getValue("end_time"),
"output": testResult.getValue("output"),
"status": testResult.getValue("status"),
"userAgents": testResult.getValue("user_agents")
};
},
type: 'ATFGraphQLAPI'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment