Skip to content

About

Robot Framework libraries for testing Electron applications and VS Code extensions, built on the Browser library

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

134 Commits

Folders and files

Robot Framework Electron & VS Code

Robot Framework libraries for testing Electron applications and VS Code extensions, built on the Browser library:

  • robotframework-electron (Electron) starts Electron applications. Their windows are ordinary Browser pages, and Browser's keywords work on them; the keywords for browsers and contexts are replaced by keywords for applications.
  • robotframework-vscode (VSCode) starts isolated instances of a VS Code that you provide, with the extension under test, for end-to-end tests of VS Code extensions.

The libraries provide the technique: starting the application and handing its windows to Browser. What to click and which locators to use belongs to your tests.

Documentation: https://robotcodedev.github.io/robotframework-electron-vscode/

Status

The libraries are in a pilot phase, at version 0.1.0, and not yet published on PyPI.

Development

The repository is a uv workspace with both libraries in packages/, the documentation site in docs/, and planned and archived changes in openspec/. AGENTS.md describes how to set up the Browser clone. Then, from the repository root:

uv sync                                            # install the workspace with the dev tools
npm ci && npm run prepare-tests                    # VS Code and Electron for the acceptance tests
uv run pytest                                      # unit tests
uv run robotcode -r . robot                                  # acceptance tests on the desktop, configured in robot.toml
uv run robotcode -r . -p xvfb robot                          # hidden on a Full HD Xvfb screen (Linux)
uv run robotcode -r . -p xephyr robot                        # in a separate Xephyr window (Linux)
uv run robotcode -r . -p xvfb -p electron-previous robot     # against an older Electron major
uv run robotcode -r . -p xvfb -p vscode-insiders robot       # against the newest VS Code Insiders
  • The display profiles need Xvfb (xvfb or xorg-server-xvfb) and, for xephyr, Xephyr (xserver-xephyr or xorg-server-xephyr); with Openbox (openbox) installed, windows can be maximised there.

  • The libraries download nothing. npm ci and npm run prepare-tests, with Node.js 22.12 or later, prepare the VS Code and Electron builds of the acceptance tests; npm run prepare-tests -- insiders adds the newest VS Code Insiders for -p vscode-insiders. Running Tests in the contribution guide shows how to use local executables instead.

  • The test Application And Web Browser needs Chromium for Playwright in the Browser clone, and the video tests need Playwright's ffmpeg: PLAYWRIGHT_BROWSERS_PATH=0 npx playwright install chromium there installs both.

  • To run the VS Code tests against a fork, point VSCODE_EXECUTABLE at it, set VSCODE_VERSION to a name instead of a version number, as the profile vscode-insiders does, so that the version tests only check the version's form, and leave out the tests that check VS Code's own behaviour:

    uv run robotcode -r . -p xvfb robot -v VSCODE_EXECUTABLE:/opt/vscodium/codium -v VSCODE_VERSION:vscodium -e vscode-only -bl "Electron & VSCode.VSCode"

Contributing

Contributions are welcome. Read the Contribution Guide, the AI and Automated Contribution Policy and the Code of Conduct first, and report security problems as described in the Security Policy.

License

Mozilla Public License 2.0

About

Robot Framework libraries for testing Electron applications and VS Code extensions, built on the Browser library

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages