4.38 out of 5
4.38
561 reviews on Udemy

MSTest Unit Testing Tutorial for beginners : C# Unit Testing

Learn how to write effective unit tests using Microsoft MSTest framework to build high quality software applications
Instructor:
Venkat Kud
2,263 students enrolled
English [Auto-generated]
Understand unit testing concepts and their improtance and power when developing software applications
Write effective unit tests using MSTest framework to test software applications
Will be able to answer most of the unit testing related interview questions

What is the course about : This course is all about writing effective unit tests using C# programming language and MSTest framework. Along the way we will learn the concepts related to unit testing. Most organisations these days expect it’s employees to have unit testing skills, as unit testing is becoming more and more important for the quality of the software applications.

If you have reached this course by using any of the following terminology, you are at the right place, and you will become an expert in writing unit tests in just 4 hours.

  • Visual Studio unit testing tutorial
  • MSTest unit testing tutorial
  • Dot Net testing framework
  • C# unit test framework
  • Visual Studio unit testing framework tutorial
  • csharp unit testing tutorial


How long is the course : The course is around 4 hours. All are video lectures. You will be able to download all the slides and code samples used in the course.

What will we be covering : We will start with, what is a unit test and we will write our first unit test, followed by benefits of unit tests. and unit test naming conventions.

We will also cover running, debugging, auto generating unit tests, grouping unit tests in visual studio, unit test traits, filtering, playlists, code coverage in visual studio, unit testing exceptions, unit testing private methods, visual studio ordered test, visual studio generic test, unit testing assertions and running unit tests from command line

The following visual studio unit testing attributes are discussed with examples

  • TestClass attribute
  • TestMethod attribute
  • TestInitialize attribute
  • TestCleanup attribute
  • ClassInitialize attribute
  • ClassCleanup attribute
  • AssemblyInitialize attribute
  • AssemblyCleanup attribute
  • TimeOut attribute
  • Ignore attribute

We also discuss the following concepts related to advanced unit testing with examples

  • What is TestContext
  • Visual Studio data driven unit tests
  • What is test driven development TDD
  • Benefits of TDD

Unit Testing Basics

1
Introduction
2
What is a Unit Test
3
Creating your first unit test
4
Benefits of unit tests
5
Continuous Integration
6
Who should write Unit Tests
7
Naming conventions

Running Unit Tests

1
Running unit tests
2
Unit Test Generation
3
Debugging unit tests

Grouping and Filtering Unit Tests

1
Grouping Unit Tests
2
Traits
3
Filtering Unit Tests
4
Playlists

Code Coverage

1
Code Coverage
2
TestClass and TestMethod attirbutes
3
Testing Exceptions
4
Unit Testing Private Methods
5
Ordered Test
6
Generic Test
7
Running unit tests from the command line

Data Driven Unit Tests

1
TestContext
2
Data-Driven Unit Test
3
Data-Driven Unit Test - XML
4
Data-Driven Unit Test - CSV
5
Using a Configuration File to Define a Data Source

Initialize and Cleanup attributes

1
TestInitialize and TestCleanup
2
ClassInitialize and ClassCleanup
3
AssemblyInitialize and AssemblyCleanup
4
TimeOut and Ignore attributes

Unit Test Assertions

1
Asserts
2
Assert class
3
Assert Object Equality
4
CollectionAssert
5
CollectionAssert.AreEqual Override Equals
6
CollectionAssert.AreEqual IComparer
7
CollectionAssert.AreEqual project to list of strings
8
CollectionAssert.AreEquivalent
9
CollectionAssert - Rest of the methods
10
StringAssert

TDD - Test Driven Development

1
What is TDD
2
Benefits of TDD
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.4
4.4 out of 5
561 Ratings

Detailed Rating

Stars 5
313
Stars 4
183
Stars 3
46
Stars 2
14
Stars 1
6
3aa83f218be3f606beb882e9f3d3779b
30-Day Money-Back Guarantee

Includes

4 hours on-demand video
Full lifetime access
Access on mobile and TV
Certificate of Completion