Registry / testing / system-rules

system-rules

JSON →
library1.19.0javamavenunverified

A collection of JUnit rules for testing code that uses java.lang.System.

testing
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.

org.junit.contrib.java.lang.system.SystemOutRule

Captures System.out output using a JUnit rule for testing.

import org.junit.Rule; import org.junit.Test; import org.junit.contrib.java.lang.system.SystemOutRule; public class MyTest { @Rule public final SystemOutRule systemOutRule = new SystemOutRule().enableLog(); @Test public void test() { System.out.print("hello"); assert systemOutRule.getLog().equals("hello"); } }
Debug
Known footguns
breakingSystem Rules is not compatible with JUnit 5; use System Lambda or other alternatives.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
0 hits · last 30 days

No traffic data recorded yet.

Resources