views:

200

answers:

1

I am very new to the whole unit testing concept so I'm sorry if "unit test" is the wrong word for this. I think it might actually be a "integration test"?

At any rate, I am using asp.net's membership framework for login, logout, change password, etc. But I do a few extra things like updating the authentication ticket, adding an entry to another table at registration, refresh auth ticket on password change, etc.

What's the best way to go about writing tests for these types of cases?

+1  A: 

I see 2 main options:

  • If you have a wrapper for the auth ticket and an interface for the repository, you can effectively unit test the logic involved (not sure how you are using the asp.net membership framework, but in any case you can move this logic to a class you can unit test).
    • Do automated web acceptance tests, using watin or selenium - this would still be written in your testing framework of choice (mstest, nunit, etc)

Update 1: I would do both, full blown unit tests for the logic and the WAT instead of smoke tests.

eglasius