- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2020 10:52 AM
I have a Service Catalog Item for which I am trying to create an ATF test. These are my test steps.
1. Open a catalog item
2. Set variable values
3. Validate variable values
4. Add item to shopping cart
5. Order catalog item
My results show I am failing at Step 3. However, when watch the test execute, I noticed I am failing at step 2. My catalog item asks the user for a vendor and then the following question asks what the user wants to order from the vendor. The list collectors utilizes Reference Qualifier and ref_qual_elements to change what products are shown depending on the vendor selected. For example, if I have Vendor A and Vendor B, and I select Vendor A, the list collector will only show me the 10 products offered by Vendor A. While I watch the test run, I noticed that after the vendor selection changes, the products offered in the list collector change, but the selection I made in "set variable values" is moved to right "selected" side of the list collector. And then, the test proceeds to fail at step 3. To check that my issue is happening at Step 2, I changed Step 3 from active=true to active=false, and then my test failed at "Add item to shopping cart".
How can I resolve this issue?
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2020 11:06 AM
I did not check on the latest version, but I remember having to use Service Portal Catalog ATF instead of Platform Catalog ATF to be able to test forms with a list collector variable.
If it is applicable to your use case it might be worth it to do your ATF on the Service Portal view of your catalog item (with the associated step configurations specific to the Service Portal).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2020 10:58 AM
Hi,
Why not use Order catalog item directly?
Set the property glide.sc.sp.twostep to true to fix the issue
Alternatively, Adding a Time out of 5 sec to the Ordering Steps also resolves the issue.
please check below link
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2020 11:06 AM
I did not check on the latest version, but I remember having to use Service Portal Catalog ATF instead of Platform Catalog ATF to be able to test forms with a list collector variable.
If it is applicable to your use case it might be worth it to do your ATF on the Service Portal view of your catalog item (with the associated step configurations specific to the Service Portal).