Skip to content

Suppression of log for non-failing test classes#3746

Open
wadoon wants to merge 1 commit intomainfrom
weigl/testlogging
Open

Suppression of log for non-failing test classes#3746
wadoon wants to merge 1 commit intomainfrom
weigl/testlogging

Conversation

@wadoon
Copy link
Member

@wadoon wadoon commented Feb 17, 2026

Related Issue

Closes #3632

Intended Change

This PR suppresses logging messages from non-failing test cases.

It is done in the following way:

  • Using the JUnit Extensions interface that triggers methods before and after test execution.

  • Before test execution: Install a StringListAppender in the root logger, which captures all logging messages in a list of strings. Save the old console appender.

  • After test execution: If an exception was thrown (e.g., AssertionException), print all captured messages to the console. Clean the list in any case afterwards. Re-establish the old console appender.

  • Install these lifecycle methods globally using (a) junit.properties and (b) the ServiceLoader interface. See

Plan

  • Remove failing test (assert fail;) after review. (Testing purpose)
  • Install on modules (requires a new module key.util-test for sharing the test utilities.)
    • Then also remove the hack testImplementation project(":key.core").sourceSets.test.output in key.core.symbex/build.gradle.

Type of pull request

  • Bug fix (non-breaking change which fixes an issue)

Ensuring quality

  • I have tested the feature as follows: hand-tested

@wadoon wadoon self-assigned this Feb 17, 2026
@wadoon wadoon requested a review from Drodt February 17, 2026 21:08
@wadoon wadoon added this to the v3.0.0 milestone Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Less verbosity in test execution

1 participant

Comments