Skip to Content
Quickstart

Run your first LATdx test against a Salesforce org in under five minutes.

This guide is for Salesforce developers who already have an sfdx-project.json workspace and an authenticated sf CLI. By the end you will have the latdx binary on your PATH, an authenticated default org, and a successful first test run in both org mode and file mode.

Install the LATdx CLI

The CLI ships as platform-specific release binaries. There is no npm install -g, and the source repo is private, so the install script is the supported path.

curl -fsSL https://raw.githubusercontent.com/nebulity/latdx-cli/main/install.sh | bash

Verify the binary is on your PATH:

latdx --help
NOTE

For version pinning, channels (stable / latest), and the in-place upgrade flow, see Installation & Upgrade. Windows ARM64 binaries are not published in v1.

Authenticate to your Salesforce org

LATdx piggy-backs on the Salesforce CLI auth. Set a default org or pass one per command:

sf org login web --alias my-org --set-default
TIP

Once sf config set target-org=my-org is set, you can drop -o my-org from every latdx command. Override per-command with -o/--target-org <alias> whenever you need a different org.

Confirm the org is reachable and the LATdx managed-package status is healthy:

latdx --version -o my-org

This is the canonical “is this org ready?” probe. It exits non-zero if the org is unreachable.

TIP

latdx --version -o my-org doubles as a CI smoke step: it prints the CLI version and the in-org managed-package version, and exits non-zero if either query fails.

Run your first test (org mode)

Run a specific test class against the org:

latdx test run -n AccountServiceTest -o my-org

Run a specific method (Class.method):

latdx test run -t AccountServiceTest.testHappyPath -o my-org

Run all tests in org mode (when no file/dir input is provided):

latdx test run -o my-org

Run your first test (file mode)

Point at a local test class file in your sfdx-project.json workspace:

latdx test run -f force-app/main/default/classes/AccountServiceTest.cls -o my-org

Run all matching tests in a directory:

latdx test run -d force-app/main/default/classes -p '**/*Test.cls' -o my-org
WARNING

Wrong mode flags. --method only works with --file. --class-names/--tests cannot be mixed with --file or --dir. If you see org-resolution errors, either pass -o <alias> or set a default org with sf config set target-org=....

List tests before running

If you want to preview what will run, use latdx test list. From a file:

latdx test list -f force-app/main/default/classes/AccountServiceTest.cls

From an org:

latdx test list -o my-org

Or, if you already set a default org:

latdx test list

What’s next?

Last updated on