Skip to content

Running Tests ​

Preview

Testing and the related agent skills are a preview feature. Details may change as we refine them.

Run One Spec ​

Use Compile + Run on the spec file in IDL for VSCode. To stop on errors while you work, add /debug to luna() or set debug in idltest.json. Use luna(/no_log) to skip writing a log file.

Run Everything with Sol ​

Sol finds the specs in a folder (using idltest.json when present), runs each one in a clean IDL process, and summarizes the results.

idl
s = sol('C:\path\to\repo')                        ; only needed if not next to idltest.json
passed = s.runTests()                             ; returns true if everything passed
passed = s.runTests(filter = 'strings')           ; only specs with "strings" in the path
result = s.runFile('C:\path\to\a.spec.pro')       ; one file
s.writeReport, 'results.xml'                      ; JUnit XML, or use .json
  • A passing file prints Processed file N of M in X.X s (path)
  • A failing file prints %FAILED% with Error: and Location:
  • An error in one file, like a syntax error, is recorded as %ERROR% and doesn't stop the others
  • no_restart on runTests reuses one IDL process

Each result has file, status (passed, failed, or error), passed, nTests, nFailed, duration, and message.

Run Tests with an Agent ​

The idl-run-tests skill has IDL Agent use the extension's tools to run a single spec or the full suite, then summarize the pass/fail result and each failure.

Troubleshooting ​

  • Check the log files first, they include a full traceback
  • If routines aren't found, check that your code is on IDL's path, then restart IDL
  • New or renamed files aren't seen by a running session, make sure to rRestart IDL after adding them or manually compile
  • Because Sol uses the IDL_IDLBridge, you may see errors that aren't real. Open an issue and we will take a look

Licensed under MIT.