Tagged articles
6 articles
Page 1 of 1
Alibaba Cloud Developer
Alibaba Cloud Developer
Aug 20, 2024 · Backend Development

Why Switch from PowerMock to Mockito‑Only? A Practical Migration Guide

This article explains why upgrading JDK 11 prompts the removal of the unmaintained PowerMock framework, outlines the steps to replace it with Mockito‑Only—including JUnit runner configuration, handling static, private, and final methods, multithreaded mock limitations, and performance gains—while providing code examples and migration tips.

JDK11 migrationJava TestingMocking
0 likes · 15 min read
Why Switch from PowerMock to Mockito‑Only? A Practical Migration Guide
FunTester
FunTester
Jan 20, 2022 · Backend Development

Mastering Static Resource Mocking in Spock with PowerMock

This article provides a step‑by‑step guide on mocking static variables and static methods in the Spock testing framework using PowerMock, covering annotation setup, custom behavior definitions, and handling mixed scenarios where both static and instance mocks are required.

Java TestingMockitoPowerMock
0 likes · 5 min read
Mastering Static Resource Mocking in Spock with PowerMock
DeWu Technology
DeWu Technology
Dec 25, 2020 · Fundamentals

Testing Probabilistic Events with Binomial Confidence Intervals

To verify that a probabilistic interface behaves as configured, the article explains how to compute binomial confidence intervals using the normal approximation for moderate probabilities and large samples, or the exact Clopper‑Pearson method for extreme or small samples, and provides Java examples and practical guidelines.

Clopper-PearsonJava Testingbinomial confidence interval
0 likes · 9 min read
Testing Probabilistic Events with Binomial Confidence Intervals
FunTester
FunTester
Feb 10, 2020 · Backend Development

Migrating to Spock 2.0 M1 with JUnit 5 – Gradle & Maven Setup Guide

This article explains the major changes in Spock 2.0 M1, how to integrate it with JUnit 5 via the JUnit Platform, provides step‑by‑step Gradle and Maven configurations, discusses compatibility issues with Groovy versions, and offers solutions for JUnit 4 Rule migration.

GradleJUnit5Java Testing
0 likes · 6 min read
Migrating to Spock 2.0 M1 with JUnit 5 – Gradle & Maven Setup Guide
FunTester
FunTester
Jan 15, 2020 · Fundamentals

Speed Up Selenium Tests with JUnit 5 Parallel Execution and Advanced Features

This tutorial shows how to accelerate Selenium‑based test suites by using JUnit 5’s parallel execution, custom test ordering, a single‑browser session, configurable driver settings, parameterized tests with CSV sources, and richer assertions via AssertJ, complete with Gradle commands and code examples.

AssertJJUnit 5Java Testing
0 likes · 11 min read
Speed Up Selenium Tests with JUnit 5 Parallel Execution and Advanced Features
Youzan Coder
Youzan Coder
Apr 8, 2018 · Fundamentals

Testing Asynchronous Systems: Strategies and Best Practices

Testing asynchronous systems requires specialized strategies—monitoring callbacks with synchronization primitives and reliable polling with timeouts, delays, and frequencies—to handle nondeterministic execution, avoid flaky assertions, and improve testability by decoupling business logic from periodic scheduling, as demonstrated by real‑world polling implementations for Elasticsearch and MySQL/Redis jobs.

Java TestingPollingasynchronous testing
0 likes · 6 min read
Testing Asynchronous Systems: Strategies and Best Practices