- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 03:19 PM
I have created an ATF test for one of my service catalog items. This particular catalog item has a Multi-Row variable set.
It is failing on the "Add row to multi-row variable set (sp)" and I can't figure out why it is failing.
My steps are as follows:
Open a Catalog Item (sp)
Set Variable Values (sp) - a value in this step triggers the need for the multi-row variable set.
Add row to multi-row variable set (sp) -- this is the step that is failing
Set Variable Values (sp)
Save current row of multi-row variable set (sp)
Order a Catalog Item (sp)
I'm not sure what I'm missing or what is causing this step to fail. There is no comment in the test to give me a clue why that step is failing. Any assistance would be appreciated.
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 09:44 PM
Check for custom Javascript: Examine any custom JavaScript that you have implemented in the catalog item's client script or UI policies, which might interfere with the ATF test. Disable the custom scripts temporarily to see if the test starts working.
Verify variable configuration: Ensure that the multi-row variable set and its variables are configured correctly. Double-check the variable names, types, and other settings. Make sure that any mandatory fields in the multi-row variable set have values assigned during the test.
Inspect the browser console: When running the ATF test, open the browser's developer console (F12 in most browsers) and look for any errors or warnings related to the multi-row variable set step. These messages might give you a clue about the issue.
Test manually: Try to replicate the steps of the ATF test manually in the Service Portal to ensure the catalog item and its variables are functioning as expected. If you encounter issues during manual testing, it might indicate a problem with the catalog item itself.
Add more log messages: In the ATF test steps, add log messages to output the values of the variables and other relevant information during the test execution. This might help you identify any discrepancies in the data or unexpected behaviors.
Review the test execution details: After running the ATF test, click on the failed test step in the Execution Details tab to see if there are any additional details or error messages. Sometimes, these messages provide more information about the cause of the failure.
Break down the steps: If you're still unable to identify the issue, try breaking down the failing step into smaller steps or isolate the issue by creating a separate test with fewer steps focused only on the multi-row variable set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 08:51 PM
Did you try to give some timeout for the failing step i.e. 5 or 10 seconds?
what's the failure message it shows?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 09:44 PM
Check for custom Javascript: Examine any custom JavaScript that you have implemented in the catalog item's client script or UI policies, which might interfere with the ATF test. Disable the custom scripts temporarily to see if the test starts working.
Verify variable configuration: Ensure that the multi-row variable set and its variables are configured correctly. Double-check the variable names, types, and other settings. Make sure that any mandatory fields in the multi-row variable set have values assigned during the test.
Inspect the browser console: When running the ATF test, open the browser's developer console (F12 in most browsers) and look for any errors or warnings related to the multi-row variable set step. These messages might give you a clue about the issue.
Test manually: Try to replicate the steps of the ATF test manually in the Service Portal to ensure the catalog item and its variables are functioning as expected. If you encounter issues during manual testing, it might indicate a problem with the catalog item itself.
Add more log messages: In the ATF test steps, add log messages to output the values of the variables and other relevant information during the test execution. This might help you identify any discrepancies in the data or unexpected behaviors.
Review the test execution details: After running the ATF test, click on the failed test step in the Execution Details tab to see if there are any additional details or error messages. Sometimes, these messages provide more information about the cause of the failure.
Break down the steps: If you're still unable to identify the issue, try breaking down the failing step into smaller steps or isolate the issue by creating a separate test with fewer steps focused only on the multi-row variable set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2023 02:14 PM
I went through each of the steps you suggested. The last one, breaking down the steps, was the one that resolved the issue. I also rearranged the order a bit too. I opened the form, set the variable that would trigger the multi-row, then did the add multi-row step, set the variables in the multi-row, saved the multi-row, then set the variables for the remaining mandatory variables on the catalog item. That worked. Than you for the assist.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2023 07:06 PM
glad it helps.