What This Book Is About
- Design and implement robust system components by means of the de facto unit testing standard in Java
- Reduce defect rate and maintenance effort, plus simultaneously increase code quality and development pace
- Follow a step-by-step tutorial imparting the essential techniques based on real-world scenarios and code walkthroughs
Who This Book Is For
What You Will Learn
- Organize your test infrastructure and resources reasonably
- Understand and write well structured tests
- Decompose your requirements into small and independently testable units
- Increase your testing efficiency with on-the-fly generated stand-in components and deal with the particularities of exceptional flow
- Employ runners to adjust to specific test demands
- Use rules to increase testing safety and reduce boilerplate
- Use third party supplements to improve the expressiveness of your verification statements
In Detail
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.
What This Training Is About
We offer training that imparts the knowledge needed to cope with the challanges of testing with JUnit, efficiently in small on-site classes, tailored to your company needs, with a good deal of practical exercises.
Who Our Training Is For
What You Will Learn
- the motivation for JUnit testing beyond safety net and pure regression avoidance
- the definition and different usage scenarios of unit-, integration- and acceptance-tests
- the advantages of the test first approach
- the common four phase structure of well written unit tests
- the meaning of component behavior related testing
- the role of test cases as low level specifications
- the different test naming conventions
- the decomposition of requirements into small and independently testable components
- the importance of test isolation using test doubles as stand-in collaborator components
- the pro and cons of using test double/mocking frameworks
- an introduction of working with Mockito
- the particularities of testing exeptional flow
- the general architecture and particular usage scenarios of test runners
- the mechanics of test helpers based on JUnit Rules
- the different assertion approaches available and the importance custom assertions for readability
- the employment of test coverage measurement
- an introduction of how to run JUnit tests automatically within a CI build
Scope and goals of the course can be adjusted to the specific needs of the participants. Trainings can be held in German or English. Contact us for more details, dates, and arrangements.
- Lightweight Integration Tests for Eclipse ExtensionsRecently I introduced a little helper for Eclipse extension point evaluation. The auxiliary strives to reduce boilerplate code for common ...
- Clean Unit Test Patterns – Presentation SlidesI was given the opportunity to talk at the GDG DevFestKarlsruhe 2014 conference about ‘Clean Unit Test Patterns’. Thanks to ...
- JUnit in a Nutshell: Yet Another JUnit TutorialWhy Another JUnit Tutorial? JUnit seems to be the most popular testing tool for developers within the Java world. So it ...
- JUnit in a Nutshell: Unit Test AssertionThe last chapter of my multi-part tutorial about JUnit essentials covers various unit test assertion techniques. It elaborates on ...
- JUnit in a Nutshell: Test RunnersThe fourth chapter of my multi-part tutorial about JUnit testing essentials explains the purpose of the tool’s exchangable test runners ...