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. renmy runtime 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 renmy runtime, open IntelliJ's terminal, run renmy test "*". renmy runtime 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. renmy runtime 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: renmy runtime 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 renmy runtime for running and debugging tests locally while you write them, touching the org only when you deploy.

Step 1: Install renmy runtime

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

bash
# macOS / Linux
curl -sSL https://renmy.net/install.sh | bash

# Windows (PowerShell)
iwr -useb https://renmy.net/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
renmy test "*"

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

# One method
renmy test "OrderServiceTest.testDiscountApplies"

No configuration step: renmy runtime 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 renmy 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 renmy test:watch running in a terminal tab. Every save in the editor re-runs the tests affected by that change; renmy runtime tracks which classes each test exercises, so editing one trigger re-runs only the tests that touch it.

bash
renmy test:watch

renmy runtime builds the schema from the repo

renmy runtime 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
renmy sync

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

Gotchas

  • Managed packages. Code referencing managed-package types needs stubs: renmy stub pull --org <alias> --namespaces <namespace>. See Managed Packages.
  • Editor features stay Illuminated Cloud's. renmy runtime 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. renmy runtime 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.