Launch your IntelliJ IDE from your host OS.
- Locate your
nix develop
installed JDK path location from the header printout on enteringnix develop
($JAVA_HOME is printed to stdout on enteringnix develop
).- e.g. On macOS this could look like
/nix/store/2ybgy9h6qh3b7r7j6pmdm0l5j1qfyy39-zulu-ca-jdk-22.0.0/zulu-22.jdk/Contents/Home
.
- e.g. On macOS this could look like
- File -> Project Structure -> Platform Settings -> SDKs -> Add JDK...
- Setup IntelliJ in Gradle perspective -> Gradle Settings (Wrench Icon) -> Run tests with -> IntelliJ IDEA
- Locate your test file in IDE (e.g.
backend/src/test/com/odde/doughnut/controllers/NoteRestControllerTests.java
).- Locate specific test method to run and look out for green run arrow icon in line number gutter.
- Click on the green run arrow icon to kick off incremental build and single test run.