Proof of item:
Picture this: you make a simple change to the code and suddenly realize that you created a dozen unexpected bugs. Sound familiar? You’re not alone!
Good news is, unit testing can make this a thing of the past.
Maybe you’ve heard of automated or unit testing before and you’re keen to learn more.
Or perhaps you’ve tried to learn it and got a bit lost or ended up with fat and fragile tests that got in the way and slowed you down.
Either way, what you need is a course that will teach you all you need to know about this essential skill – from the basics, right through to mastery level.
What is unit testing?
In a nutshell: it’s the practice of writing code to test your code and then run those tests in an automated fashion.
Why learn unit testing?
Why write extra code? Wouldn’t that take extra time to write? Would that slow you down? Why not just run the application and test it like an end user?
Thinking like this is the mistake lots of people make. I used to make it myself. I’ve had to learn the hard way!
I learned pretty fast that if you’re building a complex application or working on a legacy app, manually testing all the various functions is tedious and takes a significant amount of time.
As your application grows, the cost of manual testing grows exponentially. And you’re never 100% sure if you’ve fully tested all the edge cases. You’re never confident that your code really works until you release your software and get a call from your boss or an end user!
Several studies have shown that the later a bug is caught in the software development lifecycle, the more costly it is to the business.
Automated tests help you to catch bugs earlier in the software development lifecycle, right when you’re coding. These tests are repeatable. Write them once and run them over and over.
The benefits of using unit tests are:
- help you to catch and fix bugs earlier, before releasing your app into production
- help you to write better code with less bugs
- help you to produce software with better design – extensible and loosely-coupled
- give you rapid feedback and tell you if your code *really* works
- force you to think of edge cases that you didn’t realize existed
- test your code much faster
- tell if you have broken any functionality as you write new code
- allow you to refactor your code with confidence
- act as documentation about what your code does
- save you both time and money
A valuable skill for senior developers
More and more companies are recognizing the advantages of automated testing, that’s why it’s a must-have for senior coders. If you’re looking to reach the higher levels in your coding career, this course can help.
You don’t need any prior knowledge of automated testing. You only need 3 months of experience programming in C#.
With this course you’ll learn:
- senior coder secrets – best practices to write great unit tests
- tips and tricks to keep your tests clean, trustworthy and maintainable
- the pitfalls to avoid – anti-patterns
- how to refactor legacy, untestable code into loosely-coupled and testable code
- all about dependency injection – the one thing every coder needs to know
- the power of mocks – when and how to use them and when to avoid
- 5.5 hours of HD video
- tutorials and guidance from a senior coder with 15+ years’ experience
- exercises with step-by-step solution
- downloadable source code
- lifetime access
- access online or offline at any time on any device
- certificate of completion to present to your current or prospective employer
Getting Started (45m)
PreviewWhat is Automated Testing (2:40)
PreviewBenefits of Automated Testing (2:37)
PreviewTypes of Tests (4:00)
PreviewTest Pyramid (2:55)
PreviewThe Tooling (2:52)
StartSource Code (0:15)
PreviewWriting Your First Unit Test (10:27)
PreviewTesting All the Execution Paths (5:22)
PreviewRefactoring with Confidence (2:14)
StartUsing NUnit in Visual Studio (3:59)
StartWhat is Test-driven Development (3:19)
StartCourse Structure (1:46)
Fundamentals of Unit Testing (40m)
StartCharacteristics of Good Unit Tests (2:03)
StartWhat to Test and What Not to Test (3:00)
StartNaming and Organizing Tests (2:36)
StartIntroducing Rider (1:52)
StartWriting a Simple Unit Test (3:52)
StartBlack-box Testing (4:43)
StartSet Up and Tear Down (3:36)
StartParameterized Tests (3:25)
StartIgnoring Tests (1:33)
StartWriting Trustworthy Tests (6:11)
StartDevelopers Who Don’t Write Tests (3:51)
Core Unit Testing Techniques (50m)
StartTesting Strings (5:50)
StartTesting Arrays and Collections (6:11)
StartTesting the Return Type of Methods (4:02)
StartTesting Void Methods (4:41)
StartTesting Methods that Throw Exceptions (4:10)
StartTesting Methods that Raise an Event (4:34)
StartTesting Private Methods (9:50)
StartCode Coverage (2:30)
StartTesting in the Real-world (2:32)
StartExercise- FizzBuzz (1:19)
StartSolution- FizzBuzz (6:19)
StartExercise- DemeritPointsCalculator (0:54)
StartSolution- DemeritPointsCalculator (9:43)
StartExercise- Stack (0:49)
StartSolution- Stack (14:55)
Breaking the External Dependencies (1h)
StartLoosely-coupled and Testable Code (3:34)
StartRefactoring Towards a Loosely-coupled Design (9:42)
StartDependency Injection via Method Parameters (5:09)
StartDependency Injection via Properties (2:41)
StartDependency Injection via Constructor (4:22)
StartDependency Injection Frameworks (3:26)
StartMocking Frameworks (1:55)
StartCreating Mock Objects Using Moq (6:47)
StartState-based vs Interaction Testing (1:54)
StartTesting the Interaction between Two Objects (3:40)
StartFake as Little as Possible (3:10)
StartAn Example of a Mock Abuse (4:54)
StartWho Should Write Tests (2:01)
StartExercise-Video Service (1:11)
StartRefactoring VideoService (5:47)
StartTesting VideoService (7:55)
StartExercise- InstallerHelper (1:26)
StartRefactoring InstallerHelper (4:47)
StartTesting InstallerHelper (8:05)
StartExercise- EmployeeController (2:37)
StartRefacatroing EmployeeController (5:24)
StartTesting EmployeeController (4:00)
Project- Testing BookingHelper
StartTest Cases (3:40)
StartExtracting IBookingRepository (7:44)
StartWriting the First Test (4:29)
StartWriting the Second Test (1:27)
StartFixing a Bug (3:43)
StartWriting Additional Tests (4:44)
Project – HouseKeeperHelper (50m)
StartRefactoring for Testability (9:32)
StartFixing a Design Issue (2:59)
StartAn Alternative Solution
StartWriting the First Interaction Test (7:40)
StartKeeping Tests Clean (5:42)
StartTesting that a Method is Not Called (5:37)
StartAnother Interaction Test (7:31)
StartExtracting Helper Methods (8:02)
StartTesting Exceptions (3:34)