Have a personal or library account? Click to login
MASTERING UNIT TESTING USING MOCKITO AND JUNIT Cover

MASTERING UNIT TESTING USING MOCKITO AND JUNIT

An advanced guide to mastering unit testing using Mockito and JUnit

Paid access
|Sep 2025
Product purchase options

Key Features

    Book Description

    A practical and easy-to-follow, yet comprehensive, guide to learning advanced JUnit testing. Each topic is explained and placed in context, and for the more inquisitive, there are more details of the concepts used. This book is for you if you are a developer with some experience in Java application development as well as a basic knowledge of JUnit testing. But for those whose skill set is void of any prior experience with JUnit testing, the book also covers basic fundamentals to get you acquainted with the concepts before putting them into practise.

    What you will learn

    • Write advanced JUnit test cases using advanced JUnit 4 features
    • Automate JUnit test cases using Gradle, Maven, and Ant scripting
    • Practice continuous integration with Jenkins and Ant, Maven, and Gradle scripting
    • Monitor code quality with the SonarQube dashboard
    • Analyze static code using PMD, Checkstyle, and FindBugs
    • Master code coverage with Clover, Cobertura, EclEmma, and JaCoCo
    • Design for testability and refactor legacy code
    • Practice testdriven development with Mockito

    Who this book is for

    Table of Contents

    1. JUnit 4 ?A Total Recall
    2. Automating JUnit tests
    3. Test Doubles
    4. Progressive Mockito
    5. Code Coverage
    6. Revealing Code Quality
    7. Mockito in Web tier
    8. Playing with the Database layer
    9. Solving Test Puzzles
    10. JUnit Best practices
    PDF ISBN: 978-1-78398-251-6
    Publisher: Packt Publishing Limited
    Copyright owner: © 2014 Packt Publishing Limited
    Publication date: 2025
    Language: English
    Pages: 314