Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Testing with JUnit
  • Table Of Contents Toc
  • Feedback & Rating feedback
Testing with JUnit

Testing with JUnit

By : Leonard Przybylski, Appel
4.3 (7)
close
close
Testing with JUnit

Testing with JUnit

4.3 (7)
By: Leonard Przybylski, Appel

Overview of this book

JUnit has matured to become the most important tool when it comes to automated developer tests in Java. Supported by all IDEs and build systems, it empowers programmers to deliver software features reliably and efficiently. However, writing good unit tests is a skill that needs to be learned; otherwise it's all too easy to end up in gridlocked development due to messed up production and testing code. Acquiring the best practices for unit testing will help you to prevent such problems and lead your projects to success with respect to quality and costs. This book explains JUnit concepts and best practices applied to the test first approach, a foundation for high quality Java components delivered in time and budget. From the beginning you'll be guided continuously through a practically relevant example and pick up background knowledge and development techniques step by step. Starting with the basics of tests organization you'll soon comprehend the necessity of well structured tests and delve into the relationship of requirement decomposition and the many-faceted world of test double usage. In conjunction with third-party tools you'll be trained in writing your tests efficiently, adapt your test case environment to particular demands and increase the expressiveness of your verification statements. Finally, you'll experience continuous integration as the perfect complement to support short feedback cycles and quality related reports for your whole team. The tutorial gives a profound entry point in the essentials of unit testing with JUnit and prepares you for test-related daily work challenges.
Table of Contents (11 chapters)
close
close
10
Index

Understanding the architecture


Although we've already encountered quite a few of JUnit's essential testing capabilities, there is more than meets the eye. Beyond standard test execution, it is possible to meet other requirements by means of pluggable test processors. The first section of this chapter will explain the most relevant concepts and deepen our knowledge by developing a basic extension.

What are runners good for?

 

"If you get stuck, draw with a different pen. Change your tools; it may free your thinking."

 
 --Paul Arden

In the previous chapters, we heard a good deal about unit testing with respect to structure and isolation. These concepts are well supported by the default behavior of JUnit. However, sometimes, there are scenarios that demand additional or different capabilities. Imagine, for example, a set of test cases comprising the specification of a subsystem that should be grouped together for aggregated test runs. You can even consider the need for a special test execution strategy...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Testing with JUnit
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon