Course
Skills Expanded
Automated Testing in ASP.NET With SpecsFor and SpecsFor.Mvc
Learn how to effectively create automated unit, integration, and UI tests for your ASP.NET MVC applications using SpecsFor and SpecsFor.Mvc.
What you'll learn
SpecsFor is a unit testing framework based on NUnit. It is designed to streamline common testing workflows, to eliminate pain, and to make you more productive. SpecsFor.Mvc is an end-to-end testing framework for ASP.NET MVC applications. It allows you to create tests with a strongly-typed, unit-test-like API that powers a web browser. This course will show you how to use both of these tools to effectively test your ASP.NET MVC applications.
Table of contents
Introduction
10mins
ASP.NET MVC Unit Testing Basics
32mins
- Introduction and Test Runners 3m
- Creating a Test Project 3m
- Demo: Creating Our Spec Project 4m
- Unit Testing ASP.NET MVC Applications 2m
- Demo: Testing a Simple Action 2m
- Demo: Submitting Data to an Action and Testing Redirects 3m
- Testing Interactions 4m
- Demo: Setting Up Behaviors 6m
- Demo: Verifying Interactions 5m
- Conclusion 2m
Unit Testing With SpecsFor
38mins
- Introduction to SpecsFor 5m
- Structure of a Spec With SpecsFor 3m
- Demo: Adding SpecsFor to a Project 3m
- Demo: Our First Spec, Revisited 2m
- Mocking Dependencies With SpecsFor 2m
- Demo: Testing Interactions With SpecsFor 3m
- Simplifying Complex Tests With SpecsFor<Web> Helpers 1m
- Demo: Testing Routes and Views With SpecsFor<Web> Helpers 3m
- Testing HtmlHelper Extensions 2m
- Demo: Testing a Custom HtmlHelper Extension 6m
- Testing Action Filters 1m
- Demo: Testing an Action Filter 5m
- Conclusion 3m
Advanced SpecsFor Techniques
60mins
- The SpecsFor Lifecycle 6m
- Demo: Solution Overview 2m
- Demo: Configuring the Container 4m
- Demo: Adding a Registry to the Container 5m
- Demo: Customizing how the SUT Is Created 8m
- Demo: Working With IDisposable 1m
- Sharing Spec Context 1m
- Demo: Creating a Base Spec Class 6m
- Demo: Creating a Spec Context Class 3m
- SpecsFor Convention System Overview 4m
- Demo: Convention System Basics 6m
- Demo: Configuring the Container With a Convention 5m
- Demo: Nesting Conventions 7m
- Conclusion 2m
Integration Testing With SpecsFor
35mins
- Introduction 5m
- Demo: Solution Overview and Setup 6m
- Demo: Enabling Entity Framework Code-First Migrations 2m
- Creating Integration Tests With SpecsFor and Entity Framework 4m
- Demo: Configuring an Integration Spec Project 2m
- Demo: Creating a SQL Server Local DB Database Programmatically 3m
- Demo: Isolating Specs With a Transaction Scope 2m
- Demo: Initializing Entity Framework for Testing 2m
- Writing Integration Specs 1m
- Demo: Writing Integration Specs, Part 1 3m
- Demo: Writing Integration Specs, Part 2 3m
- Conclusion 3m
Automated UI Testing Basics
38mins
- Introduction to End-To-End Testing 5m
- Common Tools for Web App End-To-End Testing 2m
- Selenium WebDriver Crash Course 4m
- Demo: Creating an End-To-End Spec Project 5m
- Demo: Using Selenium WebDriver 5m
- Overview of Testing an ASP.NET Application 1m
- Demo: Hosting Our Application for Testing 4m
- Demo: Hooking in to SpecsFor 4m
- Demo: Interacting With Tasks Using Selenium 6m
- Conclusion 3m
Basic UI Testing With SpecsFor.MVC
47mins
- Introduction to SpecsFor.Mvc 7m
- Demo: Installing SpecsFor.Mvc 6m
- Demo: Using an Isolated Database, Part 1 6m
- Demo: Using an Isolated Database, Part 2 3m
- Demo: Add Task Specs, the SpecsFor.Mvc Way 8m
- Demo: Checking Validation 3m
- Verifying Displayed Data 2m
- Demo: Verifying Displayed Data 5m
- Demo: Building Conventions for Verifying Displayed Data 5m
- Conclusion 3m
Advanced UI Testing Techniques With SpecsFor.MVC
31mins
- Introduction 2m
- Handling Security 1m
- Demo: Handling Security 5m
- Dealing With Emails 1m
- Demo: Testing Emails 4m
- End-To-End Specs for WebAPI 1m
- Demo: End-To-End Specs for WebAPI 5m
- Testing JavaScript 4m
- Demo: 'JavaScripting' Our Sample Application 2m
- Demo: End-To-End Specs for JavaScript 4m
- Conclusion 2m
Conclusion
5mins