Ruviolta
Language support and multi-project commands for Ruviolta .ut test files in Visual Studio Code.
Features
- Syntax highlighting for
.ut files
- Full JavaScript expression highlighting after
let
- Embedded JavaScript highlighting inside
script { } blocks
- Ruviolta syntax diagnostics
- JavaScript syntax and undefined identifier diagnostics
- Multiline variable declarations
- Code snippets
- Document formatting
- Hover information for Ruviolta commands
- Run the current Ruviolta file with its own project configuration
- Debug the current file step by step in the browser with editable Retry and Apply to code
- Highlight, format, diagnose, and document reusable
run() test flows
- Open the latest report for the active project
- Ruviolta Dark and Ruviolta Light color themes
Multi-project layout
projects/
├── customer-portal/
│ ├── config/
│ │ └── ruviolta.config.mjs
│ ├── tests/
│ │ └── login.ut
│ └── reports/
│
└── admin-portal/
├── config/
│ └── ruviolta.config.mjs
├── tests/
│ └── search.ut
└── reports/
The extension locates the closest project configuration for the active .ut file.
File example
File Description: Login-related tests
Global Variables:
let username = "test-user"
Scenario: User logs in successfully
Variables:
let message = `Logging in as ${username}`
visit("/login")
input("#username", username)
click("#login")
script {
await Promise.resolve()
console.log(message)
}
JavaScript expressions
let total = price * quantity
let status = total >= 100 ? "large" : "small"
let activeUsers = users
.filter(user => user.active)
.map(user => user.name)
let response = await loadData()
Full JavaScript statements such as if, for, while, and try belong inside a script { } block.
External files
let text = readText("data/message.txt")
let data = readJson("data/user.json")
let rows = readCsv("data/users.csv")
let bytes = readBytes("data/file.bin")
let value = env("VARIABLE_NAME", "fallback")
let helpers = await importJs("helpers/functions.js")
Relative paths are resolved from the current .ut file.
Browser commands
visit("/")
refresh()
scrollTo("#save")
upload("#avatar", "data/photo.png")
check("#terms")
uncheck("#newsletter")
select("important option text")
select("//select[@name='country']", "Canada")
waitForText("#status", "completed")
waitUntilMissing(".loading")
waitForEnabled("#submit")
waitForDisabled("#locked")
waitForHidden(".overlay")
waitForChecked("#terms")
waitForUnchecked("#newsletter")
waitForUrl("/dashboard")
waitForUrlContains("/students/")
waitForTitle("Student profile")
hover("#profile-menu")
radio("input[name='role'][value='teacher']")
inputByLabel("Name", firstName)
inputByLabel("Phone", phoneNumber)
clickByLabel("Account:", "//button[normalize-space()='Select']")
pageDown()
pageUP()
clickRepeated("//button[.='Save and continue']", 5)
clickLink("read more")
clickButton("save")
click("#dialog-button")
waitForDialog()
dialog(accept)
cookies(accept)
waitToastMessage("success")
closeToastMessage("success")
closeAllToasts()
CSS selectors and XPath expressions are supported where a locator is expected. inputByLabel() finds an editable input or textarea by exact visible label text. clickByLabel() uses the label as a readable anchor and scopes the supplied target locator to nearby containers. closeAllToasts() is best effort and never fails when no toast can be closed.
Reusable test flows
let userName = ruviolta.accept(userName, "Test User")
run("tests/users.ut@createUser")
run("tests/users.ut@createUser") { userName: "Test User" }
run() executes the called scenario in the current browser session. References may target the current project or a sibling project under the same projects/ directory:
run("identity/tests/users.ut@createUser") { userName: "Test User" }
A cross-project flow temporarily uses the called project's base URL and timeout, then restores the root project context. The extension provides highlighting, diagnostics, snippets, and hover documentation for both run() and ruviolta.accept().
Project reports
Reports are written to the active project only:
projects/<project-name>/reports/YYYY-MM-DD_HH-mm-ss-SSS/report.html
projects/<project-name>/reports/latest.html
Ruviolta: Open Latest Report prefers the active .ut file's project. When no project is active and several projects exist, the extension asks which project report should open.
After Ruviolta: Run Current File finishes, the notification offers an Open Report button for the same project.
Ruviolta: Debug Current File starts the root project through the interactive Stepflow Debugger. The browser waits for Next before every step. Every supported single-line step has a pencil editor; while editing, Retry executes the edited command instead of the original. After a successful edited retry, the injected Stepflow panel shows that the working change is not saved and offers Apply to code. The panel is isolated in Shadow DOM, is promoted above page overlays after each step, and is hidden before failure screenshots. Same-project and cross-project called flows are shown in one compact colored row, and source updates are written to the correct root or called .ut file.
Browser selection
The browser is selected in the active project's file:
projects/<project-name>/config/ruviolta.config.mjs
Supported values are "chrome", "edge", and "firefox".
Ruviolta controls Chrome and Edge through CDP and Firefox through WebDriver BiDi.
Commands
Ruviolta: Run Current File
Ruviolta: Debug Current File
Ruviolta: Open Latest Report
Keyboard shortcut
Run the current Ruviolta file with:
Ctrl+Alt+R
Debug the current Ruviolta file with:
Ctrl+Alt+D
Terminal examples
npx ruviolta run
npx ruviolta run projects/customer-portal
npx ruviolta run projects/customer-portal/tests/login.ut
npx ruviolta run "@loginTest"
npx ruviolta run projects/customer-portal "@smoke,@critical"
npx ruviolta run projects/customer-portal --env production
npx ruviolta debug projects/customer-portal "@loginTest"
In PowerShell, quote arguments beginning with @.
Extension configuration
ruviolta.nodePath
Path to the Node.js executable used to run Ruviolta tests.
Default: node
ruviolta.runScript
Optional path to the Ruviolta CLI script. Leave this empty to auto-detect the Ruviolta installation in the workspace.
Default: auto-detect
Enables formatting for Ruviolta files.
ruviolta.diagnostics.enable
Enables syntax diagnostics for Ruviolta files.
Color themes
Ruviolta Dark
Ruviolta Light
Author
Georgi Todorov
License
ISC