KarateGen VS Code Extension
This VS Code extension integrates with the KarateGen backend service to generate Karate test scripts directly within the VS Code environment.
Features
- Auto-opens on installation: The extension automatically opens when first installed to help you get started
- Status bar access: Click the KarateGen icon in the status bar for quick access
- Activity bar integration: Access KarateGen tools from the dedicated activity bar icon
- Generate Karate test scripts for single API endpoints
- Configure connection to KarateGen backend
- Preview and edit generated scripts
- Quick configuration management through the activity bar view
Requirements
- VS Code version 1.60.0 or higher
- KarateGen backend service running and accessible
Installation
Local Development
- Clone this repository
- Run
npm install to install dependencies
- Press F5 to start debugging and run the extension in a new VS Code window
Manual Installation
- Download the .vsix file from the releases page
- In VS Code, go to Extensions view (Ctrl+Shift+X)
- Click the "..." button and select "Install from VSIX..."
- Choose the downloaded .vsix file
Usage
The extension provides multiple ways to access its features:
Quick Access Methods
- Status Bar: Click the KarateGen icon (🧪) in the status bar at the bottom right
- Activity Bar: Click the KarateGen icon in the left sidebar to access the tool panel
- Command Palette: Use Ctrl+Shift+P (Cmd+Shift+P on Mac) and search for "KarateGen" commands
- Keyboard Shortcuts:
Ctrl+Shift+K G (Cmd+Shift+K G on Mac): Generate Script
Ctrl+Shift+K C (Cmd+Shift+K C on Mac): Configure Connection
Getting Started
- First-time Setup: The extension will automatically open when first installed
- Configure Backend: Set up your KarateGen backend URL (default: https://sherlock.comcast.net)
- Set Output Folder: Choose where generated scripts should be saved
- Generate Scripts: Use any of the access methods above to start generating Karate test scripts
Activity Bar Panel
The activity bar panel provides:
- Quick access to script generation
- Configuration status overview
- One-click access to all settings
- Visual indicators for configuration status
Extension Settings
This extension contributes the following settings:
karategen.backendUrl : The URL of the KarateGen backend server
karategen.outputFolder : The folder where generated Karate scripts will be saved
Known Issues
- This is an initial version with limited functionality
- The extension currently only supports single API script generation
- Generated scripts require a running KarateGen backend
Future Enhancements
- Support for Swagger/OpenAPI file import
- Execute Karate tests directly from VS Code
- View test results within VS Code
- Debugging support for Karate tests
Release Notes
0.0.4
Enhanced user experience with:
- Auto-open on installation: Extension automatically opens when first installed
- Status bar integration: Quick access icon in the status bar
- Activity bar view: Dedicated sidebar panel with configuration overview
- Improved accessibility: Multiple ways to access extension features
- Visual feedback: Configuration status indicators
0.0.3
Updated configuration and timeout management features
0.0.2
Improved backend connectivity and error handling
0.0.1
Initial release of KarateGen VS Code Extension with support for:
- Single API script generation
- Backend configuration
- Basic Karate feature file generation
Development
The source code structure follows standard VS Code extension patterns:
src/extension.ts : Main extension entry point
src/services/ : Services for API communication and configuration
src/panels/ : WebView implementations for UI components
License
This extension is licensed under the MIT License.
| |