ATF Test Case Error - "FAILURE: Failed to open Catalog Item. Either you don't have access to the Cat

Chandrakant41
Tera Contributor

I hope you're doing well. I'm currently facing a challenge with ATF test cases,

Encountering errors consistently on every form within the Service Portal. I attempted a fix involving widget changes, but unfortunately

 

Error message:

FAILURE: Failed to open Catalog Item. Either you don't have access to the Catalog Item or g_form is not defined.

 

 

3 REPLIES 3

Dr Atul G- LNG
Tera Patron
Tera Patron

 Hi @Chandrakant41 

 

  • If you are getting any of the below errors , this could be related to the use of custom widgets. Catalog items that have deprecated or custom widgets are not supported in ATF
    • FAILURE: Failed to open Catalog Item. Either you don't have access to the Catalog Item or g_form is not defined
    • FAILURE: Validations failed. Failed to Order Item
    • FAILURE: Failed to submit the record producer
    • FAILURE: Failed to Add the catalog item to cart
 
Refer to KB below for more information:

KB0716457-When opening and ordering pages, forms, record producers in Service Portal through ATF ste...

 

Have a look here

 

https://www.servicenow.com/community/itom-forum/error-quot-failure-failed-to-open-catalog-item-eithe...

 

https://www.servicenow.com/community/developer-forum/atf-failure-g-form-is-not-defined-a-valid-form-...

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0862335

 

Also try to open the same catalog item with same user , you are using in ATF. Check the user criteria. 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@Chandrakant41 

are you sure you are using correct user and that user is satisfying any user criteria for that catalog item?

Did you try running the test as an admin?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar 

 

I've verified that the user and criteria are correct, and I've attempted to run the test as an admin. Unfortunately, the issue persists. Could you kindly provide any additional solutions to help resolve the g_form problem?