The independent daily for Salesforce admins, developers and architects

Curated by Abhinav (opens in a new tab)

Running Apex tests locally with Renmy Runtime, without an org (opens in a new tab)

You will learn why Apex has no local run loop, what a local Apex runtime changes for testing, debugging and CI, and which platform rules still apply locally.

Why read this

The article is a vendor-led introduction to a third-party tool, so weigh its claims accordingly.

The article explains that Apex looks like Java but only compiles, runs and tests inside a Salesforce org, so every iteration means deploying, waiting and reading logs. It argues that this deploy-to-run loop is slow, and that CI pipelines need an org and certificate just to run unit tests. Its benchmark claims four open-source Apex suites of 837 tests took about 1 min 46 s in an org versus 2.4 s locally, with every test passing in both.

The author presents Renmy Runtime, a single binary that executes Apex, SOQL, DML and Salesforce Flows on a developer’s machine against an embedded PostgreSQL, with no org, Docker or JVM. Commands such as renmy test, renmy validate and renmy explain run tests, type-check changes and explain failures, and the tool reports line and branch coverage. A JetBrains plugin adds breakpoints in IntelliJ IDEA, a SOQL and Apex console, and mutation testing as a Pro feature. The CI example runs the suite and emits JUnit XML and Cobertura without an org.

The piece is candid that some differences remain: governor limits, order of execution and metadata-defined schemas still apply, and the runtime is not the platform itself. It recommends keeping sandboxes or Scratch Orgs for UI, integration and final validation, with renmy deploy checking the same bytes in the org before release.

Read the original at dev.to (opens in a new tab)

Worth reading?

Must-read

Agentforce agents move to AiAgentDefinition metadata types in API version 68.0 (opens in a new tab)

You will learn how the new AiAgentDefinition and AiAgentDefinitionVersion types replace Bot, GenAiPlannerBundle and AiAuthoringBundle for Agentforce agents, how to write a manifest and retrieve a single version with its dependencies, and which deployment rules and migration steps apply.

Agentforce agent at API 68.0

  • AiAgentDefinition
  • AiAgentDefinitionVersion
  • AiAuthoringBundle
The three old metadata types and the two new types that replace them

Winter ’27 introduces two metadata types for Agentforce agents at API version 68.0: AiAgentDefinition, which holds agent-level settings, and AiAgentDefinitionVersion, which holds one version’s settings, messages and an inline planner with its subagents and actions. Under the previous structure, one agent was spread across the Bot, GenAiPlannerBundle and AiAuthoringBundle types, with generated name suffixes, hard-to-find welcome messages and folder names that changed between retrieves. The author compares a sample agent retrieved at API 67.0 and 68.0, showing that the content was identical and only the names and packaging changed.

At API 68.0, Agentforce agents must use the new types, and retrieving or deploying them as Bot or BotVersion returns an error. The # delimiter lets a manifest or the –metadata flag select a single version, such as TestAgent#1, all versions with TestAgent#, or every version of every agent. Salesforce CLI version 2.149.9 or later is needed, and the –root-type-with-dependencies AiAgentDefinitionVersion flag pulls in the parent definition, the authoring bundle and the Flows, Apex classes and Prompt Templates the version uses. The dependency retrieve is limited to 25 requests per day, 100 components per request, and one level deep.

Deployments fail if the old and new formats are mixed, if a version is deployed without its definition existing in the target org or the same deployment, or if the Agent Script source is omitted. The author also notes that the agent user from the source org must be replaced for a draft agent, and recommends switching to API 68.0 in its own commit and updating any scripts that parse the old files.

Read the original at Salesforce Developers Blog (opens in a new tab)

Worth reading?

Must-read

Catching AI-Generated Apex that breaks governor Limits with budget tests in CI (opens in a new tab)

You will learn how to measure governor limit consumption in Apex tests, set per-context budgets, and close the loop so AI agents fix limit-heavy code before it merges.

Why read this

The post includes a snapshot class pattern, a limits table and a retry-and-escalation design.

  1. Agent pushes code with bulk tests
  2. CI measures limit consumption
  3. Breach sends feedback to agent
  4. Up to two refactor attempts
  5. Human architect review if still failing
How the CI loop handles a governor limit breach in agent-written code

The article argues that AI-generated Apex can be functionally correct and fully unit-tested yet still exhaust shared transaction budgets, because agents build each feature in isolation and small additions compound until a governor limit is breached. Standard small-data tests rarely expose this, and since governor limits are platform capacity ceilings, the author recommends treating them as architectural contracts and enforcing them automatically before code merges. It illustrates the compounding with a sprint-by-sprint example where SOQL consumption climbs from 15% to 59% through individually harmless changes.

The proposed approach has several parts. Teams should supply a shared, immutable GovernorLimitSnapshot test utility, require agents to write bulk tests of 200 records that capture before and after snapshots, and have CI verify that these test conventions are present. A table compares synchronous and asynchronous limits, and a budget-allocation table recommends consumption thresholds by execution context: roughly 40 to 50% for trigger code, 60 to 70% for service classes, 80 to 85% for isolated asynchronous jobs, and 20 to 30% for Scheduled Apex. Snapshots should be taken just before Test.stopTest() so the synchronous footprint is measured separately from asynchronous work, which is tested in its own method.

The article then describes a closed feedback loop in CI. When a test breaches its budget, a structured prompt containing the metric, consumption, threshold and required optimization steps goes back to the agent, which gets up to three attempts, with the delta between attempts supplied on later tries. If the third attempt fails, the merge is blocked and a human architect is asked to review, possibly moving the logic to Queueable. Agents must not be allowed to weaken tests or thresholds, and the author notes that some limits, such as callouts and Platform Event publishing, need production monitoring as well. Thresholds should start generous, use warning and violation tiers, and be tightened over time, with a closing checklist for rolling the pattern out.

Read the original at Salesforce Architects (opens in a new tab)

Worth reading?

Recommended

What a local Apex runtime sends off the machine, and what it keeps (opens in a new tab)

You will know where Apex source, test data and licence details go when renmy runtime runs, which settings turn telemetry off, and how it works offline and air-gapped.

Why read this

It is the questionnaire answers a security or procurement team will ask for.

Org-based test runs

  • Each test run deploys to a Salesforce org
  • Test data sits in the org sandbox
  • Each developer needs an org credential

Local runtime

  • Tests run on the developer's machine
  • Test data lives in an in-process database
  • Test runs need no org or credential
Where Apex runs and where data lives, before and after a local runtime

This vendor-written piece, published by Renmy UG of Berlin, gives security and procurement teams the answers they need for a questionnaire about renmy runtime, a local Apex runtime formerly called Nimbus. It executes Apex, SOQL, DML and Salesforce Flows on a developer’s machine against an embedded PostgreSQL, without an org, Docker or a JVM. Apex source is read locally and sent to no one. Tests run against schema read from the project’s metadata, so they need no connected org, and test data sits in an in-process database with no open network port, rolled back after each test.

The article then sets out what leaves the machine. The Free tier needs no network access. By default the runtime sends one privacy-minimal activation event to an EU-hosted service, which excludes code, paths, test names and record data. Pro licences also record one de-duplicated activation from headless CI. Either can be switched off with a single setting or environment variable. Pro and Team licence checks send the licence key to the Keygen licensing API, at most once a day. Activating a machine with renmy login also sends a hashed installation ID, hostname, display name, OS, architecture, CPU core count and account ID. Licences are cached for offline use for up to seven days.

For disconnected networks, the article says the binary can be copied into place without internet access, since the database engine is embedded, and the daily update check can be disabled. Enterprise customers can have licence validation on premises, with pricing from $20,000 a year. A command-by-command table lists what each command contacts. The Salesforce org remains the system of record and deployment target. The deploy flow validates the same payload in the org before deploying, and Pro release commands produce signed receipts for auditors.

The piece closes with a list of documents to attach to the questionnaire, including the security page, data processing addendum, subprocessor list and licence terms. It also gives pricing: Free at $0, Pro and Team free during the public beta with listed prices of $19 and $49 per month, and Enterprise on a custom contract.

Read the original at dev.to (opens in a new tab)

Worth reading?

Must-read

Sharding Apex tests across CI jobs with renmy runtime (opens in a new tab)

You will learn how to split one Apex test suite into parallel slices across CI runners, how classes are balanced by recorded duration, and when sharding is not worth the overhead.

Why read this

The article gives a working GitHub Actions matrix and explains how to merge the JUnit results.

  1. Balance classes by recorded duration
  2. Run each slice on its own CI job
  3. Merge the shard JUnit XML results
Sharding assigns each test class to exactly one runner, then the results are merged

