robotcode


Namerobotcode JSON
Version 0.83.0 PyPI version JSON
download
home_pageNone
SummaryCommand line interface for RobotCode
upload_time2024-05-16 21:30:03
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseApache-2.0
keywords acceptance test driven development acceptance testing bdd bdt behavior driven testing data driven debug adapter protocol keyword driven language server protocol rpa robotframework robotic process automation test testing visual studio code
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # RobotCode - Language support for Robot Framework for Visual Studio Code

[![Visual Studio Marketplace](https://img.shields.io/visual-studio-marketplace/v/d-biehl.robotcode?style=flat&label=VS%20Marketplace&logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=d-biehl.robotcode)
[![Installs](https://img.shields.io/visual-studio-marketplace/i/d-biehl.robotcode?style=flat)](https://marketplace.visualstudio.com/items?itemName=d-biehl.robotcode)
[![Build Status](https://img.shields.io/github/actions/workflow/status/robotcodedev/robotcode/build-test-package-publish.yml?branch=main&style=flat&logo=github)](https://github.com/robotcodedev/robotcode/actions?query=workflow:build_test_package_publish)
[![License](https://img.shields.io/github/license/robotcodedev/robotcode?style=flat&logo=apache)](https://github.com/robotcodedev/robotcode/blob/master/LICENSE)

[![PyPI - Version](https://img.shields.io/pypi/v/robotcode.svg?style=flat)](https://pypi.org/project/robotcode)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/robotcode.svg?style=flat)](https://pypi.org/project/robotcode)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/robotcode.svg?style=flat&label=downloads)](https://pypi.org/project/robotcode/)

----

An [extension](https://marketplace.visualstudio.com/VSCode) which brings support for [RobotFramework](https://robotframework.org/)
to [Visual Studio Code](https://code.visualstudio.com/), including [features](#features) like code completion, debugging, test explorer, refactoring and more!

## Quick start

1. [Install a supported version of Python on your system](https://code.visualstudio.com/docs/python/python-tutorial#_prerequisites)
(note: only Python 3.8 and above are supported)

2. [Install a supported version of RobotFramwork on your system](https://github.com/robotframework/robotframework/blob/master/INSTALL.rst) (note: only RobotFramework 4.0 and above are supported)

3. [Install the RobotCode extension for Visual Studio Code](https://code.visualstudio.com/docs/editor/extension-gallery).
4. Open or create a robot file and start coding! 😉


## Requirements

* Python 3.8 or above
* Robotframework 4.1 and above
* VSCode version 1.82 and above


## Features

With RobotCode you can edit your code with auto-completion, code navigation, syntax checking and many more.
Here is a list of Features:

- [Autocomplete and IntelliSense](#Autocomplete-and-IntelliSense)
- [Code Navigation](#code-navigation)
- [Diagnostics and Linting](#diagnostics-and-linting)
- [Code Formatting](#code-formatting)
- [Running and Debugging](#running-and-debugging)
- [Multi-root Workspace folders](#multi-root-workspace-folders)
- Find implementations and references of keywords, variables, libraries, resource and variable files
  - Show codelenses for keyword definitions
- Test Explorer
- Refactorings
  - renaming keywords, variables, tags

### Autocomplete and IntelliSense

Autocompletion for:
- Libraries with parameters
- Resources,
- Variables
- Keywords with parameters
- Namespaces

![Autocomplete Libraries and Keywords](./docs/images/autocomplete1.gif)

Autocompletion supports all supported variables types
  - local variables
  - variables from resource files
  - variables from variables file (.py and .yaml)
    - static and dynamic
  - command line variables
  - builtin variables

![Autocomplete Variables](./docs/images/autocomplete2.gif)

### Code Navigation

- Symbols
- Goto definitions and implementations
  - Keywords
  - Variables
  - Libraries
  - Resources
- Find references
  - Keywords
  - Variables
  - Imports
    - Libraries
    - Resources
    - Variables
  - Tags
- Errors and Warnings

### Diagnostics and Linting

RobotCode analyse your code and show diagnostics for:
- Syntax Errors
- Unknown keywords
- Duplicate keywords
- Missing libraries, resource and variable imports
- Duplicate libraries, resource and variable imports
- ... and many more

For most things RobotCode uses the installed RobotFramework version to parse and analyse the code, so you get the same errors as when you run it.


Get additional code analysis with [Robocop](https://robocop.readthedocs.io/). Just install it in your python environment.

### Code Formatting

RobotCode can format your code with the internal RobotFramework robot.tidy tool (deprecated), but also with [Robotidy](https://robotidy.readthedocs.io/). Just install it.

### Running and Debugging

RobotCode supports running and debugging of RobotFramework testcases and tasks out of the box, directly from the definition of the test or suite.

![Running Tests](./docs/images/running_tests.gif)

In the debug console you can see all log messages of the current run and navigate to the keyword the message was written by.

### Multi-root Workspace folders

RobotCodes support for [Multi-root Workspaces](https://code.visualstudio.com/docs/editor/multi-root-workspaces), enables loading and editing different Robotframework projects/folders with different RobotFramework/Python environments and settings at the same time or you can share the same RobotFramework/Python environment and settings for all folders in the workspace.


## Installed extensions

RobotCode will automatically install [Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python).

Extensions installed through the marketplace are subject to the [Marketplace Terms of Use](https://cdn.vsassets.io/v/M146_20190123.39/_content/Microsoft-Visual-Studio-Marketplace-Terms-of-Use.pdf).


## Setting up your environment

You can alway use your local python environment, just select the correct python interpreter in Visual Studio Code.

### With pipenv

This is the simpliest way to create an running environment.

- As a prerequisite you need to install [pipenv](https://pipenv.pypa.io/) like this:

    ```bash
    python -m pip install pipenv
    ```


- Create your project directory (robottest is just an example)
    ```bash
    mkdir robottest
    cd robottest
    ```
- Install robotframework
    ```bash
    python -m pipenv install robotframework
    ```
- Open project in VSCode
- Set the python interpreter to the created virtual environment


## Customization

### Editor Style

You can change some stylings for RobotFramework files in VSCode editor, independently of the current theme. (see [Customizing a Color Theme](https://code.visualstudio.com/docs/getstarted/themes#_customizing-a-color-theme))

See the difference:

| Before                                                           | After                                                      |
| ---------------------------------------------------------------- | ---------------------------------------------------------- |
| ![Without customization](./docs/images/without_customization.gif) | ![With customization](./docs/images/with_customization.gif) |


As a template you can put the following code to your user settings of VSCode.

Open the user `settings.json` like this:

<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or <kbd>F1</kbd> or <kbd>CMD</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>

and then type:

`Preferences: Open Settings (JSON)`

put this to the `settings.json`

```jsonc
"editor.tokenColorCustomizations": {
    "textMateRules": [
        {
            "scope": "variable.function.keyword-call.inner.robotframework",
            "settings": {
                "fontStyle": "italic"
            }
        },
        {
            "scope": "variable.function.keyword-call.robotframework",
            "settings": {
                //"fontStyle": "bold"
            }
        },
        {
            "scope": "string.unquoted.embeddedArgument.robotframework",
            "settings": {
                "fontStyle": "italic"
            }
        },
        {
            "scope": "entity.name.function.testcase.name.robotframework",
            "settings": {
                "fontStyle": "bold underline"
            }
        },
        {
            "scope": "entity.name.function.keyword.name.robotframework",
            "settings": {
                "fontStyle": "bold italic"
            }
        },
        {
            "scope": "variable.name.readwrite.robotframework",
            "settings": {
                //"fontStyle": "italic",
            }
        },
        {
            "scope": "keyword.control.import.robotframework",
            "settings": {
                "fontStyle": "italic"
            }
        },
        {
            "scope": "keyword.other.header.setting.robotframework",
            "settings": {
                "fontStyle": "bold underline"
            }
        },
        {
            "scope": "keyword.other.header.variable.robotframework",
            "settings": {
                "fontStyle": "bold underline"
            }
        },
        {
            "scope": "keyword.other.header.testcase.robotframework",
            "settings": {
                "fontStyle": "bold underline"
            }
        },
        {
            "scope": "keyword.other.header.keyword.robotframework",
            "settings": {
                "fontStyle": "bold underline"
            }
        },
        {
            "scope": "keyword.other.header.setting.robotframework",
            "settings": {
                "fontStyle": "bold underline"
            }
        },
        {
            "scope": "keyword.other.header.comment.robotframework",
            "settings": {
                "fontStyle": "bold italic underline"
            }
        },
        {
            "scope": "string.unquoted.escape.robotframework",
            "settings": {
                //"foreground": "#FF0000",
            }
        }
    ]
},

"editor.semanticTokenColorCustomizations": {
    "rules": {
        "*.documentation:robotframework": {
            "fontStyle": "italic",
            //"foreground": "#aaaaaa"
        }
    }
}

```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "robotcode",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "Acceptance Test Driven Development, Acceptance Testing, BDD, BDT, Behavior Driven Testing, Data Driven, Debug Adapter Protocol, Keyword Driven, Language Server Protocol, RPA, RobotFramework, Robotic Process Automation, Test, Testing, Visual Studio Code",
    "author": null,
    "author_email": "Daniel Biehl <dbiehl@live.de>",
    "download_url": "https://files.pythonhosted.org/packages/a3/28/93495e56e3b0e98eb28eec5bc8338baaa52e5e3b04eca8a8c66d7316a6f6/robotcode-0.83.0.tar.gz",
    "platform": null,
    "description": "# RobotCode - Language support for Robot Framework for Visual Studio Code\n\n[![Visual Studio Marketplace](https://img.shields.io/visual-studio-marketplace/v/d-biehl.robotcode?style=flat&label=VS%20Marketplace&logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=d-biehl.robotcode)\n[![Installs](https://img.shields.io/visual-studio-marketplace/i/d-biehl.robotcode?style=flat)](https://marketplace.visualstudio.com/items?itemName=d-biehl.robotcode)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/robotcodedev/robotcode/build-test-package-publish.yml?branch=main&style=flat&logo=github)](https://github.com/robotcodedev/robotcode/actions?query=workflow:build_test_package_publish)\n[![License](https://img.shields.io/github/license/robotcodedev/robotcode?style=flat&logo=apache)](https://github.com/robotcodedev/robotcode/blob/master/LICENSE)\n\n[![PyPI - Version](https://img.shields.io/pypi/v/robotcode.svg?style=flat)](https://pypi.org/project/robotcode)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/robotcode.svg?style=flat)](https://pypi.org/project/robotcode)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/robotcode.svg?style=flat&label=downloads)](https://pypi.org/project/robotcode/)\n\n----\n\nAn [extension](https://marketplace.visualstudio.com/VSCode) which brings support for [RobotFramework](https://robotframework.org/)\nto [Visual Studio Code](https://code.visualstudio.com/), including [features](#features) like code completion, debugging, test explorer, refactoring and more!\n\n## Quick start\n\n1. [Install a supported version of Python on your system](https://code.visualstudio.com/docs/python/python-tutorial#_prerequisites)\n(note: only Python 3.8 and above are supported)\n\n2. [Install a supported version of RobotFramwork on your system](https://github.com/robotframework/robotframework/blob/master/INSTALL.rst) (note: only RobotFramework 4.0 and above are supported)\n\n3. [Install the RobotCode extension for Visual Studio Code](https://code.visualstudio.com/docs/editor/extension-gallery).\n4. Open or create a robot file and start coding! \ud83d\ude09\n\n\n## Requirements\n\n* Python 3.8 or above\n* Robotframework 4.1 and above\n* VSCode version 1.82 and above\n\n\n## Features\n\nWith RobotCode you can edit your code with auto-completion, code navigation, syntax checking and many more.\nHere is a list of Features:\n\n- [Autocomplete and IntelliSense](#Autocomplete-and-IntelliSense)\n- [Code Navigation](#code-navigation)\n- [Diagnostics and Linting](#diagnostics-and-linting)\n- [Code Formatting](#code-formatting)\n- [Running and Debugging](#running-and-debugging)\n- [Multi-root Workspace folders](#multi-root-workspace-folders)\n- Find implementations and references of keywords, variables, libraries, resource and variable files\n  - Show codelenses for keyword definitions\n- Test Explorer\n- Refactorings\n  - renaming keywords, variables, tags\n\n### Autocomplete and IntelliSense\n\nAutocompletion for:\n- Libraries with parameters\n- Resources,\n- Variables\n- Keywords with parameters\n- Namespaces\n\n![Autocomplete Libraries and Keywords](./docs/images/autocomplete1.gif)\n\nAutocompletion supports all supported variables types\n  - local variables\n  - variables from resource files\n  - variables from variables file (.py and .yaml)\n    - static and dynamic\n  - command line variables\n  - builtin variables\n\n![Autocomplete Variables](./docs/images/autocomplete2.gif)\n\n### Code Navigation\n\n- Symbols\n- Goto definitions and implementations\n  - Keywords\n  - Variables\n  - Libraries\n  - Resources\n- Find references\n  - Keywords\n  - Variables\n  - Imports\n    - Libraries\n    - Resources\n    - Variables\n  - Tags\n- Errors and Warnings\n\n### Diagnostics and Linting\n\nRobotCode analyse your code and show diagnostics for:\n- Syntax Errors\n- Unknown keywords\n- Duplicate keywords\n- Missing libraries, resource and variable imports\n- Duplicate libraries, resource and variable imports\n- ... and many more\n\nFor most things RobotCode uses the installed RobotFramework version to parse and analyse the code, so you get the same errors as when you run it.\n\n\nGet additional code analysis with [Robocop](https://robocop.readthedocs.io/). Just install it in your python environment.\n\n### Code Formatting\n\nRobotCode can format your code with the internal RobotFramework robot.tidy tool (deprecated), but also with [Robotidy](https://robotidy.readthedocs.io/). Just install it.\n\n### Running and Debugging\n\nRobotCode supports running and debugging of RobotFramework testcases and tasks out of the box, directly from the definition of the test or suite.\n\n![Running Tests](./docs/images/running_tests.gif)\n\nIn the debug console you can see all log messages of the current run and navigate to the keyword the message was written by.\n\n### Multi-root Workspace folders\n\nRobotCodes support for [Multi-root Workspaces](https://code.visualstudio.com/docs/editor/multi-root-workspaces), enables loading and editing different Robotframework projects/folders with different RobotFramework/Python environments and settings at the same time or you can share the same RobotFramework/Python environment and settings for all folders in the workspace.\n\n\n## Installed extensions\n\nRobotCode will automatically install [Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python).\n\nExtensions installed through the marketplace are subject to the [Marketplace Terms of Use](https://cdn.vsassets.io/v/M146_20190123.39/_content/Microsoft-Visual-Studio-Marketplace-Terms-of-Use.pdf).\n\n\n## Setting up your environment\n\nYou can alway use your local python environment, just select the correct python interpreter in Visual Studio Code.\n\n### With pipenv\n\nThis is the simpliest way to create an running environment.\n\n- As a prerequisite you need to install [pipenv](https://pipenv.pypa.io/) like this:\n\n    ```bash\n    python -m pip install pipenv\n    ```\n\n\n- Create your project directory (robottest is just an example)\n    ```bash\n    mkdir robottest\n    cd robottest\n    ```\n- Install robotframework\n    ```bash\n    python -m pipenv install robotframework\n    ```\n- Open project in VSCode\n- Set the python interpreter to the created virtual environment\n\n\n## Customization\n\n### Editor Style\n\nYou can change some stylings for RobotFramework files in VSCode editor, independently of the current theme. (see [Customizing a Color Theme](https://code.visualstudio.com/docs/getstarted/themes#_customizing-a-color-theme))\n\nSee the difference:\n\n| Before                                                           | After                                                      |\n| ---------------------------------------------------------------- | ---------------------------------------------------------- |\n| ![Without customization](./docs/images/without_customization.gif) | ![With customization](./docs/images/with_customization.gif) |\n\n\nAs a template you can put the following code to your user settings of VSCode.\n\nOpen the user `settings.json` like this:\n\n<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or <kbd>F1</kbd> or <kbd>CMD</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>\n\nand then type:\n\n`Preferences: Open Settings (JSON)`\n\nput this to the `settings.json`\n\n```jsonc\n\"editor.tokenColorCustomizations\": {\n    \"textMateRules\": [\n        {\n            \"scope\": \"variable.function.keyword-call.inner.robotframework\",\n            \"settings\": {\n                \"fontStyle\": \"italic\"\n            }\n        },\n        {\n            \"scope\": \"variable.function.keyword-call.robotframework\",\n            \"settings\": {\n                //\"fontStyle\": \"bold\"\n            }\n        },\n        {\n            \"scope\": \"string.unquoted.embeddedArgument.robotframework\",\n            \"settings\": {\n                \"fontStyle\": \"italic\"\n            }\n        },\n        {\n            \"scope\": \"entity.name.function.testcase.name.robotframework\",\n            \"settings\": {\n                \"fontStyle\": \"bold underline\"\n            }\n        },\n        {\n            \"scope\": \"entity.name.function.keyword.name.robotframework\",\n            \"settings\": {\n                \"fontStyle\": \"bold italic\"\n            }\n        },\n        {\n            \"scope\": \"variable.name.readwrite.robotframework\",\n            \"settings\": {\n                //\"fontStyle\": \"italic\",\n            }\n        },\n        {\n            \"scope\": \"keyword.control.import.robotframework\",\n            \"settings\": {\n                \"fontStyle\": \"italic\"\n            }\n        },\n        {\n            \"scope\": \"keyword.other.header.setting.robotframework\",\n            \"settings\": {\n                \"fontStyle\": \"bold underline\"\n            }\n        },\n        {\n            \"scope\": \"keyword.other.header.variable.robotframework\",\n            \"settings\": {\n                \"fontStyle\": \"bold underline\"\n            }\n        },\n        {\n            \"scope\": \"keyword.other.header.testcase.robotframework\",\n            \"settings\": {\n                \"fontStyle\": \"bold underline\"\n            }\n        },\n        {\n            \"scope\": \"keyword.other.header.keyword.robotframework\",\n            \"settings\": {\n                \"fontStyle\": \"bold underline\"\n            }\n        },\n        {\n            \"scope\": \"keyword.other.header.setting.robotframework\",\n            \"settings\": {\n                \"fontStyle\": \"bold underline\"\n            }\n        },\n        {\n            \"scope\": \"keyword.other.header.comment.robotframework\",\n            \"settings\": {\n                \"fontStyle\": \"bold italic underline\"\n            }\n        },\n        {\n            \"scope\": \"string.unquoted.escape.robotframework\",\n            \"settings\": {\n                //\"foreground\": \"#FF0000\",\n            }\n        }\n    ]\n},\n\n\"editor.semanticTokenColorCustomizations\": {\n    \"rules\": {\n        \"*.documentation:robotframework\": {\n            \"fontStyle\": \"italic\",\n            //\"foreground\": \"#aaaaaa\"\n        }\n    }\n}\n\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Command line interface for RobotCode",
    "version": "0.83.0",
    "project_urls": {
        "Changelog": "https://github.com/robotcodedev/robotcode/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/robotcodedev/robotcode#readme",
        "Donate": "https://opencollective.com/robotcode",
        "Homepage": "https://robotcode.io",
        "Issues": "https://github.com/robotcodedev/robotcode/issues",
        "Source": "https://github.com/robotcodedev/robotcode"
    },
    "split_keywords": [
        "acceptance test driven development",
        " acceptance testing",
        " bdd",
        " bdt",
        " behavior driven testing",
        " data driven",
        " debug adapter protocol",
        " keyword driven",
        " language server protocol",
        " rpa",
        " robotframework",
        " robotic process automation",
        " test",
        " testing",
        " visual studio code"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4aa493858fe4ac738f6812dc64c25149098a000ceacbf626f827444fd1d18bfa",
                "md5": "60b06579eb755e1e0aeadce14066944f",
                "sha256": "d6c6355c71b47b84dd38387b1164f540e459b799b549fc1ed24999d4ae0ba064"
            },
            "downloads": -1,
            "filename": "robotcode-0.83.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "60b06579eb755e1e0aeadce14066944f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 15991,
            "upload_time": "2024-05-16T21:30:13",
            "upload_time_iso_8601": "2024-05-16T21:30:13.692864Z",
            "url": "https://files.pythonhosted.org/packages/4a/a4/93858fe4ac738f6812dc64c25149098a000ceacbf626f827444fd1d18bfa/robotcode-0.83.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a32893495e56e3b0e98eb28eec5bc8338baaa52e5e3b04eca8a8c66d7316a6f6",
                "md5": "84a341a164dea94c8d94fc4eb8c6e059",
                "sha256": "4fc1596fe3be1b6864cd7fe94f12c1350c737212bc7568fcfcc07c0cf01e56d5"
            },
            "downloads": -1,
            "filename": "robotcode-0.83.0.tar.gz",
            "has_sig": false,
            "md5_digest": "84a341a164dea94c8d94fc4eb8c6e059",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 51178,
            "upload_time": "2024-05-16T21:30:03",
            "upload_time_iso_8601": "2024-05-16T21:30:03.591913Z",
            "url": "https://files.pythonhosted.org/packages/a3/28/93495e56e3b0e98eb28eec5bc8338baaa52e5e3b04eca8a8c66d7316a6f6/robotcode-0.83.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-16 21:30:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "robotcodedev",
    "github_project": "robotcode",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "robotcode"
}
        
Elapsed time: 0.28497s