ATF help needed. If I don't impersonate the user, the test runs fine, but if I do, then test fails.

snow_beginner
Mega Guru

Hi, 

So I created an ATF test, which is not too fancy just checking a catalog item and creating a RITM and SCTASK. I created a user for this test with the relevant roles, and also gave it a Line Manager (LM).

If you run the test with the user impersonation checkbox checked (a little box in the create a user test step), the test fails at the checkout cart step and you get an error on the execution frame that this needs LM approval and the checkout cart step fails in the test and says the cart is empty. This particular catalog item doesnt need a LM approval though.

If you run the test without impersonating the user created then the test runs absolutely fine and no errors. In the execution frame though I can see my details are filled in and then erased and then everything happens but I am logged into the service Portal though 

Anyway to fix this?  

3 REPLIES 3

Maik Skoddow
Tera Patron
Tera Patron

Hi

for this reason ATF are the best to find out what's going wrong. In your case I assume that the impersonated user do not have the required roles to create catalog requests whereas your account it has.

Therefore, check the roles assigned to the impersonated user and in case you create that user as part of your test you have to assign the required roles as the next step after user creation.

Maik

Hi,

I tried to do that just now and give the test user my groups. I have GLOBAL Domain and Admin groups.

I can give the test user GLOBAL domain group but not admin group for some reason. When I give the user admin group and run the test, the test fails at the 1st step with an error that user cannot be given 'Admin' group. I also tried to give it admin role but again same thing...

Hi

sorry, but this answer is a bit confuse as you are mixing different words and their underlying concepts.

For example it's not clear to whether you are in a domain-separated instance or not.

Please provide complete screenshots of your ATF steps.

Kind regards
Maik