Skip to content

Configuration Parameters Overview #4330

Description

@scordio

The user guide mentions several configuration parameters for the Jupiter Test Engine. However, they are a bit scattered throughout the chapters.

What do you think about adding an overview to the appendix, in the style of the Spring Boot Common Application Properties?

In addition to the user guide benefit, I would like to ask JetBrains if they are open to support code completion in junit-platform.properties files. Having such an overview in the docs might help with that request.

Related Issues

Deliverables

Activity

  1. added theissue type on Feb 21, 2025
  2. YongGoose commented on Feb 22, 2025

    @YongGoose
    Contributor

    IMHO, It's very good idea 👍

  3. marcphilipp commented on Feb 25, 2025

    @marcphilipp
    Member

    I second that!

    Ideally, we should generate a machine-readable format from our code that can be used to generate the User Guide appendix and included in the JAR so IDEs don't have to hard-code the allowed keys.

    @scordio Do you know how this is implemented in IntelliJ IDEA for Spring?

  4. sbrannen commented on Feb 25, 2025

    @sbrannen
    Member

    FYI: this is a duplicate of

    So, we should only keep one of the issues.

    Normally we'd close the newer (duplicate) one, but we could also keep this issue since it has a bit more information.

  5. sbrannen commented on Feb 25, 2025

    @sbrannen
    Member

    Ideally, we should generate a machine-readable format from our code that can be used to generate the User Guide appendix and included in the JAR so IDEs don't have to hard-code the allowed keys.

    @scordio Do you know how this is implemented in IntelliJ IDEA for Spring?

    Spring Boot has a specific metadata format (JSON file included in JAR) that IDEs read.

    That gets auto-generated based on @ConfigurationProperties (see reference docs), but you can also manually create those JSON files.

    They look something like this.

    {"properties": [
    	{
    		"name": "my.messaging.addresses",
    		"defaultValue": ["a", "b"]
    	},
    	{
    		"name": "my.messaging.container-type",
    		"defaultValue": "simple"
    	}
    ]}

    There is no such metadata format for configuration properties (Spring properties) supported directly by the Spring Framework, so I documented them manually here.


    As a side note, the documentation for the Common Application Properties for Spring Boot that @scordio linked to is generated from those JSON files in JARs on the classpath for the Spring Boot build.

  6. sbrannen commented on Feb 26, 2025

    @sbrannen
    Member

    Spring Boot has a specific metadata format (JSON file included in JAR) that IDEs read.

    Someone in the Spring engineering team mentioned that they think IntelliJ IDEA originally read those JSON files but that IDEA now has its own built-in support for processing @ConfigurationProperties classes.

    So, it's worth confirming with the IDEA team whether they even support those Spring Boot JSON files anymore.

  7. scordio commented on Mar 1, 2025

    @scordio
    ContributorAuthor

    FYI: this is a duplicate of

    Sorry, @sbrannen! I should have searched better...

    @scordio Do you know how this is implemented in IntelliJ IDEA for Spring?

    No, I'm not aware of the IDEA implementation. As @sbrannen mentioned, I would also suggest to get in touch with the IDEA team and understand if there is some sort of contract, not necessarily restricted to Spring Boot, that libraries and frameworks can leverage.

    Would you like me to do it, or would you prefer a JUnit team member doing it?

  8. marcphilipp commented on Mar 1, 2025

    @marcphilipp
    Member

    Would you like me to do it, or would you prefer a JUnit team member doing it?

    Please go ahead or let me know whether I should take care of it. 👍

  9. 14 remaining items

  10. added this to the 6.2.0-M1 milestone on Sep 17, 2026
  11. scordio commented on Sep 18, 2026

    @scordio
    ContributorAuthor

    Hi folks, I wanted to try out the changes from #5932, but locally I'm getting:

    org.junit:junit-platform-configuration-processor:jar:6.2.0-SNAPSHOT was not found in https://central.sonatype.com/repository/maven-snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central-portal-snapshots has elapsed or updates are forced
    

    Is it a misconfiguration on my side, or is junit-platform-configuration-processor not part of snapshot publishing?

    All the other snapshot dependencies seem to be downloaded correctly:

    Image
  12. marcphilipp commented on Sep 18, 2026

    @marcphilipp
    Member

    It should be org.junit.platform:junit-platform-configuration-processor

  13. scordio commented on Sep 18, 2026

    @scordio
    ContributorAuthor

    Aaargh, sorry 😅

  14. marcphilipp commented on Sep 18, 2026

    @marcphilipp
    Member

    No worries!

  15. scordio commented on Sep 18, 2026

    @scordio
    ContributorAuthor

    Successfully tested at scordio/jimfs-junit-jupiter#120 🥳

    The following is generated:

    {
        "properties": [
            {
                "name": "jimfs.junit.jupiter.tempdir.configuration.default",
                "type": "java.lang.String",
                "description": "Property name used to set the default Configuration for the in-memory file system.",
                "sourceType": "io.github.scordio.jimfs.junit.jupiter.JimfsTempDir",
                "defaultValue": "FOR_CURRENT_PLATFORM"
            }
        ]
    }

    which is close enough to what I prepared manually before (knowing that hints will come in #6059):

    {
      "properties": [
        {
          "name": "jimfs.junit.jupiter.tempdir.configuration.default",
          "type": "java.lang.String",
          "description": "The default configuration for the in-memory file system.",
          "sourceType": "io.github.scordio.jimfs.junit.jupiter.JimfsTempDir",
          "defaultValue": "for_current_platform"
        }
      ],
      "hints": [
        {
          "name": "jimfs.junit.jupiter.tempdir.configuration.default",
          "values": [
            {
              "value": "for_current_platform",
              "description": "Configuration appropriate to the current platform."
            },
            {
              "value": "os_x",
              "description": "Configuration for a Mac OS X-like file system."
            },
            {
              "value": "unix",
              "description": "Configuration for a Unix-like file system."
            },
            {
              "value": "windows",
              "description": "Configuration for a Windows-like file system."
            }
          ]
        }
      ]
    }
  16. mpkorstanje commented on Sep 18, 2026

    @mpkorstanje
    Member

    Aaargh, sorry 😅

    I've made the group and artifactId explicit in #6076.

  17. linked a pull request that will close this issueAdd configuration parameter hints #6059on Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions