Skip to content
What's New in v2.8.0

RobotCode

The complete Robot Framework toolkit

Robot Framework testing — same intelligence in your editor, on the command line, and in your CI pipeline. From your first keyword to enterprise scale.

Free and open source, built with the community
RobotCode figurines on a tray

Everything for your Robot Framework project

Section titled “Everything for your Robot Framework project”
  1. Context-aware completion for keywords (incl. embedded args), variables, libraries and resources. Hover docs, go-to-definition, find references, signature help, and live diagnostics — all powered by Robot Framework's own parser. Optional Robocop integration adds further linting and formatting checks on top. The Documentation Viewer and the Keywords view show the keywords of your libraries and resource files.

  2. Discover and run tests from the editor's test panel or the CLI. Set breakpoints, step through keywords, inspect variables via the Debug Adapter Protocol, and jump straight to failures.

  3. A unified robot.toml with profiles for dev, staging, CI, OS-specific or browser-specific setups. Editor, CLI and CI all read the same configuration — what works locally works in CI.

  4. A complete command-line interface for running, discovering, analyzing and inspecting Robot Framework projects. Every command is project-aware, JSON-friendly, and CI-ready.

  5. Try keywords interactively with robotcode repl, in a terminal or in VS Code. Great for experimentation, demos, and debugging snippets; attach the debugger at the prompt to stop inside a keyword and inspect its variables.

  6. One Robot Framework language server powers VS Code, JetBrains, Neovim and any LSP-capable editor. Choose your IDE — the language features stay aligned.

VS Code · Writing a test
  1. $robotcode robot-debug -bl "Tests.Login.Login Works"
    * exception  BuiltIn.Should Be Equal  (resources/shop.resource:19)
  2. (rdb).where
    > #0  BuiltIn.Should Be Equal         resources/shop.resource:19
      #1  shop.Welcome Message Should Be  tests/login.robot:16
      #2  Login Works                     tests/login.robot:11
  3. (rdb).print ${greeting}
    ${greeting} = 'Welcome back, alice!'
  1. robot.toml
    paths = ["tests"]
    python-path = ["libraries"]
    
    [variables]
    BASE_URL = "http://localhost:8080"
    BROWSER = "chromium"
    
    [profiles.ci.extend-variables]
    BASE_URL = "https://staging.shop.example"
  2. $robotcode -p ci profiles show
    [variables]
    BASE_URL = "https://staging.shop.example"
    BROWSER = "chromium"
  1. .github/workflows/tests.yml
    name: Tests
    on: push
    jobs:
      tests:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v6
          - uses: actions/setup-python@v6
            with:
              python-version: "3.13"
          - run: pip install robotframework robotcode[runner]
          - run: robotcode -p ci robot
  1. $robotcode discover tests -i smoke
    - Tests.Cart.Add Item To Cart (tests/cart.robot:15)
    - Tests.Login.Login Works (tests/login.robot:11)
    - Tests.Login.Logout Works (tests/login.robot:18)
    - Tests.Orders.Order Coffee (tests/orders.robot:14)
  2. $robotcode discover tests -btm Risk:high
    - Tests.Cart.Cart Total Adds Up (tests/cart.robot:29)
    - Tests.Login.Login With A Wrong Password Fails (tests/login.robot:26)
    - Tests.Orders.Sold Out Product Cannot Be Ordered (tests/orders.robot:27)
  1. $robotcode analyze code
    resources/orders.resource:31:5: [ERROR] KeywordNotFound: No keyword with name 'Submit Ordr' found.
    Files: 8, Errors: 1, Warnings: 0, Infos: 0, Hints: 0
  1. $robotcode results summary
    - Status: ❌ FAIL
    - Total: 13
    - Passed: 12
    - Failed: 1
  2. $robotcode results summary --failed
    - ❌ FAIL Tests.Login.Login Works (tests/login.robot:11)
      > Welcome back, alice! != Welcome back, Alice!
  1. $robotcode doc keywords ShopLibrary
    Library ShopLibrary
    
    - Log In (user: str, password: str) — Logs user in. Fails if the password is wrong.
    - Log Out () — Logs the current user out.
    - Place Order (product: str, quantity: int = ${1}, express: bool = ${False}) — Places an order …
    - Put In Cart (product: str, quantity: int = ${1}) — Puts quantity items of product into the cart.
    - Search Products (text: str) — Returns the products whose name contains text.
  1. $robotcode repl
  2. >>>Import Resource ${CURDIR}/resources/orders.resource
  3. >>>${order}= Create Order coffee quantity=2
    [ INFO ] Ordered 2 x coffee (express: False)
    [ INFO ] ${id} = order-4711
    [ INFO ] ${order} = order-4711
  4. >>>Should Start With ${order} order-
  5. >>>.save order.robot
    Wrote order.robot (3 entries)
  1. $robotcode repl
  2. >>>Import Library Browser
  3. >>>New Page ${BASE_URL}
    [ INFO ] Successfully initialized new page object and opened url: http://localhost:8080
  4. >>>Fill Text css=input[aria-label="Search products"] COFF
    [ INFO ] Fills the text 'COFF' in the given field.
  5. >>>Keyboard Key press Enter
  6. >>>Get Text css=.product .name
    [ INFO ] Text: ['coffee']
  1. $robotcode repl
  2. >>>Import Resource ${CURDIR}/resources/orders.resource
  3. >>>.debug on
    debugger: attached
  4. >>>.break Place Order
    breakpoint 1 at keyword 'Place Order'
  5. >>>${order}= Create Order coffee
    [ INFO ] Ordered 1 x coffee (express: False)
    * breakpoint  ShopLibrary.Place Order  (resources/orders.resource:14)
  6. (rdb).print ${product}
    ${product} = 'coffee'

