Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Workflow:MarketSquare Robotframework browser Library Development and Release

From Leeroopedia
Knowledge Sources
Domains Development, CI_CD, Release_Management
Last Updated 2026-02-12 04:00 GMT

Overview

End-to-end process for setting up a development environment, building, testing, and releasing the robotframework-browser library.

Description

This workflow covers the contributor journey for the robotframework-browser project. It includes bootstrapping the development environment, understanding the dual-process architecture (Python + Node.js with gRPC bridge), building the project (compiling TypeScript, generating protobuf stubs, creating Python type stubs), running tests (unit and acceptance), linting, and performing releases. The project uses Invoke as a task runner for all build automation.

Usage

Execute this workflow when contributing to the robotframework-browser project, whether fixing bugs, adding new keywords, modifying the Node.js Playwright wrapper, or preparing a new release. This applies to both local development and Gitpod cloud environments.

Execution Steps

Step 1: Bootstrap Development Environment

Clone the repository and run the bootstrap script to create a Python virtual environment with all development dependencies. Activate the virtual environment. Alternatively, use Gitpod for a pre-configured cloud development environment.

Key considerations:

  • Requires Python 3.10+ and Node.js (20, 22, or 24 LTS)
  • python bootstrap.py creates the venv and installs dev dependencies
  • Activate with source .venv/bin/activate (Linux/macOS) or .venv\Scripts\activate.bat (Windows)
  • inv deps installs/updates both Python and Node.js dependencies

Step 2: Build the Project

Run inv build to compile the TypeScript gRPC wrapper, generate protobuf files, and create the Python type stub file (.pyi). This step must be run after any changes to TypeScript code, protobuf definitions, or Python keyword signatures.

Key considerations:

  • TypeScript is compiled via esbuild (build.wrapper.js, build.testapp.js)
  • Protobuf compilation generates Python pb2 files and TypeScript gRPC stubs
  • Python stub generation (gen_stub.py) creates browser.pyi for IDE support
  • Must rebuild after TypeScript changes before running tests

Step 3: Run Tests

Execute unit tests with inv utest (pytest-based Python tests) and acceptance tests with inv atest (Robot Framework tests against the dynamic test application). Use inv utest-watch for continuous test running during development. Rerun failed acceptance tests with inv atest-failed.

Key considerations:

  • Unit tests use pytest with approval testing for snapshot-based assertions
  • Acceptance tests run against a bundled React+Express test application
  • Docker-based testing (inv docker and inv docker-test) validates clean installs
  • Pre-push hooks run tests automatically

Step 4: Lint and Format Code

Run inv lint to execute all linters: ruff, isort, and black for Python; eslint for TypeScript; and RoboTidy for Robot Framework tests. These checks also run as pre-commit hooks.

Key considerations:

  • Python: ruff + isort + black (inv lint-python)
  • TypeScript: eslint (inv lint-node)
  • Robot Framework: RoboTidy (inv lint-robot)
  • Pre-commit hooks enforce style automatically

Step 5: Prepare Release

Update version numbers across both Python and Node.js components using inv version $VERSION. Generate keyword documentation with inv docs -v $VERSION. Generate release notes using inv release-notes which pulls from the GitHub issue tracker. Commit all version and documentation changes.

Key considerations:

  • Version must be updated in Python (version.py, pyproject.toml), Node (package.json), and BrowserBatteries
  • Documentation generation creates versioned HTML keyword docs
  • Release notes are auto-generated from GitHub milestones and issues
  • Issues should have type (bug/enhancement/task) and priority set

Step 6: Publish Release

Create a GitHub release which triggers the CI/CD release workflow. The workflow builds and publishes both the robotframework-browser and robotframework-browser-batteries packages to PyPI, and builds Docker images. Verify the published packages work correctly.

Key considerations:

  • Release workflow is triggered by GitHub release publication
  • Both PyPI packages (browser and batteries) are published
  • Docker images are built and pushed to container registry
  • Post-release verification: install from PyPI and run basic tests
  • Announce on Slack and Robot Framework Forum

Execution Diagram

GitHub URL

Workflow Repository