# Introducing JfrUnit 1.0.0.Alpha1

DevFeed: [Introducing JfrUnit 1.0.0.Alpha1](<https://devfeed.tech/articles/introducing-jfrunit-1-0-0-alpha1-18835.md>)

Original publisher: [Read original article](<https://www.morling.dev/blog/introducing-jfrunit-1-0-0-alpha1/>)

Published: 2021-08-04T17:10:00Z

Content type: release

Language: en

Sources: [Gunnar Morling](<https://devfeed.tech/sources/gunnar-morling.md>)

Topics: [JDK Flight Recorder](<https://devfeed.tech/topics/jdk-flight-recorder.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Java](<https://devfeed.tech/topics/java.md>), [Quarkus](<https://devfeed.tech/topics/quarkus.md>), [Groovy](<https://devfeed.tech/topics/groovy.md>), [Maven](<https://devfeed.tech/topics/maven.md>)

Tags: [groovy](<https://devfeed.tech/tags/groovy.md>), [java](<https://devfeed.tech/tags/java.md>), [jdk-flight-recorder](<https://devfeed.tech/tags/jdk-flight-recorder.md>), [junit](<https://devfeed.tech/tags/junit.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [maven-central](<https://devfeed.tech/tags/maven-central.md>), [quarkus](<https://devfeed.tech/tags/quarkus.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-testing](<https://devfeed.tech/tags/unit-testing.md>)

## AI overview

The article announces JfrUnit 1.0.0.Alpha1, a JUnit extension for asserting JDK Flight Recorder events in unit tests. It describes uses including validating custom events, detecting potential performance regressions, and white-box testing with JMC Agent, and outlines setup and usage with Maven, Quarkus, Groovy, and Spock examples.

## Source excerpt

Table of Contents Getting Started With JfrUnit Groovier Tests With Spock Outlook Unit testing, for performance It's with great pleasure that I'm announcing the first official release of JfrUnit today! JfrUnit is an extension to JUnit which allows you to assert JDK Flight Recorder events in your unit tests. This capability opens up a number of interesting use cases in the field of testing JVM-based applications: You can use JfrUnit to ensure your application produces the custom JFR events you expect it to emit You can use JfrUnit to identify potential performance regressions of your application by means of tracking JFR events e.g. for garbage collection, memory allocation and network I/O You can use JfrUnit together with JMC Agent for whitebox tests of your application, ensuring specific methods are invoked with the expected parameters and return values