Do you want to get started with unit testing in Java? Perhaps you already know a little about JUnit, but you've always wanted to learn more about this useful framework? Either way, this course will teach you what you need to know to not only get started with JUnit, but to master all of the features of the JUnit framework. In this course, we'll start out by learning the basics of JUnit and how to create some basic unit tests. Then, we'll go into some of the lesser known advanced features of JUnit that will really help you write elegant tests with less code. After that, I'll show you how to integrate JUnit with your existing Ant or Maven build system and how you can automate the creation of JUnit reports. Finally, we'll wrap things up by going beyond the basic uses of JUnit by learning how to use stubs and mocks to really isolate classes and we'll also learn how to use JUnit for more than just unit testing. By the end of this course, you'll be a JUnit pro and will have a handful of useful tools and techniques you can use to make the most of the JUnit framework. If you are interested in JUnit, you won't want to miss this course.
JUnit Overview Hi, this is John Sonmez from Pluralsight and welcome to this course on Unit Testing in Java using JUnit. I'm really excited to do this course on JUnit because JUnit is a tool that really helped shape the entire industry of software development. A pretty bold statement, but if you trace back the current agile movement and best practices like test driven development, it's pretty hard to not keep running into JUnit as it was one of the first widely used unit testing frameworks and it made unit testing much more accessible to the masses. You may be thinking that JUnit is such a small and simple technology, how could there be an entire course about it. But don't worry, there is plenty to cover as JUnit has grown substantially over the years and JUnit is more than just a framework itself. There is a whole ecosystem of unit testing that has evolved from the JUnit framework. In this course, I'll not only show you the basics of how to use JUnit, I'll also show you the advanced new features of this powerful testing tool and how to integrate it into your build systems and extend its capabilities with other tools and libraries.
JUnit Basics Hi, this is John Sonmez from Pluralsight and in this module we'll be going over the basics of JUnit. This module will cover everything you need to know to get started writing unit tests in JUnit. The core of JUnit is really quite simple and there isn't much to the API, but it is important to understand why and when you should use some of the basic functionality and not just how. In this module, I'll show you how to create some basic unit tests using JUnit. We'll also see how we can reduce the repeated code in our tests by using the setUp and tearDown features of JUnit and we'll handle a few special kinds of test situations like exception handling and timing out.
Advanced JUnit Hi, this is John Sonmez from Pluralsight and in this module we'll be diving deep into the dark jungle of JUnit, as we attempt to uncover its secrets. Okay, so perhaps I made what we will be doing sound a little more glamorous than reality, but we will be learning some JUnit features that you might not be aware of. Our jungle tour will start with a gentle boat ride through the JUnit tests suites and categories. Then, we will hike through the dense forests and learn how to create parameterized tests. We'll learn the long-lost secrets of advanced assertions and exception testing from the natives. And finally, the jungle medicine man will give us the knowledge of JUnit rules and theories, which will ascend our JUnit understanding to a whole new level. So grab your machete, swallow those malaria pills, and let's go.
Integrating JUnit Hi, this is John Sonmez from Pluralsight, and in this module we'll be learning how to integrate JUnit with build systems and other scripts. JUnit by itself is a pretty useful framework for creating unit tests and running them, but the real benefit of JUnit is being able to create automated regression tests. In order to do that, you need to know how to integrate JUnit into existing build systems like Ant and Maven. In this module, I'll show you how you can run JUnit tests without using the built-in Eclipse runner and how to integrate JUnit tests into both Ant and Maven builds. I'll even show you some neat tricks for generating an Ant build file complete with JUnit support directly from Eclipse.
Beyond JUnit Hi, this is John Sonmez from Pluralsight, and in this module we'll be wrapping up this course on JUnit as we go beyond learning JUnit itself and focus on what you can do with JUnit now that you know how to use it. In this module, I'll answer one of the biggest questions developers starting out with JUnit have. How do I test code that has dependencies? I'll also show you some useful tools and frameworks you can use to extend the power of Junit and we'll see how to use JUnit for more than just unit testing. By the end of this module, you should have a good idea of how you can use Junit for real world testing situations and how you can apply the knowledge you learned in the previous modules.