ATF
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2019 01:28 AM
How to create ATF test in servicenow
7 REPLIES 7
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2019 02:53 AM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2019 06:09 AM
Hi Nag,
You can include a line before proceeding to steps, something like this:
1. var url = "https://dev55511.service-now.com/$m.do";
2. if(isValidURL(url)){
The full script is here:
(function(outputs, steps, stepResult, assertEqual) {
// add test script here
var url = "https://dev55511.service-now.com/$m.do";
if(isValidURL(url)){
var list = ['My Incidents','Knowledge','Location','My Requests','Service Catalog','My Approvals','Favorite KPIs','Connect'];
var gr2 = new GlideRecord('sys_ui_mobile_home_page_section');
gr2.query();
while (gr2.next()){
var gr = new GlideRecord('sys_ui_mobile_home_page_module');
gr.query();
while (gr.next()){
stepResult.setOutputMessage("The module found in Homepage is"+gr.title);
gs.log('Found 1 module'+gr.title);
for (i=0;i++;i<(list.length)-1){
assertEqual({name: "Checking Module Name", shouldbe: list[i], value: gr.isValidRecord()});
}}// pass the step
return true;
}
}
else
return false;
})(outputs, steps, stepResult, assertEqual);
// uncomment the next line to execute this script as a jasmine test
//jasmine.getEnv().execute();
Thanks, Akash.
Regards, Akash
If my response proves useful, please mark it "Accept as Solution" and "Helpful". This action benefits both the community and me.
If my response proves useful, please mark it "Accept as Solution" and "Helpful". This action benefits both the community and me.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2019 06:23 AM
its not working tests are failed