ATF - Set Component Value (Custom UI) for Change risk assessment

Yanping Guo1
Tera Contributor

I created a ATF to test change request risk assessment. Here are the steps:

1. Record Query
2. Open an Existing Record

3. Clicked a UI action:  Clicked UI action 'Risk Assessment' on 'change request' form

4. Set Component Values (Custom UI)

I set all the values in Risk assessment form. When I run Test, I got error on step 4: 

FAILURE: Unable to set component 'Choice list <select> [ASMTQUESTION:ebbc79241b4415d4c7a2a648624bcb37]: Is your change impacting network communications... in page area Change Risk Assesment' to value '0', component not found

I can successfully submit the form with the same value from UI page. Not sure why it complains the value that I can select from the drop-down? It doesn't have any dependencies. 

Please Help. 

Thanks!

 

1 ACCEPTED SOLUTION

Brian Lancaster
Tera Sage

You have to build out a custom step for this. None of the ATF test steps that exist out of the box work with Change Risk Assessment. Here is a post I crated on how to setup the custom step.

https://community.servicenow.com/community?id=community_article&sys_id=d75f6c25db180114fd8d2b6913961...

View solution in original post

3 REPLIES 3

Brian Lancaster
Tera Sage

You have to build out a custom step for this. None of the ATF test steps that exist out of the box work with Change Risk Assessment. Here is a post I crated on how to setup the custom step.

https://community.servicenow.com/community?id=community_article&sys_id=d75f6c25db180114fd8d2b6913961...

Yanping Guo1
Tera Contributor

Brian,

It is very helpful. Thank you so much!

The below statement doesn't work for me

var assessmentDetails = new global.ChangeRiskAsmtSNC()._createAsmt(metricType, justCreatedGR.sys_id, justCreatedGR.assigned_to);

I made change as following, it works.

var assessmentDetails = new global.ChangeRiskAsmt()._createAsmt(metricType, justCreatedGR.sys_id, justCreatedGR.assigned_to);

 

That is strange because calling the script include ChangeRiskAsmt just calls ChangeRiskAsmtSNC. ChangeRiskAsmt is just a script include so you can override what is in ChangeRiskAsmtSNC if you wanted to.