Turn your AI agent into a Robot Framework engineer

The RobotCode skill teaches your agent to work through your project's own robotcode CLI — so it sees your tests, keywords and results the way Robot Framework resolves them, with the profiles of your project's robot.toml, instead of guessing from files. For tests and RPA tasks alike.

Works with
  • GitHub Copilot
  • Claude Code
  • Codex
  • Open Plugins agents
AI agent · robotcode skill
  1. I want to test our web shop with the Browser library, but I've never used it. How do I open a page, type into a field and check a text?

  2. Ranrobotcode doc keywords Browser "new page" "fill text" "keyboard key" "get text"
    - Fill Text (selector: str, txt: str, force: bool = ${False})
      — Clears and fills the given txt into the text field found by selector.
    - Get Text (selector: str, assertion_operator: …, assertion_expected: …, …)
      — Returns text attribute of the element found by selector.
    - Keyboard Key (action: KeyAction, key: str, …)
      — Press a keyboard key on the virtual keyboard or set a key up or down.
    - New Page (url: str | None = ${None}, wait_until: PageLoadStates = load)
      — Open a new Page.
  3. Open the shop with New Page, type with Fill Text and press Enter with Keyboard Key. Get Text reads a text and, given an operator, checks it too: Get Text selector == expected.

  4. Great. Then write a test for requirements/SHOP-110.md.

  5. Readrequirements/SHOP-110.md
    # SHOP-110: Search products
    1. The start page has a search field labelled "Search products".
    2. When I type a text and press Enter, the shop lists every product whose name
       contains the text, with its price.
    3. The search ignores upper and lower case.
    4. When no product matches, the shop shows "No products found".
  6. Ranrobotcode repl
    >>> Import Library    Browser
    >>> New Page    ${BASE_URL}
    [ INFO ] Successfully initialized new page object and opened url: http://localhost:8080
    >>> Fill Text    css=input[aria-label="Search products"]    COFF
    [ INFO ] Fills the text 'COFF' in the given field.
    >>> Keyboard Key    press    Enter
    >>> Get Text    css=.product .name
    [ INFO ] Text: ['coffee']
  7. Wrotetests/web_search.robot
    *** Test Cases ***
    Search Lists Every Matching Product
        [Metadata]    Requirement    SHOP-110
        Search Products For    e
        Get Element Count    css=.product    ==    3
    Search Ignores Case
        …
    Search Without A Match Shows A Message
        …
    *** Keywords ***
    Search Products For
        Fill Text    css=input[aria-label="Search products"]    ${text}
        Keyboard Key    press    Enter
  8. Ranrobotcode robot -bl "Tests.Web Search"
    Search Lists Every Matching Product       | PASS |
    Search Ignores Case                       | PASS |
    Search Without A Match Shows A Message    | PASS |
    3 tests, 3 passed, 0 failed
  9. Done: tests/web_search.robot tests criteria 2 to 4 of SHOP-110, each test marked with the requirement, and finds the search field by the label of criterion 1. All three tests pass.

  10. Add one of them to the smoke tests.

  11. Editedtests/web_search.robot
     Search Ignores Case
         [Documentation]    Upper and lower case do not matter.
         [Metadata]    Requirement    SHOP-110
    +    [Tags]    smoke
  12. Ranrobotcode discover tests -i smoke
    - Tests.Cart.Add Item To Cart (tests/cart.robot:15)
    - Tests.Login.Login Works (tests/login.robot:11)
    - Tests.Login.Logout Works (tests/login.robot:18)
    - Tests.Orders.Order Coffee (tests/orders.robot:14)
    - Tests.Web Search.Search Ignores Case (tests/web_search.robot:19)
  13. Search Ignores Case is tagged smoke now; the smoke test has five tests.

  1. Which tests are in our smoke test?

  2. Ranrobotcode discover tests -i smoke
    - Tests.Cart.Add Item To Cart (tests/cart.robot:15)
    - Tests.Login.Login Works (tests/login.robot:11)
    - Tests.Login.Logout Works (tests/login.robot:18)
    - Tests.Orders.Order Coffee (tests/orders.robot:14)
    Suites: 4, Suites with tests: 3, Tests: 4
  3. Four tests are tagged smoke: Add Item To Cart, Login Works, Logout Works and Order Coffee. The search has none yet.

  4. Run them against staging.

  5. Ranrobotcode profiles list
    | Name | Description           |
    |:-----|:----------------------|
    | ci   | Staging shop          |
    | dev  | Local shop in Firefox |
  6. Ranrobotcode -p ci robot -i smoke
    Add Item To Cart                     | PASS |
    Login Works                          | FAIL |
    Welcome back, alice! != Welcome back, Alice!
    Logout Works                         | PASS |
    Order Coffee                         | PASS |
    Tests :: Web shop acceptance tests   | FAIL |
    4 tests, 3 passed, 1 failed
  7. The ci profile points to the staging shop. There, 3 tests passed and Login Works failed: Welcome back, alice! != Welcome back, Alice!. Shall I look into it?

  1. Which tests cover the cart requirements SHOP-201 to SHOP-203?

  2. Ranrobotcode discover tests -btm "Requirement:SHOP-20?" --show-metadata
    - Tests.Cart.Add Item To Cart (tests/cart.robot:15)
      - Metadata: Requirement: SHOP-201
    - Tests.Cart.Remove Item From Cart (tests/cart.robot:22)
      - Metadata: Requirement: SHOP-202
    - Tests.Cart.Cart Total Adds Up (tests/cart.robot:29)
      - Metadata: Requirement: SHOP-203, Risk: high
  3. Each requirement has one test, all in tests/cart.robot: Add Item To Cart (SHOP-201), Remove Item From Cart (SHOP-202) and Cart Total Adds Up (SHOP-203), which is marked as high risk.

  4. Which tests are marked as high risk?

  5. Ranrobotcode discover tests -btm "Risk:high" --show-metadata
    - Tests.Cart.Cart Total Adds Up (tests/cart.robot:29)
      - Metadata: Requirement: SHOP-203, Risk: high
    - Tests.Login.Login With A Wrong Password Fails (tests/login.robot:26)
      - Metadata: Requirement: SHOP-103, Risk: high
    - Tests.Orders.Sold Out Product Cannot Be Ordered (tests/orders.robot:27)
      - Metadata: Requirement: SHOP-303, Risk: high
  6. Three, one each in cart, login and orders: Cart Total Adds Up, Login With A Wrong Password Fails and Sold Out Product Cannot Be Ordered.

  7. Does every requirement in requirements/ have a test?

  8. Ranls requirements
    SHOP-110.md
  9. Ranrobotcode discover tests -btm "Requirement:SHOP-110"
    (no tests matched)
  10. No. requirements/ holds one requirement, SHOP-110 (Search products), and no test is marked with it yet. Shall I write one?

  1. Why did Login Works fail in last night's run?

  2. Ranrobotcode results summary --failed
    - ❌ FAIL Tests.Login.Login Works (tests/login.robot:11)
      > Welcome back, alice! != Welcome back, Alice!
  3. Ranrobotcode results log -bl "Tests.Login.Login Works"
    - shop.Open Shop As  alice  ✅ PASS
    - shop.Welcome Message Should Be  Welcome back, Alice!  ❌ FAIL
      - ${greeting} = ShopLibrary.Greeting  ✅ PASS
        [INFO] ${greeting} = Welcome back, alice!
      - BuiltIn.Should Be Equal  ${greeting}  ${expected}  ❌ FAIL
  4. The login works — the greeting doesn't match: the shop greets with the login name alice, while the test expects Alice.

  5. Show me in the debugger what the shop returns there.

  6. Ranrobotcode robot-debug -bl "Tests.Login.Login Works"
    * exception  BuiltIn.Should Be Equal  (resources/shop.resource:19)
    (rdb) .where
    > #0  BuiltIn.Should Be Equal         resources/shop.resource:19
      #1  shop.Welcome Message Should Be  tests/login.robot:16
      #2  Login Works                     tests/login.robot:11
    (rdb) .print ${greeting}
    ${greeting} = 'Welcome back, alice!'
  7. It stops in Should Be Equal, called by Welcome Message Should Be at login.robot:16. There, ${greeting} is Welcome back, alice!.

  8. The test is right, Alice is the display name. Fix the shop.

  9. Editedlibraries/ShopLibrary.py
    -        return f"Welcome back, {self._user}!"
    +        return f"Welcome back, {self._user.capitalize()}!"
  10. Ranrobotcode robot -bl "Tests.Login.Login Works"
    Login Works                          | PASS |
    1 test, 1 passed, 0 failed
  11. Fixed: Greeting now capitalizes the user name, and Login Works passes.

  1. Can the Browser library run our web tests in Firefox?

  2. Ranrobotcode doc keyword Browser "New Browser"
    ### Keyword New Browser
    | browser  | : SupportedBrowsers | = | chromium | Opens the specified browser. …
    | headless | : bool              | = | ${True}  | Set to False if you want a GUI. …
    …
    ### SupportedBrowsers (Enum)
    | chromium | Google Chrome, Microsoft Edge (since 2020), Opera |
    | firefox  | Mozilla Firefox |
    | webkit   | Apple Safari, Mail, AppStore on MacOS and iOS |
    Since Playwright comes with a pack of builtin binaries for all browsers, no additional
    drivers e.g. geckodriver are needed.
  3. Yes: New Browser firefox, or webkit. No driver needed, only the browser itself, once: rfbrowser init firefox. Your dev profile already sets BROWSER to firefox.

  4. Then run the web tests in Firefox.

  5. Editedtests/web_search.robot
    -Suite Setup      New Page    ${BASE_URL}
    +Suite Setup      Open The Shop
    …
    +Open The Shop
    +    [Documentation]    Opens the shop in the browser of the selected profile.
    +    New Browser    ${BROWSER}
    +    New Page    ${BASE_URL}
  6. Ranrobotcode -p dev robot -bl "Tests.Web Search"
    Search Lists Every Matching Product       | PASS |
    Search Ignores Case                       | PASS |
    Search Without A Match Shows A Message    | PASS |
    3 tests, 3 passed, 0 failed
  7. The suite now opens New Browser ${BROWSER}; with -p dev that is Firefox, and all three tests pass. Without a profile they keep running in Chromium.

  1. What arguments does our Create Order keyword take?

  2. Ranrobotcode doc keywords resources/orders.resource "create order"
    # Resource orders
    - Create Order (product, quantity = 1, express = ${False})
      — Creates an order for quantity items of product and returns its id.
  3. product is required; quantity defaults to 1 and express to ${False}. It returns the order id.

  4. And what does it do to place the order?

  5. Readresources/orders.resource
    Create Order
        [Arguments]    ${product}    ${quantity}=1    ${express}=${False}
        Log    Ordered ${quantity} x ${product} (express: ${express})
        ${id}=    Place Order    ${product}    ${quantity}    ${express}
        RETURN    ${id}
  6. Ranrobotcode doc keywords ShopLibrary "place order"
    # Library ShopLibrary
    - Place Order (product: str, quantity: int = ${1}, express: bool = ${False})
      — Places an order and returns its id. Fails if product is out of stock.
  7. It logs the order and calls Place Order from ShopLibrary, a Python library: quantity is converted to an int, express to a bool, and it fails if the product is out of stock.

  8. Try it out — what happens with a product that is sold out?

  9. Ranrobotcode repl
    >>> Import Resource    ${CURDIR}/resources/orders.resource
    >>> ${order}=    Create Order    coffee    quantity=2
    [ INFO ] Ordered 2 x coffee (express: False)
    [ INFO ] ${id} = order-4711
    [ INFO ] ${order} = order-4711
    >>> Create Order    mug
    [ INFO ] Ordered 1 x mug (express: False)
    [ FAIL ] mug is out of stock
  10. Coffee is ordered as order-4711. The mug is sold out, so Create Order fails with mug is out of stock, which is what Sold Out Product Cannot Be Ordered expects.

  1. Check the project for problems before I push.

  2. Ranrobotcode analyze code
    resources/orders.resource:31:5: [ERROR] KeywordNotFound: No keyword with name 'Submit Ordr' found.
    Files: 8, Errors: 1, Warnings: 0, Infos: 0, Hints: 0
  3. One error: Checkout calls Submit Ordr in orders.resource:31 — a typo for Submit Order. Shall I fix it?

  4. Yes, please.

  5. Editedresources/orders.resource
    -    Submit Ordr    ${order}
    +    Submit Order    ${order}
  6. Ranrobotcode analyze code
    Files: 8, Errors: 0, Warnings: 0, Infos: 0, Hints: 0
  7. Fixed, the project has no errors now.

  8. Is there anything we don't use anymore?

  9. Ranrobotcode analyze code --collect-unused
    resources/orders.resource:28:1: [WARNING] KeywordNotUsed: Keyword 'Checkout' is not used.
    Files: 8, Errors: 0, Warnings: 1, Infos: 0, Hints: 0
  10. Only Checkout (orders.resource:28): no test calls it, which is also why the typo never failed a run. Remove it, or add a test that checks out?

