views:

165

answers:

1

I have a web application that uses AzMan authorization to grant different functionality to different users. I've just started using WatiN to implement some automated web UI tests that run under Visual Studio Team System/TFS. I'd like to be able to use it to verify the different authorization scenarios. To do this though I'd need to be able to run different tests as different users who are granted differing rights through AzMan (using dummy test accounts).

Does anyone have experience with automating testing of AzMan authorization?

How about running VS "unit" tests as different users under TFS?

+1  A: 

The method that you use for authentication will affect how you can do this.

If you are using Integrated Security (Windows auth) then one way could be to run your WatiN tests as other Windows users using impersonation.

If you are using Forms Authentication then you can just use WatiN to log in as the different users because it's just "pure web" POST's/GET's.

Jeremy Wiebe
I'm using Windows authentication. Sounds like I need to write code to do the impersonation. Looks like this will help:http://blogs.msdn.com/jimmytr/archive/2007/04/14/writing-test-code-with-impersonation.aspx
Craig Fisher