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
4.6 (106 ratings)
Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
477 students enrolled Bestselling in C#
Instructed by Venkat Kud IT & Software / Other
$19
$45
58% off
Take This Course
  • Lectures 42
  • Length 4 hours
  • Skill Level All Levels
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 1/2016 English

Course Description

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

What are the requirements?

  • Understand Dot Net Basics
  • Visual Studio

What am I going to get from this course?

  • 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 target audience?

  • Students who are learning Microsoft Dot Net
  • All dot net developers who want to learn unit testing

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Unit Testing Basics
Introduction
Preview
02:35
What is a Unit Test
Preview
03:51
Creating your first unit test
Preview
07:15
Benefits of unit tests
08:25
Continuous Integration
01:21
Who should write Unit Tests
00:58
Naming conventions
06:16
Section 2: Running Unit Tests
Running unit tests
04:07
Unit Test Generation
09:01
Debugging unit tests
02:43
Section 3: Grouping and Filtering Unit Tests
Grouping Unit Tests
05:38
Traits
06:39
Filtering Unit Tests
13:05
Playlists
05:20
Section 4: Code Coverage
Code Coverage
09:09
TestClass and TestMethod attirbutes
02:24
Testing Exceptions
06:21
Unit Testing Private Methods
07:57
Ordered Test
04:55
Generic Test
06:38
Running unit tests from the command line
12:01
Section 5: Data Driven Unit Tests
TestContext
07:51
Data-Driven Unit Test
13:27
Data-Driven Unit Test - XML
05:20
Data-Driven Unit Test - CSV
03:08
Using a Configuration File to Define a Data Source
08:25
Section 6: Initialize and Cleanup attributes
TestInitialize and TestCleanup
07:26
ClassInitialize and ClassCleanup
04:46
AssemblyInitialize and AssemblyCleanup
04:24
TimeOut and Ignore attributes
04:02
Section 7: Unit Test Assertions
Asserts
01:55
Assert class
07:10
Assert Object Equality
05:48
CollectionAssert
03:57
CollectionAssert.AreEqual Override Equals
02:41
CollectionAssert.AreEqual IComparer
03:39
CollectionAssert.AreEqual project to list of strings
01:33
CollectionAssert.AreEquivalent
04:09
CollectionAssert - Rest of the methods
04:25
StringAssert
03:07
Section 8: TDD - Test Driven Development
What is TDD
06:06
Benefits of TDD
01:10

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Venkat Kud, Technical Architect

Over 15 years of experience in web development, with Microsoft .NET technologies like ASP .NET, C#, SQL Server, AJAX, WCF, JQuery, SSIS, SSAS and SSRS. Currently working as a Technical Architect. Love to share knowledge as I believe in "TO TEACH IS TO LEARN".

Got the opportunity to work on world's largest e-commerce and banking applications. Has an excellent track record as one of the best IT faculty in imparting technical knowledge related to Microsoft Dot Net technologies. There are over 150,000 subscribers on my Youtube channel (kudvenkt) from over 100 countries who are benefiting from these videos.

Accomplishments:
Bachelor of Computer Applications - University Topper.
Authored over 1500 articles and 1000 videos
Over 150,000 subscribers from over 100 countries on my Youtube channel

My accomplishments illustrates itself in my writing, speaking and teaching skills.

Ready to start learning?
Take This Course