ATF

Anantha27
Mega Guru

I have to write a test step in ATF when I submit the catalog item it will go to an assignment group, so I need to impersonate any one of the users in the group hence I can't use manual impersonation of the user to avoid warnings.

Please suggest me the solution

Thank you

5 ACCEPTED SOLUTIONS

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Anantha27 

 

ATF is like which mimic the manual work and you can use the steps.

 

In ATF , you can use the step Impersonate and then you can set value of user by which you user you want to impersoante.

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

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

View solution in original post

Krishna6147
Giga Expert

Hi @Anantha27 ,

You can use the following approach:

  1. Create a Test Step to Impersonate the User: In your ATF test, add a step to impersonate the user in the assignment group.This step will use the ATF Impersonate User feature to avoid warnings.

  2. Use the Impersonate User Step:

    • Go to the ATF test where you want to add the impersonation.
    • Add a new test step and select "Impersonate User".
    • Choose the user you want to impersonate from the assignment group.
  3. Create a Catalog Item Submission Step:

    • Add another test step for "Submit Catalog Item".
    • Configure it to submit the specific catalog item you're testing.
  4. Verification Step: After submitting the catalog item, add a verification step to check that the item is assigned to the correct assignment group.

 Thank you

View solution in original post

brahmandlapally
Mega Guru

Use Impersonation step in ATF after submitting the catalog item and then open existing record.

thank you 

if you find my answer helpful please accept my solution.

View solution in original post

Manikanta Kota
Mega Guru

Hi @Anantha2727, 

Perhaps not, but there You have the opportunity to employ a server-side script to impersonate a user by dynamically calling a user from the assignment group for the test.

If it works, please let me know,

Should my answer prove to be helpful, kindly mark it as such by clicking "Accept as Solution" and "Helpful."

 

regards,

Manikanta. Kota

 

View solution in original post

Sai Krishna6147
Mega Guru

Hi @Anantha27 ,

you can use the following approach:
Create a Test Step to Impersonate the User:

In your ATF test, add a step to impersonate the user in the assignment group. This step will use the ATF Impersonate User feature to avoid warnings.
Use the Impersonate User Step:
1.Go to the ATF test where you want to add the impersonation.
Add a new test step and select "Impersonate User".
Choose the user you want to impersonate from the assignment group.
2.Create a Catalog Item Submission Step:
Add another test step for "Submit Catalog Item".
Configure it to submit the specific catalog item you're testing.
3.Verification Step: After submitting the catalog item, add a verification step to check that the item is assigned to the correct assignment group.
Regards,
Sai Krishna

View solution in original post

10 REPLIES 10

Krishna6147
Giga Expert

Hi @Anantha27 ,


you can try sample ATF steps:

  1. Impersonate User (Select user from assignment group)
  2. Submit Catalog Item (Select your catalog item)
  3. Verify Assignment (Check that the request is assigned to the correct group).                                                                                                                                                                                                                                             NOTE:  Ensure that the user you impersonate has the necessary permissions to submit the catalog item.

 

  • You can retrieve the user from the assignment group dynamically if required.
  • Make sure to test thoroughly to ensure that the impersonation and submission work as expected without any warnings.

 

Thank and Regards,

@krishna6147

Krishna6147
Giga Expert

Hi @Anantha27 ,

You can use the following approach:

  1. Create a Test Step to Impersonate the User: In your ATF test, add a step to impersonate the user in the assignment group.This step will use the ATF Impersonate User feature to avoid warnings.

  2. Use the Impersonate User Step:

    • Go to the ATF test where you want to add the impersonation.
    • Add a new test step and select "Impersonate User".
    • Choose the user you want to impersonate from the assignment group.
  3. Create a Catalog Item Submission Step:

    • Add another test step for "Submit Catalog Item".
    • Configure it to submit the specific catalog item you're testing.
  4. Verification Step: After submitting the catalog item, add a verification step to check that the item is assigned to the correct assignment group.

 Thank you

Krishna6147
Giga Expert

Hi @Anantha27 ,

you can use the following approach:
Create a Test Step to Impersonate the User:

In your ATF test, add a step to impersonate the user in the assignment group. This step will use the ATF Impersonate User feature to avoid warnings.
Use the Impersonate User Step:
1.Go to the ATF test where you want to add the impersonation.
Add a new test step and select "Impersonate User".
Choose the user you want to impersonate from the assignment group.
2.Create a Catalog Item Submission Step:
Add another test step for "Submit Catalog Item".
Configure it to submit the specific catalog item you're testing.
3.Verification Step:After submitting the catalog item, add a verification step to check that the item is assigned to the correct assignment group.

brahmandlapally
Mega Guru

Use Impersonation step in ATF after submitting the catalog item and then open existing record.

thank you 

if you find my answer helpful please accept my solution.

Manikanta Kota
Mega Guru

Hi @Anantha2727, 

Perhaps not, but there You have the opportunity to employ a server-side script to impersonate a user by dynamically calling a user from the assignment group for the test.

If it works, please let me know,

Should my answer prove to be helpful, kindly mark it as such by clicking "Accept as Solution" and "Helpful."

 

regards,

Manikanta. Kota