Skip to content

remove BRAT testing infrastructure - #17714

Merged
kevinushey merged 1 commit into
mainfrom
developer/remove-brat-infrastructure
May 21, 2026
Merged

kevinushey merged 1 commit into
mainfrom
developer/remove-brat-infrastructure

Conversation

@kevinushey

Copy link
Copy Markdown
Collaborator

Summary

The BRAT (Built-in RStudio Automated Tests) framework has been removed
now that all tests have been ported to Playwright (see #17713). This
deletes the BRAT R framework, the session-side automation module, the
CLI flags that drove BRAT (--run-automation, --automation-filter,
--automation-markers, --automation-report-file), and the GWT/Electron
plumbing that supported them.

The --automation-agent flag is kept -- Playwright relies on it to
expose window.rstudioCallbacks (the command/pref bridge in
e2e/rstudio/utils/commands.ts).

Removed

  • src/cpp/tests/automation/ (BRAT testthat directory + docs)
  • src/cpp/session/modules/automation/ (entire BRAT R framework)
  • src/cpp/session/include/session/SessionAutomationLog.hpp (and ALOG/ALOGF macros)
  • src/cpp/tools/generate-cdp-client.R and scripts/brat
  • --run-automation, --automation-filter, --automation-markers,
    --automation-report-file CLI options (regenerated .gen.hpp headers)
  • kRunAutomation client event, RunAutomationEvent.java, isAutomationHost,
    ShellWidget desktop-host stdout/stderr branch, related GWT plumbing
  • runAutomation callback on RCallbacks
  • BRAT-specific automation host PID tracking, SIGTERM rebroadcast, and
    browser-launch-on-startup in ServerMain.cpp / ServerSessionManager.cpp
  • npm run automation script and run-automation flag handling in
    session-launcher.ts
  • BRAT sections in .claude/CLAUDE.md and the Playwright skill docs

Verified

  • cmake --build . --target rsession rserver -- clean (linked both binaries)
  • ant javac and ant draft -- BUILD SUCCESSFUL
  • npm run typecheck and npm run lint -- clean

Test plan

  • CI: rsession/rserver build on Linux/macOS/Windows
  • CI: Electron desktop build + tests/lint/typecheck
  • CI: GWT ant test
  • Playwright Desktop and Server e2e workflows still pass (the
    --automation-agent plumbing is unchanged)
  • Smoke: rserver-dev starts and accepts logins (no automation
    host shutdown path interfering)

The BRAT tests have been ported to Playwright (#17713), so the BRAT
framework and its CLI plumbing are no longer needed. The `--automation-agent`
flag is preserved -- Playwright uses it to expose `window.rstudioCallbacks`.
@kevinushey kevinushey added this to the Blue Plumbago milestone May 21, 2026
@posit-snyk-bot

posit-snyk-bot commented May 21, 2026 •

Copy link
Copy Markdown
Contributor

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@kevinushey
kevinushey merged commit 54aa93e into main May 21, 2026
1 check was pending
@kevinushey
kevinushey deleted the developer/remove-brat-infrastructure branch May 21, 2026 03:30
@kevinushey kevinushey mentioned this pull request May 21, 2026
2 tasks
kevinushey added a commit that referenced this pull request May 21, 2026
* finish brat removal

- drop the Run Automated Tests stage from the PR Jenkinsfile; the
  npm script it relied on was removed in #17714
- delete src/node/desktop/run-automation (orphan after the same)
- delete the BRAT-to-Playwright migration progress doc; migration is
  complete and the remaining test.fixme placeholders are tracked in
  the test files themselves
- clean up stale BRAT references in ported Playwright test comments

* drop more brat leftovers

- gitignore: rstudio-automation-results.xml is no longer produced
- debugger_extras fixme: rstudio.automation package is gone, generalize the sketch
kevinushey added a commit that referenced this pull request May 21, 2026
The "Ported from src/cpp/tests/automation/testthat/test-automation-*.R"
header lines point at files that were removed alongside the BRAT
infrastructure (#17714, #17715). The pointers no longer resolve, so
drop them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants