Last post Apr 29, 2012 09:35 PM by BrockAllen
Apr 29, 2012 01:17 PM|ErolFoo|LINK
I'm reading few books and articles regarding unit testing and all of the show simple examples. My first goal is to check if user can login. I'm using MVC4 with Azure. If I understand correctly, tests are performed on blank database. How can for a test insert
one valid user and then test login with it? I'm using Default Membership. Also what is the best way to test it? All examples show how I call controller and pass values to action, but is this the right way? Shouldn I write a test which goes to website, populates
form and submits?
I'm really confused how to start here. I understand tests and TDD, but I dont find any good examples for more complex projects.
Apr 29, 2012 03:24 PM|BrockAllen|LINK
You're not talking about unit testing -- you're talking about integration testing. Integration testing is actually running the app, interacting with the UI and running the code such that it updates the DB... since you're testing the system integrated with
all the parts.
Integration testing can be manual, but many people also automate it with tools like
VS' Coded UI Test or WatiN.
Apr 29, 2012 09:31 PM|ErolFoo|LINK
I see. Right now I'm testing Moq and I'm again confused. How can I setup testing enviroment? So database, users etc...
Apr 29, 2012 09:35 PM|BrockAllen|LINK
Moq is used when you're doing unit testing. Integration testing is just the normal setup of your application/database/whatever but perhaps seeded with test data.