# Why do Gradle docs specify "junit-platform-launcher" for JUnit 5 tests?

**URL:** <https://discuss.gradle.org/t/why-do-gradle-docs-specify-junit-platform-launcher-for-junit-5-tests/46286>\
**Category:** Help/Discuss\
**Created:** [August 15, 2023, 7:48am UTC](https://discuss.gradle.org/t/why-do-gradle-docs-specify-junit-platform-launcher-for-junit-5-tests/46286 "2023-08-15T07:48:40Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![StefanLobbenmeierObj](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@StefanLobbenmeierObj](https://discuss.gradle.org/u/StefanLobbenmeierObj)\
**Post date:** [May 30, 2025, 10:13am UTC](https://discuss.gradle.org/t/why-do-gradle-docs-specify-junit-platform-launcher-for-junit-5-tests/46286/8 "2025-05-30T10:13:35Z")

</div>

I assume if you do not provide that dependency yourself, the runner (gradle or intellij) will their own runner version. I just ran into an issue after upgrading to spring boot 3.5.0 that those versions were misaligned. Adding the test runtime only fixed the issue for me

```gradle
    testImplementation("org.junit.jupiter:junit-jupiter")
    testRuntimeOnly("org.junit.platform:junit-platform-launcher")

```

Before the error message was

```gradle
OutputDirectoryProvider not available; probably due to unaligned versions of the junit-platform-engine and junit-platform-launcher jars on the classpath/module path.

```

---

_[View the full topic](https://discuss.gradle.org/t/why-do-gradle-docs-specify-junit-platform-launcher-for-junit-5-tests/46286)._
