Skip to content

Conversation

@sormuras
Copy link
Member

@sormuras sormuras commented Oct 9, 2025

Please review this PR introducing the org.junit.start module.

Closes #4982

New "Source Launcher" section in "Running Tests" of the User Guide

image

I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

@sormuras sormuras changed the title Introduce org.junit.onramp module Introduce org.junit.start module Oct 17, 2025
@sormuras sormuras marked this pull request as ready for review November 4, 2025 11:29
@mpkorstanje mpkorstanje self-requested a review November 7, 2025 11:03
Java 25 introduced Module Import Declarations with {JEP511} and Compact Source Files
and Instance Methods with {JEP512}. The `org.junit.start` module is JUnit's "On-Ramp"
enabler, allowing to write minimal source code programs. For example, like in a
`HelloTests.java` file reading:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a lot of jargon and detail in this paragraph. It gets in the way of conveying the essence. Consider something like:

Starting with Java 25 it is possible to write minimal source code programs using the org.junit.start module. For example, like in a
HelloTests.java file reading:

Assertions.assertEquals(11, "Hello JUnit".length());
}
```
With all required modular JAR files available in a local `lib/` directory, the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the question of which modules, and how to obtain them out of scope for this PR?

└─ stringLength() ✔
```

Find JUnit's class API documentation here: {JUnit}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After running ./gradlew asciidoctor I'm getting 404s for this URL. Is there another command that should be ran?

/**
* @since 1.11
*/
class SearchPathUtils {
Copy link
Contributor

@mpkorstanje mpkorstanje Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new class will probably trip up Graals native-build-tools (#5134).

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.

Introduce org.junit.start module

4 participants