ATF Madrid - Cannot Submit using Order a Catalog Item (SP)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2019 04:03 AM
I have set up the following test steps for an ATF test in Madrid, and you can already see the problem :).
We cannot seem to go past submitting a RITM using the ATF test step Order a Catalog Item (SP). The Client Test Runner clicks "Order Now" (we are not using a cart layout), it reads "Submitting..." but then it fails with no more detail than "FAILURE: Validations failed. Failed to Order Item."
Validation failing cannot be true since all mandatory fields are filled in by steps prior to Order a Catalog Item (SP), as you can see. I have also tried testing another, simpler catalog item with the same result. I have tried different browsers, impersonating my admin user instead of one with the role snc_internal, but all end up in the same error.
When creating the test using backend steps (so without "SP" behind the name of the step), the RITM gets submitted successfully, so this seems to only be a problem with the test steps that target the Service Portal.
We have quite a lot of customizations in our portal and I wouldn't be surprised if it is due to this issue with "submit" not found:
We are getting this warning on inspecting a catalog item that is yet to be submitted, probably as intended by ServiceNow. We have no trouble submitting the same catalog item from the portal manually, despite the submit UI action not found warning. At the same time, in Chrome > Inspect > Console the above warning for the UI action is followed tightly by the ATF error when tested from ATF:
Or is this because our Order Now is not OotB and as such, not supported? Ref.:
Any insight is greatly appreciated, including if there is an alternative way of submitting and getting a record from it. I have also tried Submit a form (SP) but I cannot extract the submitted record from it...
- Labels:
-
Automated Test Framework
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2019 08:09 PM
I started updating the timeouts for all of our Order Catalog Item steps. I've had cases where even 10 seconds failed. I have not had any fail at 15 seconds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2019 02:33 PM
Very helpful cheat sheet published by Servicenow for ATF - Best practices and when to use timeouts etc.
https://www.servicenow.com/content/dam/servicenow-assets/public/en-us/doc-type/bp/csc-quick-answer-b...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2020 01:35 AM
If you are using a custom widget then here is what you need to check for.
Hi,
I know its too late to reply to this question but I came across the same error.
So the problem on my side was that we were using the custom widget and someone from the developer team has messed up with this ATF section inside the client controller script which was actually causing Failure while ordering item(SP) so adjust the code accordingly and ATF started working back again.
The actual problem was OOB order item(SP) was calling a method with a parameter but inside the custom widget, we don't have such a method at that time.
here is the screenshot of code that you probably don't want to mess with while customizing the widget.