Course Introduction Hi. I'm Jason Roberts from Pluralsight. Welcome to this course on Automated ASP. NET MVC Testing: End to End. By the end of this course we will have learned how to apply testing to the different areas of our MVC application, so we'll learn how to test our model, our controllers, the rendering of our Razor Views, and how to write automated UI tests that actually drive the browser as if the user were using the application themselves. We'll also learn how to put all these tests together into TeamCity to produce a continuous integration build that runs all of our different tests at all of these different levels.
Testing the Model Hi. Welcome back to this second module. In this module we'll be seeing how we can Test the Model of our MVC Application. So we'll be learning how to write Unit Tests for our model classes and also how to write Integration Tests that interact with an actual database. So our model is really the bedrock of our entire application. So it doesn't matter how well tested the other elements of the application are, if our model has got a serious business logic error in it, it's going to cause significant problems throughout the application. As we learned in the introductory module, our Unit Tests are really able to get into the nitty gritty of our model classes and make sure that they've got really test coverage.
Testing Controllers Hi. Welcome back. In the previous module we learned how to write Classical and Mockist Style Unit Tests and then we implemented an Integration Test. In this module we're going to learn how to Test Controllers, Specifically we'll learn how to write tests that confirm controller actions or behaving as expected. This includes things like testing that an action returns the correct view or HTTP status code. We're going to start by trying to create a test manually and then refactor it to be more readable and maintainable. So let's kick off this module by thinking about some of the things we may want to test in our controllers.
Testing View Rendering Hi. Welcome back. In the previous module we looked at some ways we can test our controller actions. In this module we're going to take a closer look at our views. So we're going to see how we can take our Razor Views and actually instantiate them in our Unit Tests and then perform tests against them. So, for example, to check that a model item is being rendered in the correct place or that any view logic is operating as expected.
Automated Functional UI Testing Hi. Welcome back. In the previous module we learned how we can test our Razor Views in isolation from the rest of the system. In this module we're going to see how we can write Automated Functional User Interface Tests. So these tests will actually work through the browser as if a real user was using our application. So in this way we're not writing isolated tests anymore, we're writing tests that can potentially touch all layers of the application, right from the user interface, right down to the database.
Running Tests on TeamCity Continuous Integration Server Hi. Welcome back. So now we've defined the tests at the different levels so we've got our Controller tests, our Unit tests, our Integration tests, and our View Rendering tests, in addition to our Automated Functional UI tests. We can now go and set up a build on a Continuous Integration Server, to build not only the Banking Site, but also all of the tests and then execute these tests in a central place on our Integration Server. This means that anytime anyone checks in any new code, all of the tests will be executed and we'll find out if anything is broken. (Loading)
Course Summary, Complimentary Techniques, and Further Learning Hi. Welcome back to this final module. In this module we're going to get a Summary of some of the things we've learned throughout the course, we're going to look at a few Complimentary Techniques that you may wish to investigate, and we'll finish up with some Further Learning resources. So let's start off this module with a Summary of some of the things we've learned.