Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Software Testing with JUnit 5

You're reading from   Mastering Software Testing with JUnit 5 Comprehensive guide to develop high quality Java applications

Arrow left icon
Product type Paperback
Published in Oct 2017
Publisher Packt
ISBN-13 9781787285736
Length 350 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Boni Garcia Boni Garcia
Author Profile Icon Boni Garcia
Boni Garcia
Arrow right icon
View More author details
Toc

Summary

This chapter contains a comprehensive summary of the advance capabilities to write rich Jupiter tests driven by examples. First, we have learned that parameters can be injected in constructor and methods in test classes. JUnit 5 provides three parameter resolvers out of the box, namely resolver for parameters of the type TestInfo (to retrieve information about the current test), resolver for parameters of the type RepetitionInfo (to retrieve information about the current repetition), and resolver for parameters of the type TestReporter (to publish additional data about the current test run).

Another new feature implemented in Jupiter is the concept of dynamic tests. So far in JUnit 3 and 4, tests are defined at compile time (that is static tests). Jupiter introduces the annotation @TestFactory that allows to generate test at runtime. Another new concept...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image