Skip to content

Run Changed Tests Before a PR

Guided help

Run the local tests Glade can connect to your branch diff, then save machine-readable output.

  • Run changed tests against `origin/main`.
  • Rerun failures.
  • Write reports for review or CI.

Before you start

  • Your branch has access to origin/main.
  • reports/ exists before commands write files there.
  • Screenshots for this article are captured in a terminal.

Steps

1. Run changed tests

bash
glade test changed --project . --since origin/main --no-progress

Expected: Glade selects the smallest test set it can prove from the diff and prints a local pass/fail summary.

Terminal showing changed local tests

2. Save review artifacts

bash
mkdir -p reports
glade test changed --project . --since origin/main --json --no-progress > reports/glade-test-changed.json
glade test --project . --junit reports/glade-junit.xml --no-progress
wc -c reports/glade-test-changed.json reports/glade-junit.xml

Expected: reports/ contains JSON and JUnit output for PR review or CI upload.

Terminal showing Glade report files

Common wrong turn

If changed-test selection finds no merge base, fetch full history first. In GitHub Actions, use fetch-depth: 0.

Next

Glade is local-first Apex tooling.