The article explains how to split one Apex test suite into parallel slices across CI runners using renmy runtime, a local Salesforce Apex runtime from Renmy UG that runs tests on the CI machine against an embedded PostgreSQL instead of in a Scratch Org or sandbox. The author argues that sharding was impossible in an org-based workflow, because every extra runner would need its own org, deploy and place in the org’s test queue. With a local runtime, the command renmy test –shard N/M runs one slice of the suite, and the wall-clock time falls to roughly the slowest shard plus setup, though total compute rises slightly. The runtime was previously called Nimbus, and the author notes that this is the same tool under a new name.

Sharding works at the level of whole test classes, so each class’s @testSetup runs once and its records remain consistent with an unsharded run. Classes are balanced using durations recorded in .nimbus/test-durations.json, and projects without that history fall back to an even split by class name. Because each shard computes the partition independently, every job must see the same durations file, which the author recommends committing or restoring from a cache. The article supplies a GitHub Actions matrix with fail-fast disabled, a per-shard JUnit file, and an always-run publishing step. It also shows how to merge results either through the shard attribute that the JUnit XML carries or by uploading artifacts and publishing them from a job that runs after the matrix.

The piece also covers coverage and caching. A shard measures coverage only for the tests it runs, so whole-suite coverage needs a single process, and the article points to renmy deploy –min-coverage and renmy coverage diff for gating. Shards can share a cache of parsed ASTs and the binary to reduce cold-start time.

Finally, the author warns that sharding is not worth its overhead for suites that finish within about a minute, since each shard repeats checkout, installation and database startup. Alternatives suggested first are parallel workers within one job, caching, and an external PostgreSQL service container. Sharding is recommended when the test step alone runs for several minutes. A slow class sets a floor on its shard’s time, and order-dependent tests can surface when classes move between shards. Running on a CI runner belongs to the Team tier, which is free during the public beta, and JUnit and Cobertura output are Pro features.

Read the original at dev.to (opens in a new tab)

Worth reading?

Must-read

How a local Apex runtime speeds up testing without replacing your org (opens in a new tab)

You will learn how a local runtime executes Apex and Flow metadata against an embedded database while enforcing governor limits and order of execution.

Why read this

The article explains how this approach accelerates the edit-test cycle and fits into your standard deployment workflow.

Local Apex runtime

  • Apex interpreter
  • Local database for SOQL and DML
  • Rule engine for limits and execution
The local Apex runtime is built from three core components

The article, written by the maker of renmy runtime (formerly Nimbus, renamed in October 2026), introduces a local Apex runtime: a program that executes Apex, SOQL and DML on a developer’s own machine without a Salesforce org. It argues that Salesforce developers work in a slow loop, where every edit is deployed to an org and tested there, while developers in Java, JavaScript and Go run tests locally in about a second. The author attributes this gap to Apex being multi-tenant and tied to the platform’s data model and order of execution. Cited costs include round trips to the org, CI that needs org credentials, outages that halt testing, and AI coding agents that cannot iterate quickly. A local runtime has three parts: an Apex interpreter, an embedded PostgreSQL database for real queries and DML, and the platform’s rules, including enforced governor limits, triggers and Flows in order of execution, and per-test rollback. A sample test runs in tens of milliseconds, and the article says the runtime is not a mock, not a Scratch Org and not a transpiler.

The article is clear that a local runtime does not replace the org. Lightning pages, user-facing Screen Flows, permission checks, real integrations and the deploy itself with Salesforce’s metadata validation still happen in the org. The author compares this to a Java team’s staging environment, which stays for integration and final checks but is not the only place code runs. The renmy deploy is described as running local test and coverage gates first, then a check-only validation in the target org, then the deploy. The tool also offers coverage reporting, mutation testing, a debugger in VS Code and JetBrains, an MCP server for AI coding tools, and an IDE plugin. A published benchmark reports that 837 tests from four open-source suites ran in about 2.4 seconds locally versus about 1 minute 46 seconds in an org, with all tests passing in both.

Installation is a single binary for macOS, Linux and Windows, with no JVM, Docker or org required, and the commands are renmy test “” from the project root, plus options for single classes, coverage and a browser dev UI. The free tier covers individual developers, while Pro and Team tiers are free during the public beta and listed at $19 per month and $49 per developer per month. The article links to a parity record, which it describes as not a claim of 100 percent accuracy, and to GitHub for issues and releases.

Read the original at dev.to (opens in a new tab)

Worth reading?