|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/unit-testing/
课程评论:没有评论
课程名称:使用 NUnit 和 C# 学习单元测试 课程概述:本课程旨在深入教授构建可维护和可靠软件所需的概念和工具。课程内容简明扼要,不冗长,旨在尊重您的时间,同时确保覆盖所有重要的概念。您将建立扎实的单元测试基础,学习如何使用 C# 编程语言和 NUnit 测试框架编写有效的单元测试。 课程内容主要面向初学者,提供扎实的理论基础并辅以大量实践材料。课程从单元测试基础开始,介绍单元测试的概念、现有的单元测试框架以及如何运行和调试单元测试。随后,您将学习 NUnit 框架,包括安装框架、设置测试运行器、基本断言以及安排-执行-断言三要素。 课程还将涵盖 NUnit 的其他主要功能,例如从控制台运行测试、单元测试的设置与拆解、参数化测试、测试分组与忽略测试等。学习单元测试时,您将涉及到模拟(mocking),了解“测试双(test double)”的概念及其不同类型,如假对象(fake)、虚对象(dummy)、存根(stub)、模拟(mock)等。 在课程末尾,您将接触到两个主要的单元测试方法论:经典学校(Classic School)和伦敦学校(London School),并学习测试驱动开发(TDD)的基础,理解其红-绿-重构(Red-Green-Refactor)原则。同时,您将学习编写单元测试的最佳实践,以及现代单元测试的概念“务实单元测试(pragmatic unit testing)”。 课程时长:约 7.5 小时,包括视频讲座,并提供课程中使用的所有幻灯片和代码示例下载。 关键词:Visual Studio 单元测试教程、NUnit 单元测试教程、.NET 测试框架、C# 单元测试框架、TDD、NSubstitute。
Learn deeply the concepts and tools that you will need to build maintainable and reliable software.Teaching ApproachNo fluff, no ranting, no beating the air. I respect your time. The course material is succinct, yet comprehensive. All important concepts are covered. Particularly important topics are covered in-depth.Take this course, and you will be satisfied. Build a solid foundation in Unit Testing with this course This course is all about writing effective unit tests using C# programming language and NUnit as a unit testing framework. Along the way, we will learn the concepts related to unit testing. Today unit testing is an absolutely required skill from any professional developer. Companies expect from developers to know how to write unit tests including all the most important topics such as mocking and test driven development (TDD in short). This course does not cover all the features of NUnit. This course is way more interesting. Learning unit testing puts a powerful and very useful tool at your fingertips. Being familiar with unit testing you can write reliable and maintainable applications. It is very hard to lead a project which is not covered by unit tests. Content and Overview This course is primarily aimed at beginner developers. It provides solid theoretical base reinforced by tons of practical material. We start with basics of unit testing. What is a unit test? What unit testing frameworks exist? How to run and debug unit tests. After getting acquainted with the basics, we will get to the NUnit framework. Here you'll learn how to install the framework, set the runner. Then you'll learn the basics of assertions and arrange-act-assert triplet. Other key features of NUnit are also covered: Running tests from the console Setup and teardown unit tests Parameterized tests Grouping and ignoring Practicing writing of unit tests, it's impossible to avoid applying mocks. I like the word "test double" more, in general. By the way, you'll learn what the difference between the following notion is: Test double Fake Dummy Stub Mock You'll learn how to write test doubles manually. You will also see a simple example of how to use a mocking framework for using mocks. I'll use NSubstitute mocking framework for demonstration. At the end of this section, you'll get acquainted with two key approaches to unit testing, Classic or Detroit School and London School of unit testing. You'll separately learn the basic of test-driven development. It is hard to imagine a modern professional developer who doesn't know about TDD, so you'll learn what it is and what it is about. You'll see the Red-Green-Refactor triplet in action. I could not complete the course avoiding the best practices of writing unit tests. You'll learn the basic concepts of the modern approach to unit testing called "pragmatic unit testing". You'll see what problems static classes and singletons bring regarding the unit testing. They make code harder to unit test. After that, you'll learn the problem of extracting interfaces just for the sake of introducing shims for injecting dependencies. You'll know should you write unit tests for the trivial code. You'll learn a lot more in the course. So, in short, the course covers the following topics: Basic notions of Unit Testing NUnit and its features Test Doubles including fakes, dummies, stubs, spies and mocks How to write manual test doubles and how to use a mocking framework (NSubstitute)TDD, red-green-refactor triplet A great number of best practices of writing unit tests Introduction to Dependency InjectionIn the end, we will recap what you have learned, and you will try to understand where you have to go further with the intention to master your skills. How long is this course: The course is around 7.5 hours. All are video lectures. You will be able to download all the slides and code samples used in the course. ------------------------------Keywords related to the course:Visual Studio unit testing tutorialNUnit unit testing tutorialDot Net testing frameworkC# unit test frameworkVisual Studio unit testing framework tutorialcsharp unit testing tutorial TDD in C#NSubstituteTDDTest Driven Developmentunit testing C#