Need help with Catalog Client Script validation in Automated Test Framework (ATF) for Attachment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2023 12:31 AM - edited ‎11-23-2023 12:48 AM
Hello,
I am currently facing an issue with the validation of a Catalog Client Script in the Automated Test Framework (ATF) for a catalog item. I have a catalog script that checks if an attachment is added, but when I add a step to "Add Attachments to Form (SP)" and submit it, the validation returns error message from script that attachment not added (I see in test runner that it is added). The Catalog Client Script is unable to find the attachment.
My goal is to find a solution to either fix this validation issue or bypass it altogether in ATF.
Could someone please provide guidance on how to solve this issue? Specifically, I would like to know how to:
- Modify the Catalog Client Script to successfully validate attachments added through ATF.
OR
2. Determine if the script is running within ATF and conditionally disable or bypass the validation.
Any assistance or insights would be greatly appreciated.
Thank you in advance for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2023 01:27 AM
within ATF you cannot conditionally disable or bypass the validation. I won't recommend that.
Why not have 2 different test cases?
1) when user adds file and it submits
2) when no file and it stops submission
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2023 02:23 AM - edited ‎11-23-2023 02:25 AM
Hello,
When the user adds a file and submits, I am getting an error that the file is missing. This error is returned from the Catalog Client Ccript, which is not capturing that the file has been added. I'm not sure how to check if a file is attached when ATF (Automated Test Framework) is running. Could you please provide me with the script what would work for the attachment in ATF?