Setup
Preview
Testing and the related agent skills are a preview feature. Details may change as we refine them.
There isn't a one-click installer for testing. You have two ways to get set up: let an agent do it, or use the extension's commands and follow the manual steps below.
Configuration Files
Three files at the root of a folder control how the extension treats your IDL code. All of them have JSON schemas, so VS Code provides hover help, validation, and auto-complete while you edit.
| File | Purpose |
|---|---|
idlpackage.json | Package metadata and dependencies for the IDL Package Manager (IPM) |
idlformat.json | Code formatting and style |
idltest.json | How tests are found and run. See Configuration |
Option 1: Use Commands
Open the command palette (Ctrl + Shift + P) and run any of these. Each one prompts for the workspace folder and never overwrites an existing file:
IDL: Initialize Package Configcreatesidlpackage.jsonIDL: Initialize Formatting Configcreatesidlformat.jsonIDL: Initialize Test Configcreatesidltest.json
Pro Tip
You don't need to write idlpackage.json by hand. Use the command above, or ask an agent to generate it for you (see below).
Option 2: Ask an Agent
IDL Agent has skills that handle the setup for you:
| Skill | What it does |
|---|---|
idl-init-package | Creates idlpackage.json, idlformat.json, and idltest.json, a src folder, run-tests.pro, and .gitignore entries |
idl-test-setup | Prepares a repository to write and run tests: IDL's path, test layout, idltest.json, and the runner |
idl-write-tests | Writes spec files with Luna and explains the output |
idl-run-tests | Runs a spec or the whole suite and summarizes failures |
Example prompts:
- "Initialize this folder as a new IDL package called MyPackage"
- "Set up testing for this repository"
Manual Steps
If you'd rather set things up yourself, the agent skills follow these steps.
Choose a layout. Spec files end in
.spec.proand live next to the code:my-repo/ idltest.json run-tests.pro src/ my_routine.pro my_routine.spec.proCreate
idltest.jsonat the root (or use the command above). See Configuration.Create
run-tests.pronext toidltest.json:idlcompile_opt idl2 ; create test class - next to idltest.json s = sol() ; run all tests status = s.runTests() ; write summary to disk s.generateTestSummary endIgnore generated files. Add these to
.gitignore:*spec.pro.log *idl.test.log *idltest.logAdd your first spec and run it.