ATF Teststep remains pending

stephan8
Mega Expert

Hi, i have a problem with a teststep. In the first step i just create a record. in the second step I whant to perform a Script but the ATF dosen't execute that step and in the result the status of the step remains pending. Why is that ?

find_real_file.png

The step should perform a simpel script: 

(function executeStep(inputs, outputs, stepResult, timeout) {
	gs.info(JSON.stringify(inputs));
}(inputs, outputs, stepResult, timeout));
1 ACCEPTED SOLUTION

stephan8
Mega Expert

I found my fault. I had to define a Testresult.

I added this line of code and than it is working: 

stepResult.setSuccess(true);

View solution in original post

5 REPLIES 5

Namrata Khabale
Giga Guru

Hey stephan,

you might find solution here:

 

https://community.servicenow.com/community?id=community_question&sys_id=42a443e9dbd8dbc01dcaf3231f96...

 

https://hi.service-now.com/kb_view.do?sysparm_article=KB0789203

 

 

Kindly Mark Correct if this solves your issue and also mark  Helpful if you find my response worthy!

 

 

Best Regards,

Namrata

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

I could see a custom step is being used DBS PA Get Value.

inputs is an object whatever value you send to this custom step variable; the same can be used in the script

you need to use input variables which you are creating

in screenshot you can see I have created input variables and how it is being used in the script using inputs; not sure whether gs.info would work there

find_real_file.png

when you select that custom step; you can see option to set the value of input variable

the way you need to send the value; since it is true/false type you can set it to true by marking the checkbox

find_real_file.png

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

stephan8
Mega Expert

Thank you for your answers, but my problehm is, that the test is faild but the teststep "DBS Get Value" is still pending. That makes no sense to me. 

stephan8
Mega Expert

I found my fault. I had to define a Testresult.

I added this line of code and than it is working: 

stepResult.setSuccess(true);