Generally you need end to end tests as well as unit tests. I don't want to explain the basic concept but I just want to list some best practice from my own experience.
For doing the unit tests, only test one layer at a time by mocking the layer it based on. For example, when you test Business layer, you should mock the Data access layer. By mocking the layer below, you can logically isolate the code stub you want to test without touching other layers. This approach not only is easy to work with, but also you can prevent testing too much things and get false alarms. You can also prepare test fixture to make sure every time you run test, you actually do the dry run
.
Here are some popular technology you can use to do the unit testing:
- To test Javascipt in the View Layer you can use Jasmine etc
- To test the C# code, you can use MSTest, nUnit, xUnit
- To mock the C# layer, you can use Moq
- To do the end to end testing, you can use Selenium