role-iq-logo
Rock [Azure]
See all Azure roles
Description
Course info
Level
Intermediate
Updated
Nov 12, 2018
Duration
1h 24m
Description

Your test suite should be easy to maintain and your test names should read like business rules. In this course, Microsoft Azure Developer: Performing Unit Testing & Integration Testing, you will learn how to create a flexible suite of unit and integration tests. First, you will learn what it takes to write good code and good tests. Next, you will discover how to cover your riskiest code with integration tests. Finally, you will explore how to run your tests in Azure DevOps on check-in and overnight. When you’re finished with this course, you will have the skills and knowledge of testing in Azure needed to improve your testing suite.

About the author
About the author

Rusty Divine is technical lead, presenter, and blogger who lives in Nebraska and works with a happy team of agile developers. Rusty specializes in .Net web applications for businesses and enjoys working with customers and stakeholders, coaching developers, and grilling gourmet burgers.

More from the author
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
(Music) Hi everyone. My name is Rusty Divine, and welcome to my course, Microsoft Azure Developer: Performing Unit Testing and Integration Testing. I am a software consultant and author of several courses here on Pluralsight. If you have been interested in improving your test coverage or making your tests easier to maintain, then this course is for you. In this course, you're going to learn how to create a suite of tests that are easy to maintain and demonstrate the business rules in your production code. You will learn how to create unit tests that validate scenarios instead of focusing on individual methods to help you find more bugs before code is released. I'll show you how to create integration tests that access external dependencies, and how to easily segregate them from unit tests so that they only run when you want them to, and you will get to see how to create a continuous integration pipeline in Azure DevOps to build a solution and execute unit tests on every check-in, and a separate pipeline that executes your integration tests overnight. By the end of this course, will you be ready to improve the testability of your production code and create more meaningful and maintainable tests that will read like business rules for your solution. Before beginning this course, you should be familiar with unit testing, dependency injection, and using a mocking framework. This course uses a solution with ASP. NET Web API projects in an N-tier architecture for example code that you can also download from the exercise files associated with this course. I hope you'll join me on this journey to learn more about testing with the Microsoft Azure Developer: Performing Unit Testing and Integration Testing course, here at Pluralsight.

Introducing Terms and Concepts
Thank you for starting this Pluralsight course for Microsoft Azure Developer: Performing Unit Testing and Integration Testing. This module focuses on introducing the terms and concepts that will be used throughout the remainder of this course. In this module, you will be introduced to the terms and concepts for unit and integration testing, and how they will be used in this course. You will learn how much of each type of testing your project needs and be introduced to core concepts for writing testable code. You likely already know that some code is just untestable, and I'll show you some reasons why and you'll learn what techniques to use to make sure your code is testable.

Creating and Maintaining Unit Tests
In the previous module, you learned about the theory behind testing and SOLID code, including the definitions of terms that this module will use. Now it's time to focus on unit testing in this module on Creating and Maintaining Unit Tests where you'll be learning how to create a flexible and maintainable suite of automated tests to exercise your code. This module is all about unit testing. Before we write some tests, I'm going to show you some good guidelines to follow for creating a maintainable suite of unit tests. You don't want to spend most of your day fixing unit tests that broke because you refactored some code, and I'll show you how to avoid that scenario. The remainder of this module will be a series of demonstrations for writing unit tests for various scenarios and types of tests. I'll show you how to set up your tests and demonstrate how to fix bugs in an example solution that I'll be using for the duration of this course.

Adding Integration Tests
In the last module, I fixed two known bugs by writing unit tests. There are still two bugs to fix in this module, and I'll show you how to fix those by writing integration tests. This module will build on what you have learned in previous modules. I'll show you how to set up a new integration test project and write some tests that cross project boundaries and use real dependencies. Integration tests are typically slow and fickle, so you don't really want to run them all the time. Luckily, I will show you how to filter out the integration tests in Visual Studio so that you only run the unit tests when you run all. I'll fix the remaining two known bugs in this module by writing integration tests that show where they are failing, and then I'll fix the issues and reiterate until the tests pass.

Automating Test Runs with Azure DevOps
I've fixed the bugs in this solution, and now I'll introduce you to Automating the Test Runs in Azure DevOps, Microsoft's set of cloud services for managing your work. In this module, you will learn enough about Azure DevOps to get started exploring it on your own. First, I'll give you a brief overview of what services Azure DevOps provides. Then, I'll demonstrate how to configure the Azure Pipelines, which provide build and release tools. You'll also learn how to troubleshoot tests that fail and set up email notifications for yourself or your team.