• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hazendaz / jmockit1 / 548
72%
master: 72%

Build:
Build:
LAST BUILD BRANCH: renovate/maven-3.x
DEFAULT BRANCH: master
Ran 29 Nov 2025 11:26PM UTC
Jobs 1
Files 361
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Nov 2025 11:21PM UTC coverage: 72.124% (-0.08%) from 72.2%
548

Pull #424

github

hazendaz
[junit5] Add new annotation 'ExpectedException'

This annotation enables JUnit 5 tests to specify expected JMockit exceptions (such as MissingInvocation or UnexpectedInvocation or any other) directly on the test method, mirroring the JUnit 4 @test(expected = ...) pattern or ExpectedException rule usage. It simplifies migration of JMockit-based tests from JUnit 4 to JUnit 5, ensuring consistent exception verification for mocking scenarios.

For standard exception assertions unrelated to JMockit, users should continue to use JUnit 5’s assertThrows.

In beforeTestExecution, setup issues will trigger a TestAbortedException when expected match without failing test or attempting to run internals.

handle test execution exception and after test execution will check if expected exception and suppress the exception on match.

Expected exception message can be passed following junit 4 style of contains, if exact match is needed you can disable the messageContains flag
Pull Request #424: Introduction of 'ExpectedException' annotation

5687 of 8390 branches covered (67.78%)

Branch coverage included in aggregate %.

22 of 30 new or added lines in 1 file covered. (73.33%)

14 existing lines in 3 files now uncovered.

11938 of 16047 relevant lines covered (74.39%)

0.74 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
8
59.75
1.91% main/src/main/java/mockit/integration/junit5/JMockitExtension.java

Uncovered Existing Lines

Lines Coverage ∆ File
2
82.57
-3.67% main/src/main/java/mockit/internal/util/StackTrace.java
5
82.05
-6.67% main/src/main/java/mockit/integration/TestRunnerDecorator.java
7
79.61
-6.8% main/src/main/java/mockit/integration/junit4/JUnit4TestRunnerDecorator.java
Jobs
ID Job ID Ran Files Coverage
1 548.1 29 Nov 2025 11:26PM UTC 361
72.12
GitHub Action Run
Source Files on build 548
  • Tree
  • List 361
  • Changed 6
  • Source Changed 1
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #548
  • Pull Request #424
  • PR Base - master (#546)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc