aer (Apex Execution Runtime) lets you validate Apex code, execute tests, and
bring up a lightweight Salesforce-compatible runtime on your workstation. It is
ideal for iterating on Apex logic without deploying to a real org, keeping test
cycles fast and reproducible.
- Browse to the Releases page of this repository and download the archive
for your platform:
aer_<platform>.zipfor macOS and Linuxaer_windows_amd64.zipfor Windows
- Extract the archive and move the
aerbinary somewhere on yourPATH.- macOS/Linux:
mv aer /usr/local/bin - Windows (PowerShell):
Move-Item .\aer.exe $env:USERPROFILE\bin
- macOS/Linux:
- (Optional) Verify the download with the published SHA256 checksums:
- macOS/Linux:
shasum -a 256 aer_<platform>.zip - Windows:
Get-FileHash .\aer_windows_amd64.zip -Algorithm SHA256
- macOS/Linux:
To run aer test in your GitHub Actions pipeline, add a workflow like:
name: Apex Tests
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Apex Tests
uses: octoberswimmer/aer-dist@main
with:
source: sfdxAdjust with.source for your project's Apex root, and pin the uses: clause to the latest released tag (for example @v0.1.0).
Optional inputs:
flagslets you append additional CLI arguments (for example--skip SomeTest).as-namespacemirrors the--as-namespaceflag to run tests against as if the code is within a package's namespace.
Set a license key for production use (running more than 100 tests).
- name: Run Apex Tests
uses: octoberswimmer/aer-dist@main
with:
source: sfdx
env:
AER_LICENSE_KEY: ${{ secrets.AER_LICENSE_KEY }}- Initialize your project directory with the Apex source you want to run or
test (for example an
sfdxfolder from an SFDX project). - Execute your test suite with
aer test sfdx(add-f NamePatternto focus on specific test classes). - Run individual code paths with
aer run ClassName.methodName --path sfdx. - Use the interactive debugger to step through code, inspect variables, and
troubleshoot issues within VS Code with
aer test --debugoraer exec --debug.
aer reads SObject metadata alongside your source so tests behave like they
would in Salesforce.
Learn more:
- Getting Started Guide
- Interactive Debugging with VS Code
- Interactive Debugging with IntelliJ
- Documentation
- Subscribe
- Metadata imports: Use
aer schema importto pull metadata from a project repo, then run tests against that schema. - CI usage: Add this repo's GitHub action to fail builds on Apex regressions without waiting for a scratch org or sandbox deploy.
- Install errors such as
cannot execute binary file: confirm you downloaded the archive that matches your OS and CPU architecture. - Command not found: ensure the directory where you installed
aeris listed in yourPATH. - To report issues with the CLI runtime itself, open a ticket in this repository; maintainers will route it to the private source project as needed.
