Registry / testing / powermock-module-testng

powermock-module-testng

JSON →
library2.0.9javamavenunverified

PowerMock module for TestNG that enables mocking of static methods, constructors, and final classes.

<dependency> <groupId>org.powermock</groupId> <artifactId>powermock-module-testng</artifactId> <version>2.0.9</version> </dependency>
INSTALL
IMPORT
SIG · POWERMOCK-MODULE-T
P
powermock-module-testng
testingjavav2.0.9
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PowerMockTestCase
org.powermock.modules.testng.PowerMockTestCase

Extends PowerMockTestCase to enable PowerMock features in TestNG tests.

import org.powermock.modules.testng.PowerMockTestCase; import org.testng.annotations.Test; import static org.powermock.api.mockito.PowerMockito.mockStatic; public class ExampleTest extends PowerMockTestCase { @Test public void testStaticMock() { mockStatic(System.class); // ... test logic } }
Debug
Known issues
breakingPowerMock is not compatible with newer Java versions (>=17) and may cause issues with module system.
fix
Consider using Mockito's inline mock maker or other modern mocking frameworks.
affects: >=2.0.0
Upgrade
Version history
2.0.9latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources