Skip to content

feat(robot): add native Robot Framework support - #1295

Open
kirkbrauer wants to merge 7 commits into
mainfrom
claude/robot-framework-integration-aad017
Open

kirkbrauer wants to merge 7 commits into
mainfrom
claude/robot-framework-integration-aad017

Conversation

@kirkbrauer

@kirkbrauer kirkbrauer commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Summary

Native Robot Framework support for Jumpstarter, in a new jumpstarter-robot package. Every driver's client methods become Robot Framework keywords without any driver changes. Robot Framework runs get leases the same ways the Python helper does, and the integration builds on the shared Appium interface from #1283, which this PR is stacked on.

*** Settings ***
Resource    client.resource          # generated by `jmp robot generate`

*** Test Cases ***
Board Boots To Login Prompt
    Dut Power Off
    Open Console    dut.console    prompt=root@mockdut:~#${SPACE}
    Dut Power On
    ${boot}=    Console Login    root    not-a-secret    timeout=30s
    Should Contain    ${boot}    Starting kernel

What's included

  • Keywords for every driver:

    • Each driver node is a jumpstarter_robot.Driver library whose keywords come from its client class, statically. RobotCode and libdoc see them with arguments, types and docs, with no lease.
    • Keyword names are the driver's path plus the method name (dut.power gives Dut Power On). Aliases in robot.toml rename a prefix.
    • Call Driver, List Drivers and List Driver Keywords reach and list everything.
  • Client resources:

    • jmp robot generate (also jmp-robot, or python -m jumpstarter_robot) writes client.resource from robot.toml [tool.jumpstarter.client].
    • Sources: an exporter config, a committed nodes mapping (for users without the exporter config), a live lease, a jmp describe dump, or an ExporterClass.
    • --capture and --check keep the committed mapping in sync. Inside jmp shell, --capture works out the client from the shell's lease and labels.
    • jmp adds the robot group only when jumpstarter-robot is installed, the same way it adds jmp mcp. The package's exports are lazy, so this costs jmp about 1 ms at startup and doesn't load Robot Framework.
  • Leases, for parity with JumpstarterTest. There are three ways:

    1. Attach to a lease created outside the run: JMP_LEASE, or automatically the client's active lease with the same selector (the IDE case).
    2. Run inside jmp shell.
    3. Call Acquire Lease.

    A selector alone never acquires a lease. Local mode serves an exporter config in-process. Named sessions support several exporters per run, and testbeds are YAML variable files.

  • Keyword sets:

    • consoles, driver contexts and streams, video snapshots
    • SSH (SSHLibrary over the tunnel), ADB (adbutils), iOS tools
    • Appium: Start Appium (or Start Device Hub Appium) returns the URL and capabilities for AppiumLibrary's own Open Application; Upload App tokens go in appium:app. The same tests run on the iOS simulator and on a Device Hub iPhone (driver side in feat: add a shared Appium interface for iOS and Android UI automation #1283)
    • Open Port Forward for existing Robot Framework remote libraries
  • Driver-author API:

    • jumpstarter.client.decorators.robot (keyword, not_keyword, library) mirrors robot.api.deco without depending on Robot Framework.
    • The Click helpers move to jumpstarter.client.decorators.cli, and the old imports keep working.
    • PowerClient gains Should Be On and Should Be Off.
  • Core fixes:

    • A streaming call that stops early now cancels its server stream.
    • resolve_root_child added.
    • MCP introspection no longer hides a driver's own reset.
  • Works with: RobotCode's REPL (lease, discover keywords, drive the board) and pabot (one session per process).

Examples and docs

python/examples/robot has one folder per example. They run in local mode with plain robot or RobotCode, and uv run pytest examples/robot checks them all:

Folder Shows
basic/ The Getting Started suite: power, console, storage, shell, curated keywords
multi-dut/ Two identical boards, role libraries and Use Device
lab/ Testbeds (mock, lab, pool), and pabot, where each process gets its own lease from Acquire Lease
zero-config/ No client resource: keywords imported at run time, drivers reached by path
remote-library/ A remote library on the board, reached through a port forward
linux-ssh/ SSHLibrary over the SSH driver's tunnel
mobile/ Android emulator and iOS simulator apps with AppiumLibrary

Docs: a Getting Started guide (getting-started/guides/robot-framework.md) and a reference section (reference/package-apis/robot/) covering client resources, sessions and leases, devices and apps, and the full keyword reference. The Appium guide links to it.

Testing

Check Result
jumpstarter-robot tests, examples/robot tests 737 passed
Core jumpstarter tests 1184 passed
jumpstarter-cli tests 322 passed
Appium driver tests 55 passed
Strict docs build, ruff, ty, typos pass

The example tests include:

  • RobotCode analyze per example folder: every keyword resolves.
  • REPL sessions.
  • pabot.
  • A check that every committed client resource matches what jmp robot generate writes.

Verified live earlier on this branch (before the latest naming and lease changes):

  • the Android emulator suites, 8/8
  • the iOS simulator suites, 8/8
  • pabot
  • the Remote library example

Not verified:

  • leases against a real controller, which is covered by fakes only
  • the VS Code UI itself
  • the mobile suites since the latest keyword-name change; their names resolve under RobotCode analysis

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 175 files, which is 75 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 94a6048e-b7f2-4128-958a-16ce44ef110c
Commits

Reviewing files that changed from the base of the PR and between 9b8d8b3 and bc5853e.

Files ignored due to path filters: 2

  • python/examples/robot/basic/data/image.bin is excluded by !**/*.bin
  • python/uv.lock is excluded by !**/*.lock
Files selected for processing: 175

  • .cursor/rules/creating-new-drivers.mdc
  • .cursor/rules/project-structure.mdc
  • docs/source/getting-started/guides/index.md
  • docs/source/getting-started/guides/robot-framework.md
  • docs/source/getting-started/guides/ui-automation.md
  • docs/source/introduction/drivers.md
  • docs/source/reference/package-apis/index.md
  • docs/source/reference/package-apis/robot/client-resources.md
  • docs/source/reference/package-apis/robot/devices-and-apps.md
  • docs/source/reference/package-apis/robot/index.md
  • docs/source/reference/package-apis/robot/reference.md
  • docs/source/reference/package-apis/robot/sessions-and-leases.md
  • python/__templates__/driver/jumpstarter_driver/client.py.tmpl
  • python/examples/robot/.gitignore
  • python/examples/robot/README.md
  • python/examples/robot/basic/.vscode/extensions.json
  • python/examples/robot/basic/.vscode/settings.json
  • python/examples/robot/basic/README.md
  • python/examples/robot/basic/client.resource
  • python/examples/robot/basic/exporter.yaml
  • python/examples/robot/basic/robot.toml
  • python/examples/robot/basic/tests/custom_keywords.robot
  • python/examples/robot/basic/tests/power_and_console.robot
  • python/examples/robot/basic/tests/shell.robot
  • python/examples/robot/basic/tests/storage.robot
  • python/examples/robot/jumpstarter_example_robot/__init__.py
  • python/examples/robot/jumpstarter_example_robot/client.py
  • python/examples/robot/jumpstarter_example_robot/examples_test.py
  • python/examples/robot/jumpstarter_example_robot/mockdut.py
  • python/examples/robot/jumpstarter_example_robot/mockdut_test.py
  • python/examples/robot/lab/.vscode/extensions.json
  • python/examples/robot/lab/.vscode/settings.json
  • python/examples/robot/lab/README.md
  • python/examples/robot/lab/client.resource
  • python/examples/robot/lab/robot.toml
  • python/examples/robot/lab/testbeds/lab-pool.yaml
  • python/examples/robot/lab/testbeds/lab.yaml
  • python/examples/robot/lab/testbeds/mock.yaml
  • python/examples/robot/lab/tests/__init__.robot
  • python/examples/robot/lab/tests/boot.robot
  • python/examples/robot/lab/tests/flash.robot
  • python/examples/robot/lab/tests/power.robot
  • python/examples/robot/linux-ssh/.vscode/extensions.json
  • python/examples/robot/linux-ssh/.vscode/settings.json
  • python/examples/robot/linux-ssh/README.md
  • python/examples/robot/linux-ssh/exporter.yaml
  • python/examples/robot/linux-ssh/robot.toml
  • python/examples/robot/linux-ssh/tests/linux_ssh.robot
  • python/examples/robot/mobile/.vscode/extensions.json
  • python/examples/robot/mobile/.vscode/settings.json
  • python/examples/robot/mobile/README.md
  • python/examples/robot/mobile/apps/.gitkeep
  • python/examples/robot/mobile/client-android.resource
  • python/examples/robot/mobile/client-ios.resource
  • python/examples/robot/mobile/exporter-android.yaml
  • python/examples/robot/mobile/exporter-ios.yaml
  • python/examples/robot/mobile/resources/android.resource
  • python/examples/robot/mobile/resources/common.resource
  • python/examples/robot/mobile/resources/ios.resource
  • python/examples/robot/mobile/robot.toml
  • python/examples/robot/mobile/scripts/fetch-sample-apps.sh
  • python/examples/robot/mobile/tests/android/__init__.robot
  • python/examples/robot/mobile/tests/android/adb.robot
  • python/examples/robot/mobile/tests/android/device_and_ui.robot
  • python/examples/robot/mobile/tests/android/sample_app.robot
  • python/examples/robot/mobile/tests/android/settings.robot
  • python/examples/robot/mobile/tests/ios/__init__.robot
  • python/examples/robot/mobile/tests/ios/device_and_ui.robot
  • python/examples/robot/mobile/tests/ios/ios_tools.robot
  • python/examples/robot/mobile/tests/ios/sample_app.robot
  • python/examples/robot/mobile/tests/ios/settings.robot
  • python/examples/robot/multi-dut/.vscode/extensions.json
  • python/examples/robot/multi-dut/.vscode/settings.json
  • python/examples/robot/multi-dut/README.md
  • python/examples/robot/multi-dut/client.resource
  • python/examples/robot/multi-dut/exporter.yaml
  • python/examples/robot/multi-dut/robot.toml
  • python/examples/robot/multi-dut/tests/multi_dut.robot
  • python/examples/robot/pyproject.toml
  • python/examples/robot/remote-library/.vscode/extensions.json
  • python/examples/robot/remote-library/.vscode/settings.json
  • python/examples/robot/remote-library/README.md
  • python/examples/robot/remote-library/board_remote_server.py
  • python/examples/robot/remote-library/exporter.yaml
  • python/examples/robot/remote-library/robot.toml
  • python/examples/robot/remote-library/tests/remote_library.robot
  • python/examples/robot/zero-config/.vscode/extensions.json
  • python/examples/robot/zero-config/.vscode/settings.json
  • python/examples/robot/zero-config/README.md
  • python/examples/robot/zero-config/robot.toml
  • python/examples/robot/zero-config/tests/by_path.robot
  • python/examples/robot/zero-config/tests/zero_config.robot
  • python/packages/jumpstarter-all/pyproject.toml
  • python/packages/jumpstarter-cli/jumpstarter_cli/jmp.py
  • python/packages/jumpstarter-driver-power/jumpstarter_driver_power/client.py
  • python/packages/jumpstarter-driver-power/jumpstarter_driver_power/client_test.py
  • python/packages/jumpstarter-robot/README.md
  • python/packages/jumpstarter-robot/jumpstarter_robot/__init__.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/__main__.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/cli.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/cli_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/configs.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/configs_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/conftest.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/context.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/convert.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/convert_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/curation.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/curation_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/driver_library.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/driver_library_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/errors.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/extensions.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/keywords/__init__.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/keywords/adb.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/keywords/adb_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/keywords/appium.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/keywords/appium_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/keywords/connect.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/keywords/connect_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/keywords/console.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/keywords/console_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/keywords/contexts.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/keywords/contexts_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/keywords/ios.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/keywords/ios_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/keywords/media.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/keywords/media_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/keywords/ssh.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/keywords/ssh_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/library.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/library_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/main_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/naming.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/naming_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/project.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/project_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/render.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/render_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/robot_e2e_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/session_library.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/session_library_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/sessions.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/sessions_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/signatures.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/signatures_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/sources/__init__.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/sources/_common.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/sources/exporter_class.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/sources/exporter_class_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/sources/exporter_config.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/sources/exporter_config_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/sources/report.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/sources/report_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/sources/toml_nodes.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/sources/toml_nodes_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/sources/tree_json_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/testbed.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/testbed_test.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/testing.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/tree.py
  • python/packages/jumpstarter-robot/jumpstarter_robot/tree_test.py
  • python/packages/jumpstarter-robot/pyproject.toml
  • python/packages/jumpstarter/jumpstarter/client/base.py
  • python/packages/jumpstarter/jumpstarter/client/base_test.py
  • python/packages/jumpstarter/jumpstarter/client/core.py
  • python/packages/jumpstarter/jumpstarter/client/decorators/__init__.py
  • python/packages/jumpstarter/jumpstarter/client/decorators/_frontend.py
  • python/packages/jumpstarter/jumpstarter/client/decorators/cli.py
  • python/packages/jumpstarter/jumpstarter/client/decorators/cli_test.py
  • python/packages/jumpstarter/jumpstarter/client/decorators/robot.py
  • python/packages/jumpstarter/jumpstarter/client/decorators/robot_test.py
  • python/packages/jumpstarter/jumpstarter/client/introspect.py
  • python/packages/jumpstarter/jumpstarter/client/introspect_test.py
  • python/pyproject.toml

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@kirkbrauer
kirkbrauer force-pushed the claude/robot-framework-integration-aad017 branch 2 times, most recently from 23b616c to 62a743f Compare November 4, 2026 15:58
@mangelajo
mangelajo force-pushed the feat/appium-ui-automation branch from 31e4432 to 0680276 Compare November 11, 2026 08:34
Base automatically changed from feat/appium-ui-automation to main November 13, 2026 21:40
kirkbrauer and others added 6 commits November 15, 2026 20:53
Add jumpstarter-robot, which turns an exporter's drivers into Robot
Framework keywords and manages leases from Robot Framework runs.

- Keywords for every driver with no driver changes: each driver is a
  jumpstarter_robot.Driver library whose keywords come from its client
  class, prefixed with the driver's path (dut.power -> Dut Power On).
- `jmp robot generate` (also `jmp-robot`) writes a client resource from
  robot.toml [tool.jumpstarter.client], so RobotCode and the language
  server complete every keyword without a lease. `--capture` inside
  `jmp shell` picks the client from the shell's lease and labels.
- Leases, as in the Python helper: attach to a lease created outside the
  run (JMP_LEASE, or the client's lease with the same selector), run
  inside `jmp shell`, or call `Acquire Lease`. Local mode serves an
  exporter config in-process.
- Keyword sets for consoles, driver contexts and streams, SSH
  (SSHLibrary), ADB, iOS and Appium (AppiumLibrary with the lease's
  certificate verified), port forwards for remote libraries, testbeds
  as YAML variable files, and pabot parallel runs.
- Driver authors can curate keywords with jumpstarter.client.decorators
  .robot (keyword, not_keyword, library); the Click helpers move to
  jumpstarter.client.decorators.cli with the old imports kept.
- Core: cancel server streams when a streaming call stops early, and
  add resolve_root_child.

Examples in python/examples/robot (basic, multi-dut, lab, zero-config,
remote-library, linux-ssh, mobile) run in local mode, and the docs gain
a Robot Framework guide and reference section.

Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Kirk Brauer <kirkebrauer@gmail.com>
jumpstarter-cli does not depend on jumpstarter-robot, so `jmp robot` is
added only when it is installed and ty cannot resolve the import in the
package's own environment.

Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Kirk Brauer <kirkebrauer@gmail.com>
…cation

Start Appium serves a target and returns its url and capabilities, which
AppiumLibrary's own Open Application takes as-is. This drops the custom
Open Appium Application and Get Appium Target keywords, the per-driver
shortcut, and the session bookkeeping behind them, along with the direct
Appium-Python-Client and Selenium pins.

Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Kirk Brauer <kirkebrauer@gmail.com>
Device Hub sessions now take the same capabilities and tokens as the
exporter's Appium, with tokens from the Device Hub target itself. Upload App
therefore uploads through a running server named by its driver path or
alias, and falls back to the Appium driver as before. The docs no longer say
Device Hub sessions take local app paths.

Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Kirk Brauer <kirkebrauer@gmail.com>
In-process Robot Framework runs can leave the root logger above WARNING,
which left caplog empty on the Linux CI runner.

Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Kirk Brauer <kirkebrauer@gmail.com>
main removed pytest-asyncio and pytest-anyio when it finished moving to
anyio (#1267): anyio's own pytest plugin runs the async tests, and
--strict-markers rejects @pytest.mark.asyncio. jumpstarter-robot has no
async tests, so the two dev dependencies were unused. Relock with the
pinned uv.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WEcV1TcwVWwQNggRGywjU
@kirkbrauer
kirkbrauer force-pushed the claude/robot-framework-integration-aad017 branch from 4b8c9ed to e9d24ff Compare November 15, 2026 20:55
@kirkbrauer
kirkbrauer marked this pull request as ready for review November 19, 2026 14:41
Sessions and leases:
- A suite that declares a session name for another exporter no longer
  keeps driving the one an earlier suite opened: the open session is
  closed and reopens from the new declaration. Declarations are
  re-asserted at start_suite, since Robot Framework reuses a library
  instance for a later suite with the same import.
- Attaching to a named lease (lease_name or JMP_LEASE) no longer passes
  the selector, which made the client create a second lease when the
  two differed as text and then never release it.
- Lease reuse skips leases that have not started, so a scheduled lease
  no longer makes a run wait for the acquisition timeout.
- A bare Jumpstarter import attaches to JMP_LEASE, as documented.
- Switch Session returns the session that was in effect, not `default`.
- Call Driver, Get Driver, List Drivers and Use Device check the lease,
  so on_lease_end applies to them.

Keywords:
- Generators behind a functools.wraps decorator (validate_call on
  OpendalClient.list and scan) are keywords again rather than context
  managers; only contextlib makes one.
- Static client methods keep their first argument.
- Connect To Device converts its free options to the opener's types,
  so wait_for_boot=False is false.
- A mistyped scope is rejected before anything is opened; it used to
  leave the SSH connection, the forward and the device's private key
  file behind, and the same for ADB and iOS.
- List Drivers escapes exporter descriptions in its HTML table.

Generation:
- `generate --check` and `--capture` keep the children of a driver
  whose client package is not installed.
- `--output` and `--session` are refused for several clients instead of
  writing every resource to one file.

Require Robot Framework 7.5: before it a test timeout was an Exception,
which the wait loops here catch, so a [Timeout] could be swallowed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WEcV3Ry2JEJgNrEy9cUQR

This branch has not been deployed

No deployments
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