Commands and output from real runs of an example project, abridged.

  • Writes tests from your requirementsLearns the libraries you use, tries keywords and locators live in the REPL, then writes the test and runs it.
  • Finds out why a test failedFrom the results of the last run, a CI artifact or a colleague's run, without running everything again or loading output.xml into the chat.
  • Debugs at a real breakpointPauses the real run where it fails, reads the call stack and the variables, and tries keywords right there.
  • Knows your projectWhich tests, tasks, tags and suites exist, and which tests cover a requirement, resolved the way Robot Framework does instead of by grepping files.
  • Explains libraries and keywordsFrom the versions installed in your environment, including your own resources and Python libraries.
  • Runs exactly what you ask forA single test, a tag or a suite, with the profile for staging, CI or another browser.
  • Keeps the code cleanFinds unknown keywords, wrong arguments, unresolved variables and unused code before anything runs, and fixes them.
  • Compares runsWhat fails for the first time, what passes again, and statistics by tag or suite.
  • Sets up your configurationProfiles, variables and paths in robot.toml, written from each setting's documentation and checked against the effective configuration.

This recorded RoboCon 2024 tutorial starts with the RobotCode extension for VS Code and then shows RobotCode's command line tools: the robot.toml configuration, profiles, and querying and checking a project from the console.

  • Length: ~2 hours.
  • Level: Beginner to advanced — basic knowledge of Robot Framework and Python is recommended.

What you will learn:

  • Installing the RobotCode and Even Better TOML extensions in VS Code and setting up a project.
  • Writing a first test with the Browser library, built step by step in the Debug Console.
  • Looking up library keywords and their documentation in the editor.
  • Creating a robot.toml and running tests from the command line with different profiles, also selecting profiles in VS Code.
  • Querying a project's suites, tests and tags and checking its quality with robotcode.
  • and more...

Open source

Free and open source, built with the community

Section titled “Free and open source, built with the community”

RobotCode is free and open source under the Apache-2.0 license — developed in close collaboration with the Robot Framework Core team and a worldwide community of testers, developers, and contributors.

Individual:

Corporate:

See Support & Contribute for non-financial ways to help — bug reports, PRs, community help, and more.

Released under the Apache-2.0. Copyright © 2022-present Daniel Biehl