When opening pages, forms, record producers in Service Portal through ATF steps, the error observed is “FAILURE: Failed to open Catalog Item. Either you don't have access to the Catalog Item or g_form is not defined”
ATF doesn't support custom widget
Check if you are using a Custom\deprecated widget(as in the attached screenshot) in sc_cat_item page of the sp_page. We don't support custom\deprecated widgets in the ATF. To fix this issue, You can change the widget to OOB widget in the Widget field of sp_instance.