RoboSense — VS Code Extension
A VS Code extension for reviewing Robot Framework test cases internally. Provides two core features:
- Split-View Protocol Output — See reconstructed NETCONF XML, SSH commands, simulator operations, and STC traffic alongside your
.robot script
- Static Validator — Real-time diagnostics that catch common ATC errors before execution
How to Install & Run (Step-by-Step)
Option A: Run in Development Mode (Recommended for first-time testing)
# 1. Open a terminal and go to the extension directory
cd /repo/<user_name>/robot/TOOLS/RoboSense
# 2. Install dependencies (one-time)
npm install
# 3. Compile TypeScript
npm run compile
Then in VS Code:
Press Ctrl+Shift+P → type Developer: Reload Window → press Enter
OR open the extension folder directly:
File → Open Folder → select /repo/<user_name>/robot/TOOLS/RoboSense
- Press
F5 — this launches a new VS Code window (Extension Development Host)
- In that new window, open your robot repo folder (
/repo/<user_name>/robot)
You should see "RoboSense: OFF" in the bottom status bar (grey text)
Option B: Install as VSIX Package (Permanent install)
# 1. Go to the extension directory
cd /repo/<user_name>/robot/TOOLS/RoboSense
# 2. Install dependencies & build
npm install && npm run compile
# 3. Package into .vsix
npx @vscode/vsce package --no-dependencies
# 4. Install the .vsix in VS Code
code --install-extension robosense-1.0.0.vsix
Then reload VS Code (Ctrl+Shift+P → Developer: Reload Window).
Option C: Symlink for Live Development
# Create a symlink from VS Code extensions to your dev folder
ln -s /repo/<user_name>/robot/TOOLS/RoboSense ~/.vscode-server/extensions/RoboSense
# Rebuild after changes
cd /repo/<user_name>/robot/TOOLS/RoboSense && npm run compile
# Reload VS Code
# Ctrl+Shift+P → Developer: Reload Window
How to Use
Step 1: Check the Status Bar
When you open the robot repo in VS Code, look at the bottom-left status bar:
$(circle-slash) RoboSense: OFF ← Grey, extension is dormant
Note: The status bar item only appears if the workspace contains LIBS/, ULKS/, and ATS/ directories (i.e., it's a robot repo). If you open a non-robot project, the extension stays completely hidden.
Step 2: Turn It On
Click the status bar item. It turns green:
$(check) RoboSense: ON ← Green, extension is active
On first enable, it scans all YANG_INVENTORY JSON files and loads leaf mappings. You'll see a notification:
"RoboSense: ON — 6523 leaf keys loaded"
Step 3: Open a .robot File
Open any .robot file (e.g., a test case under ATS/MOSWA/COMMON/IHUB/).
When the extension is ON and a .robot file is active, you'll see:
- A preview icon ($(open-preview)) in the editor title bar (top-right of the editor tab)
- Inline diagnostics — squiggly underlines in the code for validation issues
- Errors/warnings in the Problems panel (
Ctrl+Shift+M)
Step 4: Open Split View
Click the preview icon in the editor title bar (or Ctrl+Shift+P → "RoboSense: Open ATC Split View").
The screen splits:
- Left — your
.robot script
- Right — reconstructed protocol output panel showing:
- NETCONF XML for each
editconfig_nokia_conf call
- GET-CONFIG / GET-STATE filter XMLs
- SSH commands
- Simulator start/stop operations
- STC traffic configurations
Step 5: Review
In the right panel:
- Click any card → jumps to that line in the left editor
- Leaf key badges — green = valid (found in YANG_INVENTORY), red = unknown key
- Stats bar at top — shows counts of edit-config, get-config, validate, commit, etc.
- Collapsible sections — click test case headers to expand/collapse
Step 6: Turn Off
Click the status bar item again → switches to OFF, hides the icon, clears diagnostics.
Split-View (Protocol Output Reconstruction)
Open any .robot file and click the split-view icon in the editor title bar, or use:
- Command Palette:
RoboSense: Open ATC Split View
- Right-click context menu:
RoboSense: Open ATC Split View
The panel shows each keyword call reconstructed into its protocol equivalent:
| Robot Keyword |
Panel Shows |
editconfig_nokia_conf |
Full NETCONF <edit-config> XML with leaf values mapped to YANG paths |
getconfig_nokia_conf |
NETCONF <get-config> XML with subtree filter |
get_nokia_state |
NETCONF <get> XML with state path |
netconf validate |
<validate> RPC |
Netconf Commit |
<commit> RPC |
ssh send command |
SSH command + expected prompt |
start_simulator / stop_simulator |
Simulator type, port, action |
hlk_traffic / hlk_device |
STC traffic configuration summary |
Each operation card shows:
- Color-coded type badge (EDIT-CONFIG in blue, GET-CONFIG in green, etc.)
- Session target (DUTA, DUTB, etc.)
- Leaf key validation badges — green = found in YANG_INVENTORY, red = unknown
- Click to navigate — clicking any card scrolls the editor to that line
Static Validator (Diagnostics)
Runs automatically on .robot files and reports issues in the Problems panel:
| Check |
Severity |
Description |
| Leaf Key Validation |
Error |
Every parameter to editconfig_nokia_conf is verified against all YANG_INVENTORY JSON files |
| NETCONF Triplet |
Warning |
Every edit-config must be followed by netconf validate + Netconf Commit |
| Variable Declaration |
Info |
Every ${variable} must have a declaration source (Variables section, set variable, argument, return value) |
| FOR Range Math |
Hint/Error |
Shows iteration count for FOR ... IN RANGE loops, flags zero/negative ranges |
| Teardown Deduplication |
Warning |
Flags duplicate operation=delete on the same YANG path |
Installation
cd TOOLS/RoboSense
npm install
npm run compile
Then press F5 in VS Code to launch the Extension Development Host, or package it:
npx @vscode/vsce package
This produces robosense-1.0.0.vsix that can be installed in VS Code.
Configuration
| Setting |
Default |
Description |
ihubAtcReviewer.yangInventoryPath |
LIBS/COM_DATAFRAME/YANG_INVENTORY |
Relative path to YANG_INVENTORY directory |
ihubAtcReviewer.enableDiagnostics |
true |
Enable real-time static validation |
Commands
| Command |
Description |
RoboSense: Open ATC Split View |
Open the protocol output panel beside the current .robot file |
RoboSense: Validate ATC File |
Run validation and show summary |
RoboSense: Reload Leaf Mappings |
Re-scan YANG_INVENTORY JSON files |