Is it possible to create a copy of an OOTB step config?

afelez07
Tera Contributor

New to ATF and Having hard time finding a topic related to this issue.

 

i just want to create a copy of the “Run Server Side Script” OOTB test step config.

 

there is no copy button available and when I right click the header and click “insert” or “insert and stay” I get a red banner error saying f “invalid update”

 

In my scope application I just want create a custom step config that is similar to the above OOTB step config. Since I don’t have cross scope access privilege. 

4 REPLIES 4

Ankur Bawiskar
Tera Patron

@afelez07 

you can have your own server side script step in your scope

ATF Custom Step Configuration for Calling Server Scripts with Inputs and Output 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

@afelez07 

Hope you are doing good.

Did my reply answer your question?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Its_Sagnic
Mega Guru

Hi @afelez07 ,

Try to follow the below step to get the solution of your problem.

1. Enable Record Copying 
The "Insert" and "Insert and Stay" options are often blocked by UI Policies or ACLs on the sys_atf_step_config table.
  • Switch to Global Scope: Temporarily switch your developer session to the Global scope to perform the copy.
  • Create the Copy: Navigate to Automated Test Framework > Administration > Step Configurations. Open the "Run Server Side Script" record, right-click the header, and select Insert and Stay.
  • Note: If "Insert and Stay" still fails, you may need to manually create a New record and copy-paste the scripts from the OOTB record. 
 
2. Configure Your Custom Step
Once you have a new record:
  • Update the Name: Change it to something unique (e.g., "Custom Scoped Server Side Script").
  • Set the Scope: Ensure the "Application" field is set to your Scoped Application.
  • Scripts: Copy the Step Execution Script and Description Generation Script from the OOTB version into your new record. 
 
3. Handle Cross-Scope Access :
If your custom step needs to access data or APIs outside its scope, you must define permissions:
  • Cross-Scope Access: Navigate to System Applications > Application Cross-Scope Access.
  • Create New Record: Define a record with your application as the Source Scope and Global (or the target scope) as the Target Scope. Set the Status to Allowed.
  • Restricted Caller Access (RCA): If prompted with RCA errors during execution, go to System Applications > Restricted Caller Access Privileges and change the status of the requested access to Allowed. 

    If you feel the solution helpful please mark it as helpful.

Shaqeel
Mega Sage

Hi @afelez07 

 

If I understood your question properly,

You can user add new Run server side Test template and then you could just use it in any of your test. Automated test framework>>Administration>>test templates.

 

or You can create a step configuration. Automated test framework>>Administration>>step configuration


***********************************************************************************************************************
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

Shaqeel