Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Robot Framework CodeNew to Visual Studio Code? Get it now.
Robot Framework Code

Robot Framework Code

Robot Courses

|
2 installs
| (0) | Free
VS Code extension for Robot Framework - Create and manage Robot Framework projects with ease.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Robot Framework Code - VS Code Extension

Version Downloads Rating License

VS Code extension for Robot Framework - Create and manage Robot Framework projects with ease.

Requirements

  • Python 3.8+ and Robot Framework 7.2+
  • Visual Studio Code with Python extension
  • Robot Framework Language Server (recommended)

Installing

Robot Framework Code can be installed from the Visual Studio Marketplace or as a .vsix.

To get a .vsix, run vsce package in the project directory.

See: Install from a vsix for details installing a .vsix into VSCode.

Configuration

Robot Framework Code is designed to work out of the box without additional configuration. The extension automatically:

  • Detects and validates Python interpreters
  • Configures VSCode settings for Robot Framework
  • Sets up Python paths for both VENV and Poetry environments
  • Configures Robot Framework Language Server integration

All configuration is handled automatically during the "Install Environment" process.

Features (0.1.0)

Environment Setup

  • Install Environment: Interactive command to configure complete Robot Framework environment
  • Support for VENV and POETRY dependency management
  • Automatic installation of project-specific libraries
  • Automatic VSCode and Robot Framework Language Server configuration

Project Types Supported

  • API: RequestsLibrary for API testing ✅ Fully implemented
  • WEB: BrowserLibrary for web testing 🔄 Coming in future updates
  • MOBILE: AppiumLibrary for mobile testing 🔄 Coming in future updates

API Keyword Generation

  • Generate Keywords From Swagger: Generate keywords from Swagger/OpenAPI URL
  • Generate Keywords from Swagger JSON: Generate keywords from local JSON file
  • Generate Keywords from cURL: Generate keywords from cURL commands
  • Automatic API session creation
  • Python contract generation for complex payloads
  • Multi-environment configuration (dev, hml, sdb, prd)

Project Structure

  • API: Complete structure with automatic directory creation ✅ Fully implemented
  • WEB & MOBILE: Basic structure creation 🔄 Coming in future updates
  • Organized resource management

Commands

Command Description
Robot Framework Code: Install Environment Configure Robot Framework environment
Robot Framework Code: [API] Generate Keywords From Swagger Generate keywords from Swagger URL
Robot Framework Code: [API] Generate Keywords from Swagger JSON Generate keywords from JSON file
Robot Framework Code: [API] Generate Keywords from cURL Generate keywords from cURL command

Usage Examples

Setting up Environment for API Testing

  1. Open a folder in VS Code
  2. Execute Robot Framework Code: Install Environment
  3. Select API as project type
  4. Choose VENV as environment manager
  5. Wait for automatic configuration

Note: WEB and MOBILE project types are coming in future updates. Currently, only API projects are fully supported.

Generating Keywords for Petstore API

  1. Execute Robot Framework Code: [API] Generate Keywords From Swagger
  2. Enter: https://petstore.swagger.io/v2/swagger.json
  3. Configure session:
    • Application name: petstore
    • Session alias: petstore_session
    • Environments: dev, hml, sdb, prd
  4. Extension will generate keywords for all endpoints

Generating Keyword from cURL

  1. Execute Robot Framework Code: [API] Generate Keywords from cURL
  2. Paste the command:
    curl -X POST "https://api.example.com/users" \
      -H "Content-Type: application/json" \
      -d '{"name": "John", "email": "john@example.com"}'
    
  3. Enter name: Create User
  4. Extension will generate keyword with parameters and Python contract

Project Structure

API Project

api-project/
├── tests/                    # Stores test suites
├── resources/
│   ├── connections/          # Responsible for files and keywords related to connections
│   ├── routes/              # Responsible for storing keywords that execute API endpoints
│   └── contracts/           # Responsible for storing Python libs that build request bodies
├── session.resource          # Responsible for creating API sessions
├── session_data.yml          # Responsible for storing session data, separated by environments
├── base.resource             # Responsible for imports and environment control variables
└── requirements.txt (or pyproject.toml)

Web Project

web-project/
├── tests/                    # Created automatically
├── resources/                # Created automatically
└── requirements.txt (or pyproject.toml)

Mobile Project

mobile-project/
├── tests/                    # Created automatically
├── resources/                # Created automatically
└── requirements.txt (or pyproject.toml)

Dependencies by Project Type

API

robotframework>=7.2
robotframework-requests>=1.0a14
pyyaml>=6.0

WEB

robotframework>=7.2
robotframework-browser>=19.7.0
pyyaml>=6.0

MOBILE

robotframework>=7.2
robotframework-appiumlibrary>=3.0.0
pyyaml>=6.0

Poetry Support

When selecting POETRY as environment manager:

  1. Project Description: Will be requested for the project
  2. Automatic Initialization: poetry init command will be executed automatically
  3. Project Name: Will use the workspace folder name
  4. Dependencies: Will automatically install Robot Framework and specific libraries
  5. Robust Configuration: Will configure Poetry Python interpreter in VSCode with validation

Python Interpreter Validation

The extension includes robust Python interpreter validation to avoid common issues:

For Poetry

  • ✅ Automatic Detection: Uses poetry env info --path to get correct path
  • ✅ Validation: Verifies if interpreter exists and works
  • ✅ Fallback: Multiple detection strategies to ensure compatibility
  • ✅ Complete Configuration: Includes all necessary VSCode settings

Automatic Settings

{
  "python.defaultInterpreterPath": "path/to/poetry/python",
  "python.pythonPath": "path/to/poetry/python",
  "python.terminal.activateEnvironment": true,
  "python.terminal.activateEnvInCurrentTerminal": true,
  "python.analysis.extraPaths": ["./src"],
  "python.analysis.autoImportCompletions": true,
  "robotframework.language-server.python": "path/to/poetry/python"
}

Roadmap

✅ Completed

  • [x] Robot Framework environment installation
  • [x] VENV and Poetry support
  • [x] Swagger keyword generation (URL and JSON)
  • [x] cURL keyword generation
  • [x] Automatic API session creation
  • [x] Python contract generation
  • [x] Automatic VSCode configuration
  • [x] Multi-environment support

🔄 In Development

  • [ ] Web testing with BrowserLibrary
  • [ ] Test recording
  • [ ] Locator debugging
  • [ ] Advanced templates

📋 Planned

  • [ ] Mobile testing with Appium
  • [ ] CI/CD integration
  • [ ] Custom reports
  • [ ] Multi-browser support

Contributing

Contributions are welcome! To contribute:

  1. Fork the project
  2. Create a feature branch
  3. Commit your changes
  4. Open a Pull Request

Reporting Issues

If you encounter problems or have questions:

  1. Verify Python is installed and in PATH
  2. Ensure Python and Robot Framework LSP extensions are installed
  3. Open an issue on GitHub with problem details

License

This project is licensed under the MIT License. See the LICENSE file for details.

Support

For support and questions:

  1. Check if Python is installed and in PATH
  2. Make sure Python and Robot Framework LSP extensions are installed
  3. Open an issue on GitHub with problem details

Developed with ❤️ for the Robot Framework community

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft