Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

ATF Teststep remains pending

stephan8
Giga 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
Giga 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  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader