How to Trigger " Schedule Jobs" by ATF( testing-Automated Testing Framework)

chanikya
Tera Guru

Hi,

 

Can any one please guide me how to call Schedule jobs by using ATF

1 ACCEPTED SOLUTION

Hello,



I agree with mbh.

The way he described is the OOB one via which an ATF test can be configured to trigger a Schedule Job on the targeted platform (instance).

There is no need for scripting or additional customization!
This will only cause you a lot of needless problem & waste of time.

Simply use the respective OOB ATF tests: 'Record Query' (query the Scheduled Jobs table: Scheduled Script Executions (pointed out by mbh) to find the exact Scheduled Job record you are interested in); 'Open an Existing Record' (to specify the record found by the 'Record Query' step to be opened) and then 'Click a UI Action' (to click on the 'Execute Now' button, available in the opened record form).


Best Regards,
Georgi Mavrodiev

IT Consultant
Do IT Wise Bulgaria

You may visit us in our Web Site: www.doitwise.com

View solution in original post

5 REPLIES 5

Phillip Le Roy
ServiceNow Employee
ServiceNow Employee

Hi chanikya,

I believe you need to add a step to run a Server Side Script.

Then, you can script your Scheduled Job call from there. You will need basically to create a new record to sys_trigger table.

You can have a look in a Out of the box Business Rule called Create Scheduled Job if you have the Assessment plugin enabled.

Phillip

mbhmbhmbh
Tera Contributor

Hello!

I was able to successfully implement using the following:

  1. Step to Impersonate System Admin
  2. Step to open an existing form (Select the table sysauto_script; Select the Scheduled Job to be executed)
  3. Step to Click a UI Action (Select "Execute Now)

I hope this helps!

Hello,



I agree with mbh.

The way he described is the OOB one via which an ATF test can be configured to trigger a Schedule Job on the targeted platform (instance).

There is no need for scripting or additional customization!
This will only cause you a lot of needless problem & waste of time.

Simply use the respective OOB ATF tests: 'Record Query' (query the Scheduled Jobs table: Scheduled Script Executions (pointed out by mbh) to find the exact Scheduled Job record you are interested in); 'Open an Existing Record' (to specify the record found by the 'Record Query' step to be opened) and then 'Click a UI Action' (to click on the 'Execute Now' button, available in the opened record form).


Best Regards,
Georgi Mavrodiev

IT Consultant
Do IT Wise Bulgaria

You may visit us in our Web Site: www.doitwise.com

Hi mbhmbhmbh,

I'm trying use ATF to run a scheduled job , in the correct manner as you described, but when I step a click UI action selecting "Execute Now" , it give an error:Failed to find UI Action 'Execute Now' on 'sysauto_script' form.

Why ? Can you suggest me?

 

Thanks in advance