Dive deep into unit testing in .NET Core with this guide, featuring NUnit and xUnit. Starting with a solid foundation, you'll understand the principles of manual and automated testing, the advantages of automation, and the necessary tools. The initial modules will set you up with a strong base in different types of tests and the testing pyramid, preparing you for hands-on projects.
Give your career the gift of Coursera Plus with $160 off, billed annually. Save today.
Complete Guide to Unit Testing in .NET Core (NUnit & xUnit)
Instructor: Packt - Course Instructors
Included with
Recommended experience
What you'll learn
Execute unit tests and debug them effectively in .NET Core environments, using MSTest, NUnit, and xUnit.
Differentiate between various testing scenarios, evaluating the appropriate use of mocking and dependency injection with the Moq framework.
Understand the principles and benefits of automated unit testing, and describe how NUnit and xUnit frameworks facilitate these processes.
Create unit tests for an N-tier real-world web application project using xUnit.
Skills you'll gain
Details to know
Add to your LinkedIn profile
September 2024
4 assignments
See how employees at top companies are mastering in-demand skills
Earn a career certificate
Add this credential to your LinkedIn profile, resume, or CV
Share it on social media and in your performance review
There are 7 modules in this course
In this module, we will introduce you to the course, covering the basics of manual and automated testing. You will learn about the tools needed and gain an understanding of different types of tests, including the testing pyramid and the logical phase of an automated test.
What's included
7 videos1 reading
In this module, we will guide you through the initial steps of setting up your first unit test. You'll learn about the nullable feature in .NET 6, create a project, and explore writing and troubleshooting unit tests using MSTest.
What's included
5 videos
In this module, we will delve into unit testing with NUnit. You will create NUnit projects, write tests, and use debugging and assertion techniques. Additionally, you'll complete assignments to solidify your understanding and handle various assertion scenarios.
What's included
13 videos1 assignment
In this module, we will explore advanced concepts in NUnit testing. You will learn to assert collections, handle exceptions, and set up inheritance. The module includes assignments on grading calculators and the Fibonacci series to apply these advanced techniques.
What's included
14 videos
In this module, we will focus on using MOQ for unit testing. You will learn to set up and configure mock objects, perform integration tests, and handle various scenarios with loggers and return values. The module also covers advanced MOQ features like properties and callbacks.
What's included
17 videos1 assignment
In this module, we will cover unit testing with xUnit. You will create xUnit projects, compare it with other frameworks, and work on assignments related to grading calculators and the Fibonacci series. The module also includes topics on MOQ integration with xUnit.
What's included
11 videos
In this module, we will apply NUnit testing to real-world examples. You will set up main projects, data access unit test projects, and Bongo core projects. The module covers in-memory databases, core unit tests, and web application testing, ensuring you can handle complex testing scenarios effectively.
What's included
19 videos2 assignments
Instructor
Offered by
Recommended if you're interested in Software Development
Why people choose Coursera for their career
New to Software Development? Start here.
Open new doors with Coursera Plus
Unlimited access to 7,000+ world-class courses, hands-on projects, and job-ready certificate programs - all included in your subscription
Advance your career with an online degree
Earn a degree from world-class universities - 100% online
Join over 3,400 global companies that choose Coursera for Business
Upskill your employees to excel in the digital economy
Frequently asked questions
Yes, you can preview the first video and view the syllabus before you enroll. You must purchase the course to access content not included in the preview.
If you decide to enroll in the course before the session start date, you will have access to all of the lecture videos and readings for the course. You’ll be able to submit assignments once the session starts.
Once you enroll and your session begins, you will have access to all videos and other resources, including reading items and the course discussion forum. You’ll be able to view and submit practice assessments, and complete required graded assignments to earn a grade and a Course Certificate.