ATF - Running report and validating records

Community Alums
Not applicable

Is this possible to run a report and validating the record from ATF?

1 ACCEPTED SOLUTION

@Ganesh Manasali 

Yes, you can configure scheduled report in your instance and then run this scheduled report using

Server Side ATF Script

Sample script below

(function(outputs, steps, stepResult, assertEqual) {
// add test script here

var rec = new GlideRecord('sysauto_report'); 

rec.get('name', 'ReportName'); 

gs.executeNow(rec);

stepResult.setOutputMessage('Ran the Report');

stepResult.setSuccess();

return true;

})(outputs, steps, stepResult, assertEqual);

Regards
Ankur

 

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

6 REPLIES 6

@Ganesh Manasali 

Hope you are doing good.

Let me know if I have answered your question.

If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.

Regards
Ankur

 

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Ganesh Manasali

Hope you are doing good.

Did my reply answer your question?

If my response helped you please mark it correct to close the question so that it benefits future readers as well.

Thanks!
Ankur

 

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader