ATF - Notification validation

Community Alums
Not applicable

Email notification has been configured for creation of enhancement record. I am creating an enhancement record from below steps.

find_real_file.png

I want to validate whether the notification has been triggered or not for enhancement record created from step 3. Also I want to validate notification is triggered to assigned to of enhancement record. Could any one suggest me how I can achieve this through ATF?

Also please inform me how I can query enhancement number from ATF?

1 ACCEPTED SOLUTION

This would be your code:

 

(function(outputs, steps, stepResult, assertEqual) {
    var gr = new GlideRecord("rm_enhancement");
    var num = steps('60f29ef0dbf527006d3c72fc0f961959').record_id; //Sys Id is mentioned here is previous step sys_id. 
gr.addQuery('sys_id',num);
gr.query();
if(gr.next())
{

    outputs.record_id = gr.number; //(replace with field name of number)

    }
    // add test script here

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

View solution in original post

16 REPLIES 16

Go to "sys_atf_step_config" table.

In the list, select "Run Server side script"

Then in the related list, you can add output variables. You will have only two by default which come out of box. I have 3 as you can see, a 3rd one called u_string which is a string field.

 

find_real_file.png 

 

 

Community Alums
Not applicable

Thank You!!!