We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

ATF Teststep remains pending

stephan8
Tera 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
Tera 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

Hi Stephan,

yes you need to set whether the test step is success or failure

for success:

stepResult.setSuccess();

for failure:

stepResult.setFailed();

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  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader