Search code examples
intellij-ideajunit

where is com.intellij.rt.junit.junitstarter


i use intellij with junit to run tests (new), when i debug my test code for practice, one of the very first lines of code that seems to run is some method called main from package called com.intellij.rt.junit. I've tried clicking on it as well as searching for it open that package or class to see what's inside but i can't find it all. anyone know what it is or where i could find it in intellij and why i can't just access it from the debugger like every other class? i have junit 5.8 installed in maven.

screenshot of debug screen


Solution

  • y.bedrov's analysis is quite right.

    com.intellij.rt.junit.JUnitStarter is part of IDE. In your case, the IDE is IntelliJ IDEA. You may find the source code in this local path:

    /Applications/IntelliJ IDEA.app/Contents/plugins/junit/lib/junit-rt.jar

    then import the jar package into your own project to read the source code conveniently.

    enter image description here