- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2020 02:49 AM
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 ?
The step should perform a simpel script:
(function executeStep(inputs, outputs, stepResult, timeout) {
gs.info(JSON.stringify(inputs));
}(inputs, outputs, stepResult, timeout));
Solved! Go to Solution.
- Labels:
-
Automated Test Framework
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2020 04:04 AM
I found my fault. I had to define a Testresult.
I added this line of code and than it is working:
stepResult.setSuccess(true);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2020 04:21 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader