Key Learning Areas
- Learn the principle and best practices of Test-Driven Development
- Explore the parts of unit testing and E2E testing
- Practice how to organize unit tests
- Understand what needs to be tested for different parts of the application
- Enable testing in isolation with mocks, stubs, and fakes
- Integrate testing into local development tools and CICD pipelines (Azure DevOps or GitHub)
- What’s New in .NET 7
- What is Test-Driven Development?
- Benefits of TDD
- Challenges of TDD
Principles of TDD (inspired by “Uncle” Bob Martin)
- Three Laws of TDD
- Clean Tests
- One Assert Per Test
- Five Rules: FIRST
- Red, Green, Refactor Technique
Kinds of Testing
- Unit Tests
- Integration Tests
- E2E Testing
- Automated vs. Manual Testing
- Testing & DevOps
- Test Suites
- Mocks, Fakes, Stubs
- Arrange, Act, Assert
- Test Frameworks
- Test Runners
- Code Coverage
Overview of .NET Core and Testing
- Testing Frameworks
- Test Runners
- Visual Studio
- Visual Studio Code
- Testing Libraries
- Mocking with Moq
- Fluent Assertions
- BUnit (for classes using Blazor)
- What is xUnit?
- Testing Framework
- Test Parallelism
- Shared Test Context
- Facts vs. Theory
- Integration with Visual Studio
- Debugging Unit Tests in Visual Studio
- Debugging Unit Tests in Visual Studio Code
ASP.NET MVC Test-Driven Development (Focus is on testing REST APIs)
- What Should be Tested on an MVC application?
- Integrate Test Projects into a Solution
- Testing Controllers
- Testing APIs
- Integration Testing of APIs
ASP.NET Blazor Test-Driven Development
- What Should be Tested on a Razor Component?
- What is bUnit?
- Using bUnit with xUnit
- Setup and define components under tests in C# or Razor syntax
- Verify outcome using semantic HTML comparer
- Interact with and inspect components
- Trigger event handlers
- Provide cascading values
- Inject services
- Mock IJsRuntime
- Perform snapshot testing
Mocking Databases (*Choose 1)
- Entity Framework
- What is End-To-End Testing?
- Selenium WebDriver
- What is Behavior-Driven Development?
- Coding Unit Tests around Behavior vs Functions
- Test Suites
- Mocks and Spies
- Finding Elements in the DOM Tree
- Page Objects
- Organize Code for Efficient Testing
- Mocking the DOM
- Testing DOM Manipulation Code
- Testing AJAX Code
- Running Tests
- Debugging Tests
- What is Code Coverage?
- What can be understood from Code Coverage?
- What are the limitations of Code Coverage?
- Generate Code Coverage reports for ASP.NET C# code
- Integrate code coverage into CICD systems (Azure DevOps or GitHub Actions)
Developers and Project Managers interested in implementing TDD to improve the quality of their code, and greatly increasing the efficiency and success rate of their projects. Implemented correctly, TDD is an important part of the overall software development process.
All students must have experience with the following:
- C# and ASP.NET technologies