How-to

Run Apex tests locally in IntelliJ, alongside Illuminated Cloud

Illuminated Cloud made IntelliJ the serious IDE for Salesforce development. What it can't change is where your tests run — every run still round-trips to an org. Nimbus adds the missing piece: a local Salesforce Apex runtime, in the same project, in the same IDE. Keep both.

Short version

Nothing about your Illuminated Cloud setup changes. Install Nimbus, open IntelliJ's terminal, run nimbus test "*". Nimbus reads the same sfdx-project.json Illuminated Cloud manages, and your @isTest classes execute on your machine — real SOQL, real DML, real triggers — in tens of milliseconds instead of an org round-trip.

Two tools, two different jobs

Illuminated Cloud is org-connected tooling: editor intelligence, metadata deployment, org management. Nimbus is a local runtime: it executes Salesforce Apex, SOQL, DML, triggers, and flows against an embedded PostgreSQL on your machine — no org in the loop. They don't compete for the same job, and they don't conflict: Nimbus is a single binary that operates on the SFDX project files already in your repo.

  • Keep Illuminated Cloud for editing, code completion, deployment, org browsing — the org-facing workflow you already have.
  • Add Nimbus for the inner loop: run and debug tests locally while you write them, and only touch the org when you deploy.

Step 1 — Install Nimbus

One line, no admin, no Docker, no JVM:

bash
# macOS / Linux
curl -sSL https://testnimbus.dev/install.sh | bash

# Windows (PowerShell)
iwr -useb https://testnimbus.dev/install.ps1 | iex

Step 2 — Run tests from the IntelliJ terminal

Open the built-in terminal (⌥F12 / Alt+F12) at your project root — the same project Illuminated Cloud has open — and run:

bash
# Everything
nimbus test "*"

# The class you're working on
nimbus test "OrderServiceTest"

# One method
nimbus test "OrderServiceTest.testDiscountApplies"

No configuration step: Nimbus locates your classes through sfdx-project.json. A typical test completes in tens of milliseconds, and failures point at file and line — IntelliJ's terminal makes them clickable.

Step 3 — Make it one keystroke

Add a Shell Script run configuration (Run → Edit Configurations… → + → Shell Script) with nimbus test "*" as the command and your project root as the working directory. Bind it to a key, or use several configurations for suite / class / watch. Your local tests now sit in the same run-configuration dropdown as everything else in IntelliJ.

Step 4 — Watch mode while you edit

Leave nimbus test:watch running in a terminal tab. Every save in the editor re-runs the tests affected by that change — Nimbus tracks which classes each test exercises, so editing one trigger re-runs only the tests that touch it.

bash
nimbus test:watch

Your schema comes from the repo, not the org

Nimbus builds its local database schema from the object and field metadata already in your project — the same metadata Illuminated Cloud deploys. When your schema changes, resync incrementally:

bash
nimbus sync

Everything runs offline. See Configuration for seeding custom settings and org defaults.

Gotchas

  • Managed packages. Code referencing managed-package types needs stubs: nimbus stub add <namespace>. See Managed Packages.
  • Editor features stay Illuminated Cloud's. Nimbus also ships an Apex language server and a JetBrains plugin, but if you're happy with Illuminated Cloud's editing experience you don't need either — the CLI is the whole integration.
  • The org is still the final gate. Nimbus covers the ~80% of tests that exercise business logic, SOQL, and triggers. Sharing rules, approvals, and UI tests still belong in your org-based pipeline — Illuminated Cloud keeps handling that side.

Next steps

Run your existing suite once and see what's green. Most teams find the bulk of their tests pass locally on the first run — and from then on, the org round-trip is something you do at deploy time, not on every save.