{"id":19968226,"url":"https://github.com/sormuras/application-junit5-jdk9-demo","last_synced_at":"2025-08-05T11:17:59.772Z","repository":{"id":85458560,"uuid":"88295121","full_name":"sormuras/application-junit5-jdk9-demo","owner":"sormuras","description":"Using JUnit 5 with IDEA on Java 9","archived":false,"fork":false,"pushed_at":"2017-09-28T11:32:50.000Z","size":48,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-04T01:31:52.687Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sormuras.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-04-14T19:05:35.000Z","updated_at":"2021-12-15T10:30:32.000Z","dependencies_parsed_at":"2023-03-03T08:30:44.951Z","dependency_job_id":null,"html_url":"https://github.com/sormuras/application-junit5-jdk9-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sormuras/application-junit5-jdk9-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sormuras%2Fapplication-junit5-jdk9-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sormuras%2Fapplication-junit5-jdk9-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sormuras%2Fapplication-junit5-jdk9-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sormuras%2Fapplication-junit5-jdk9-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sormuras","download_url":"https://codeload.github.com/sormuras/application-junit5-jdk9-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sormuras%2Fapplication-junit5-jdk9-demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268884009,"owners_count":24323265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-05T02:00:12.334Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T02:44:54.660Z","updated_at":"2025-08-05T11:17:59.760Z","avatar_url":"https://github.com/sormuras.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# application-junit5-jdk9-demo\n\nThe `application-junit5-jdk9-demo` project demonstrates how to run tests based on\nJUnit Platform standalone distribution using IDEA in the a modular environment.\n\nThis sample project does not aim to demonstrate how to use the JUnit Jupiter APIs.\nFor detailed  information on the JUnit Jupiter programming and extension models,\nplease consult the [User Guide](http://junit.org/junit5/docs/current/user-guide/).\n\n\n## overview\n\n![](readme-junit5-idea-java9-project-tree-overview.png)\n\nThis project hosts 2 (two) Java modules **with** module descriptors.\n\n### module `application.api`\n\n```java\nmodule application.api {\n\n  exports foo.bar.api;\n\n  uses foo.bar.api.ApplicationPlugin;\n\n  provides foo.bar.api.ApplicationPlugin\n    with foo.bar.internal.Reverse;\n\n}\n```\n\n### module `integration`\n\n```java\nmodule integration {\n\n  requires application.api;\n  requires junit.platform.console.standalone;\n\n  opens integration\n    to junit.platform.console.standalone;\n\n  provides foo.bar.api.ApplicationPlugin\n    with integration.Uppercase;\n\n}\n```\n\n### `application.api-tests`\n\nThere's also a simple IDEA module **without** a module descriptor. It contains\nthe (unit) tests in an old-fashioned but useful manner:\n\n- no `module-info.java`\n- just an IDEA-style `test` source folder with a *test scope* dependency to\n  `application.api`\n- adds `junit-platform-console-standalone-1.0.0-M4.jar` to the module path, which\n  is automatically transformed into the `junit.platform.console.standalone` module\n- tests are defined in same packages as their tested classes: don't fear the\n  split, package!\n- duplicates the service provision information from `application.api` by using\n  an entry in `META-INF/services` folder\n\n## shared run configurations\n\nhttps://github.com/sormuras/application-junit5-jdk9-demo/tree/master/.idea/runConfigurations\n\n### run ApplicationMain.xml\n```\njdk-9/bin/java\n\n -p [...]/target/idea/production/application.api\n\n -m application.api/foo.bar.api.ApplicationMain\n\nApplicationVersion 9.123\nApplicationPlugin: class foo.bar.internal.Reverse\n'123' -\u003e [Reverse] -\u003e '321'\n'abc' -\u003e [Reverse] -\u003e 'cba'\n```\n\n### run IntegrationMain.xml\n```\njdk-9/bin/java\n\n -p [...]/target/idea/production/integration\n    [...]/target/idea/production/application.api\n    [~m2]/junit-platform-console-standalone-1.0.0-M4.jar\n\n -m application.api/foo.bar.api.ApplicationMain\n\nApplicationVersion 9.123\nApplicationPlugin: class foo.bar.internal.Reverse\n'123' -\u003e [Reverse] -\u003e '321'\n'abc' -\u003e [Reverse] -\u003e 'cba'\nApplicationPlugin: class integration.Uppercase\n'123' -\u003e [Uppercase] -\u003e '123'\n'abc' -\u003e [Uppercase] -\u003e 'ABC'\n```\n\n### run ConsoleLauncherIntegration.xml\n```\njdk-9/bin/java\n\n -p [...]/target/idea/production/integration\n    [...]/target/idea/production/application.api\n    [~m2]/junit-platform-console-standalone-1.0.0-M4.jar\n\n -m integration/integration.ConsoleLauncherIntegration\n\n --scan-classpath\n --classpath target/idea/production/application.api\n --classpath target/idea/production/integration\n\n```\n![](readme-junit5-idea-java9-consolelauncher-integration.png)\n\n## known issues\n\n- When launching *Run 'All Test'* in `integration` service loading does not work.\n- The single IDEA module `application.api-tests` can be configured as a part of\n  `application.api` excluding `module-info.java` from compilation. I guess.\n- Instead of using `--scan-classpath --classpath ... --classpath ...` command\n  line options, the JUnit Platform ConsoleLauncher should support something like:\n  `--scan-modulepath`\n- Forwarding `integration.ConsoleLauncherIntegration` wrapper should not be\n  necessary.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsormuras%2Fapplication-junit5-jdk9-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsormuras%2Fapplication-junit5-jdk9-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsormuras%2Fapplication-junit5-jdk9-demo/lists"}