Learn Java Unit Test: Mockito & Powermock Complete Tutorial

- 82%

0
Certificate

Paid

Language

Level

Beginner

Last updated on April 16, 2025 1:31 pm

Learn Java Unit Test: Mockito Powermock Complete Tutorial covers the F.I.R.S.T principles, Mockito 3.x usage, Powermock usage, and TDD methodology. Gain a comprehensive understanding of unit testing in Java with detailed guidance on writing unit test code. Explore topics like mocking objects, deep mocking, stubbing statements, spying, argument matchers, method invocations, and more. Additionally, learn about Powermock’s capabilities in mocking local variables, static methods, final classes, private methods, and spying. Discover how JoCoCo enables on-the-fly and offline instrumentation for unit test coverage reports. Ideal for Java developers, JVM language developers, QA developers, and DevOps engineers.

Add your review

What you’ll learn

  • Know the unit test F.I.R.S.T principles
  • How to write the correct unit test in Java
  • Fully understand the Mockito 3.x usage
  • Fully understand the Powmock usage
  • Fully understand the TDD methodology
  • Unit test coverage by JoCoCo

**** Please enable the vedio cc function (captions ) *****

Learn Java Unit Test: Mockito & Powermock Complete Tutorial contains below agenda, this course base on JAVA 16 and latest mockito 3.x version and latest powermock most detials guidance how to write the unit test code.

  1. overview understand mocking

    1.1 F.I.R.S.T Principles introduction

  • Fast

  • Isolated

  • Repeatable

  • Self-validating

  • Timely

    1.2 what is mocking

    1.3 simulate the user login application

    1.4 unit test the user login function with mockito

  2. Mockito details tutorial

    2.1 how to mock objects

    2.2 deep mock

    2.3 mock object stubbling statement

  •       when…thenReturn

  •       doReturn…when

  •       doNothing…when

  •       when…thenThrow

  •       doThrow…When

  •       when…thenAnswer

  •       doAnswer…when

  •       when…thenCallRealMethod

  •       doCallRealMethod…when

    2.4  Stubbing statement – multiple return values

    2.5 Stubbing statement – Cascading code style

    2.6 Spying

    2.7 Mockito argument matcher

    2.8 verify method invocations

    2.9  verify with VerificationMode

    2.10 Mockito verify Interactions

    2.11 Mockito ArgumentCaptor & @Captor

    2.12 @InjectMocks

  3. Mockito Inline  Module

    3.1 Mockito & BDD code style

    3.2 Mockito mock static method

    3.3 Mockito mock final classes & methods

  4. Powermock details tutorial

    4.1 what is powermock

    4.2 why need powermock

    4.3 powermock mock local variables

    4.4 powermock mock  static methods

    4.5 powermock mock final classes & methods

    4.6 powermock mock private methods

    4.7 powermock spying

  5. JoCoCo

    5.1 JoCoCo for unit test coverage report on-the fly instrumentation

    JoCoCo for unit test coverage report offline instrumentation

Who this course is for:

  • Java Developer
  • JVM(Scala,Groovy,Koltin) Language Develop Engineer
  • QA Developer
  • Devops Engineer

User Reviews

0.0 out of 5
0
0
0
0
0
Write a review

There are no reviews yet.

Be the first to review “Learn Java Unit Test: Mockito & Powermock Complete Tutorial”

×

    Your Email (required)

    Report this page
    Learn Java Unit Test: Mockito & Powermock Complete Tutorial
    Learn Java Unit Test: Mockito & Powermock Complete Tutorial
    LiveTalent.org
    Logo
    LiveTalent.org
    Privacy Overview

    This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.