Skip to content

Conversation

@1sahilsanjeev
Copy link

Fixes #52

Modify the SingleTestRunner to set the current thread's context ClassLoader to the test class's ClassLoader immediately before creating/running the JUnit Request, and restore the original context ClassLoader afterwards. This is a minimal and safe change focused on the place tests are launched; it increases the chance that dynamically loaded classes (like Beanutils usage) are instrumented by coverage tools that consult the thread context ClassLoader. Keep changes limited to try/finally block to guarantee restoration and preserve existing behavior (including System.exit flows).

AI Analysis

Issue description is sparse, but 'Coverage not working for Beanutils' suggests classes loaded dynamically (BeanUtils uses reflection) may be loaded with a different classloader than the coverage agent expects. A minimal, targeted change is to ensure the test runner uses the test class's classloader as the thread context classloader so coverage instrumentation can see/attach to those loads.

Changes Made

  • modify: framework/lib/formatter/src/edu/washington/cs/mut/testrunner/SingleTestRunner.java

AI Model Used

gpt-5-mini

Confidence Score

75%


This PR was automatically generated by Kodin AI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Coverage not working for Beanutils

1 participant