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 a local Salesforce Apex runtime in the same project and the same IDE, and you 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, with the SOQL, DML, and triggers running, in tens of milliseconds instead of an org round-trip.

Two tools with 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, with no org involved. 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, and org browsing, the org-facing workflow you already have.
  • Add Nimbus for running and debugging tests locally while you write them, touching the org only when you deploy.

Step 1: Install Nimbus

One line, with no admin rights, Docker, or JVM needed:

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, and IntelliJ's terminal makes them clickable.

Step 3: Add a run configuration

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

Nimbus builds the schema from the repo

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 and UI tests still belong in your org-based pipeline, and 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. From then on, the org round-trip happens at deploy time rather than on every save.