A Visual Studio Code extension for running and exploring OpenEdge ABL unit tests using OEUnit with a persistent test server.
- Persistent Test Server: Long-running OpenEdge process for faster test execution — one server per project in multi-project workspaces
- Test Explorer Integration: Browse all test files and methods in VS Code's native Testing view
- Run Tests: Execute individual test files, test methods, or all tests in a folder
- Test Results View: Per-method pass/fail/skip status with timing, summary footer, and scoped output — populated for all run paths
- Copilot Chat Integration: Run tests and retrieve results directly from GitHub Copilot Chat using
#oeunit_runTest,#oeunit_runFolder, and#oeunit_getLastResultstools - Export Test Results: Save results as JUnit XML (CI-compatible) or JSON via the
OEUnit: Export Test Results…command - Test Discovery: Automatically discovers test files matching the configured pattern, including inherited
@Testmethods viaINHERITS - Multi-project Support: One isolated OEUnit server per workspace folder with automatic port assignment
- Server Management: Commands to start, stop, restart, kill, and ping the test server — per-project or for all projects at once
- Status Bar: Visual indicator showing current server status
- Auto-restart on Config Changes: Server automatically restarts when settings change
- Database Support: Automatic database connection and alias configuration
- JSONC Support:
openedge-project.jsonmay contain//and/* */comments
- Visual Studio Code 1.85.0 or higher
- Node.js and npm installed
- OpenEdge ABL development environment
- OEUnit testing framework installed
Configure the extension in your workspace .vscode/settings.json:
{
"oeunit.exec": "_progres.exe",
"oeunit.oeargs": "-cpinternal utf-8 -cpstream utf-8 -cpcoll Basic -cpcase Basic",
"oeunit.testFilePattern": "**/test/**/*.cls",
"oeunit.port": 5555,
"oeunit.portEnd": 6000,
"oeunit.timeout": 60,
"oeunit.loglevel": "error",
"oeunit.autostart": true
}- oeunit.exec: OpenEdge executable name (default:
_progres.exe) - oeunit.oeargs: OpenEdge startup arguments (can include INI file with PROPATH definition)
- oeunit.testFilePattern: Glob pattern to match test files (default:
**/test/**/*.cls) - oeunit.port: Starting port for the OEUnit server(s). In multi-project workspaces each project is assigned
port + index. A per-folder workspace setting overrides auto-assignment for that specific project. (default:5555) - oeunit.portEnd: Upper bound for the auto-assigned port range (default:
6000) - oeunit.timeout: Socket timeout in seconds (default:
60) - oeunit.loglevel: Server log level —
info,warning, orerror(default:error) - oeunit.autostart: Automatically start the OEUnit server on activation (default:
true) - oeunit.environmentVariables: Custom environment variables when starting the Progress executable (default:
{}). Example:{"WRKDIR": "C:\\temp"} - oeunit.projectPaths: Explicit list of project root folder paths. When non-empty, overrides automatic discovery — only these folders are used. Use the OEUnit: Add Project Folder… command to populate this list.
- oeunit.workspaceFolder: (Deprecated) No longer used. Project discovery now happens automatically.
All settings support per-folder overrides in a multi-root workspace via the VS Code Settings UI.
The extension requires an openedge-project.json file in your workspace root with:
oeversion: OpenEdge version name (must match a runtime configured inabl.configuration.runtimes)buildPath: Array of PROPATH entries for your projectdbConnections: Array of database connection configurations with optional aliases
JSONC: openedge-project.json may contain // line comments and /* */ block comments — the extension strips them before parsing, matching the ABL Language Server's behaviour.
IMPORTANT: The OEUnit library must be available in the PROPATH. You can achieve this either by:
- Adding the OEUnit path to the
buildPathinopenedge-project.json, or - Specifying an INI file in
oeunit.oeargsthat defines the PROPATH (e.g.,-ini C:\path\to\startup.ini)
- Open the Test Explorer view in VS Code's activity bar (beaker icon)
- The extension will automatically discover test files matching your pattern
- Click the refresh icon (🔄) to manually refresh the test list
- Click the play icon (
▶️ ) next to a test file or method to run it - Click "Run All Tests" in the view title to run all discovered tests
On the first test run the server will start automatically if it has not been started yet — no prompt is shown.
The extension discovers test methods by looking for:
- Methods with the
@Testannotation - Methods whose names start with "test" (case-insensitive)
- Inherited methods from parent classes via
INHERITS
Example test class:
CLASS TestExample:
@Test.
METHOD PUBLIC VOID testSomething():
Assert:Equals(1, 1).
END METHOD.
METHOD PUBLIC VOID testAnotherThing():
Assert:IsTrue(TRUE).
END METHOD.
END CLASS.After a test run, results appear in two places:
- Test Results panel (
View > Test Results): per-method pass/fail/skip lines with timing, a summary footer (Total / Passed / Failed / Skipped), and detailed failure messages. Click a method in the Test Explorer to see only its output. - OEUnit Test Runner output channel: full execution log.
Three tools are available as Copilot Chat references (add them via Configure Tools in the chat input):
| Tool | Description |
|---|---|
#oeunit_runTest |
Run a .cls test file or a single method. Returns JSON with Status, Summary, and TestCases. |
#oeunit_runFolder |
Discover and run all test files under a folder. Returns per-file and aggregate results. |
#oeunit_getLastResults |
Retrieve cached results from the most recent run without re-running. Works for Test Explorer runs too. |
Example chat prompt:
Run the tests in
C:\project\test\TestFilling.clsand summarise the failures.
Use OEUnit: Export Test Results… from the Command Palette to save the most recent cached results as:
- JUnit XML — accepted by Jenkins, Azure DevOps, GitHub Actions, and most CI tools
- JSON — easy to share with Copilot Chat for analysis (
#oeunit_getLastResultsalso provides this directly)
The extension runs a persistent OpenEdge process to execute tests faster. In multi-project workspaces, one server process is started per project folder.
- $(loading~spin) OEUnit: Starting... — Server is starting up
- $(check) OEUnit: Running — Server is ready and accepting test requests
- $(circle-slash) OEUnit: Stopped — Server is not running (yellow background)
- $(error) OEUnit: Error — Server encountered an error (red background)
Click the status bar item to quickly restart the server.
Accessible via the Command Palette (Ctrl+Shift+P):
- OEUnit: Start Server — Start the server (prompts for project in multi-project workspaces)
- OEUnit: Stop Server — Gracefully stop the server
- OEUnit: Restart Server — Restart the server
- OEUnit: Kill Server — Force-kill the server process immediately
- OEUnit: Ping Server — Verify the server is responding
- OEUnit: Start All Servers (multi-project) — Start all project servers
- OEUnit: Stop All Servers (multi-project) — Stop all project servers
- OEUnit: Restart All Servers (multi-project) — Restart all project servers
- OEUnit: Add Project Folder… — Open a folder picker to add a path to
oeunit.projectPaths
- OEUnit: Export Test Results… — Save the most recent test results as JUnit XML or JSON
- OEUnit: Run Test (from Chat) — Headless test execution for agents and automation scripts
- Extension activates when workspace contains
.clsor.pfiles - Project discovery finds all workspace folders with
openedge-project.json - Server starts automatically (one per project) using the configured OpenEdge runtime
- Tests discovered by scanning for files matching the test file pattern
- Running a test sends a JSON request to the server via TCP socket
- Server executes the test and returns results as JSON
- Extension updates the Test Explorer tree, the Test Results panel, and the results cache
- Verify all required settings are configured (
oeunit.exec,oeunit.oeargs) - Ensure
openedge-project.jsonexists with validoeversionand OEUnit in thebuildPath - Check that the OpenEdge runtime is configured in
abl.configuration.runtimes - Verify OEUnit library is in PROPATH (either via
buildPathor INI file) - If
openedge-project.jsoncontains comments, ensure they use//or/* */style (JSONC) - Review the OEUnit Server output channel for detailed errors
- Check that your test files match the configured
oeunit.testFilePattern - Verify the files contain test methods (
@Testannotation or names starting withtest) - Click the refresh button (🔄) in the Testing view
- The server starts automatically on the first run — wait for it to be ready
- If it was previously running and has since stopped, use OEUnit: Start Server
- Use OEUnit: Ping Server to verify the server is responding
- If the server appears stuck, use OEUnit: Kill Server, then start it again
If port 5555 is in use, change oeunit.port to a free port and restart the server. In multi-project workspaces the extension auto-assigns ports in the range [oeunit.port … oeunit.portEnd]; the first available port is used per project.
npm run watchPress F5 to launch the Extension Development Host.
This extension is provided as-is for local development use.
For issues or questions, please contact your development team.
{
"oeunit.exec": "_progres.exe",
"oeunit.oeargs": "-cpinternal utf-8 -cpstream utf-8 -cpcoll Basic -cpcase Basic",
"oeunit.testFilePattern": "**/test/**/*.cls",
"oeunit.port": 5555,
"oeunit.timeout": 60,
"oeunit.loglevel": "error",
"oeunit.autostart": true
}- oeunit.exec: OpenEdge executable name (default:
_progres.exe) - oeunit.oeargs: OpenEdge startup arguments (can include INI file with PROPATH definition)
- oeunit.testFilePattern: Glob pattern to match test files (default:
**/test/**/*.cls) - oeunit.port: Port number for the persistent test server (default:
5555) - oeunit.timeout: Socket timeout in seconds for client connections and server reads (default:
60) - oeunit.loglevel: Server log level -
info,warning, orerror(default:error) - oeunit.workspaceFolder: Workspace folder path to use for OEUnit server. If not specified, defaults to the first workspace folder. Useful in multi-root workspace scenarios
- oeunit.autostart: Automatically start the OEUnit server when the extension activates (default:
true) - oeunit.environmentVariables: Object containing custom environment variables to set when starting the Progress executable (default:
{}). These variables can override DLC and PROPATH if needed. Example:{"WRKDIR": "C:\\temp", "HTTPS_PROXY": "http://proxy:8080"}
The extension requires an openedge-project.json file in your workspace root with:
oeversion: OpenEdge version name (must match a runtime configured inabl.configuration.runtimes)buildPath: Array of PROPATH entries for your projectdbConnections: Array of database connection configurations with optional aliases
IMPORTANT: The OEUnit library must be available in the PROPATH. You can achieve this either by:
- Adding the OEUnit path to the
buildPathinopenedge-project.json, or - Specifying an INI file in
oeunit.oeargsthat defines the PROPATH (e.g.,-ini C:\path\to\startup.ini)
- Open the Test Explorer view in VS Code's activity bar
- The extension will automatically discover test files matching your pattern
- Click the refresh icon (🔄) to manually refresh the test list
- Click the play icon (
▶️ ) next to a test file to run that file's tests - Click "Run All Tests" (
▶️ ▶️ ) in the view title to run all discovered tests
The extension discovers test methods by looking for:
- Methods with the
@Testannotation - Methods whose names start with "test" (case-insensitive)
Example test class:
CLASS TestExample:
@Test.
METHOD PUBLIC VOID testSomething():
Assert:Equals(1, 1).
END METHOD.
METHOD PUBLIC VOID testAnotherThing():
Assert:IsTrue(TRUE).
END METHOD.
END CLASS.- Test execution output appears in the OEUnit Test Runner output channel
- Test status icons update after each run:
- ○ Pending (not run)
- ✓ Passed (green)
- ✗ Failed/Error (red)
The extension runs a persistent OpenEdge process to execute tests faster. The status bar shows the current server state.
- $(loading~spin) OEUnit: Starting... - Server is starting up
- $(check) OEUnit: Running - Server is ready and accepting test requests
- $(circle-slash) OEUnit: Stopped - Server is not running (yellow background)
- $(error) OEUnit: Error - Server encountered an error (red background)
Click the status bar item to quickly restart the server.
The extension provides the following commands (accessible via Command Palette: Ctrl+Shift+P):
- OEUnit: Start Server - Start the persistent test server
- OEUnit: Stop Server - Gracefully stop the persistent test server
- OEUnit: Restart Server - Restart the persistent test server
- OEUnit: Kill Server - Force-kill the server process immediately (use when Stop Server hangs)
- OEUnit: Ping Server - Send PING to server to verify it's responding
- Tests are run through the native VS Code Testing view (beaker icon in the Activity Bar)
- Click the play button next to any test file or method to run it
- Use the "Run All Tests" button in the Testing view toolbar
- Extension activates when workspace contains
.clsor.pfiles - Server starts automatically using configured OpenEdge runtime
- Server listens on configured port for test requests
- Tests discovered by scanning for files matching the pattern
- Running a test sends request to server via TCP socket with JSON message
- Server executes test and returns results via JSON response
- Extension parses JSON and updates test results in UI
Check the Developer Tools Console (Help > Toggle Developer Tools) for detailed logs:
- Verify all required settings are configured (
oeunit.exec,oeunit.oeargs) - Ensure
openedge-project.jsonexists with validoeversionand OEUnit in thebuildPath - Check that the OpenEdge runtime is configured in
abl.configuration.runtimes - Verify OEUnit library is in PROPATH (either via
buildPathor INI file) - Review the OEUnit Server output channel for startup errors
- Check that your test files match the configured
oeunit.testFilePattern - Verify the files contain test methods (methods starting with "test" or with
@Testannotation) - Click the refresh button (🔄) in the Testing view
- On the first test run, the server will start automatically if it has never been started in the current session
- If the server was previously running but has since stopped, use OEUnit: Start Server to restart it
- Check the status bar - server should show "Running" status
- Use OEUnit: Ping Server command to verify server is responding
- If the server appears stuck, use OEUnit: Kill Server to force-kill it, then start it again
- Review the OEUnit Server output channel for errors
- Ensure OEUnit library is in PROPATH (via
buildPathinopenedge-project.jsonor INI file) - Check that database connection strings in
openedge-project.jsonare valid - Verify
oeunit.oeargsare properly formatted
If port 5555 is already in use, change oeunit.port to a different value and restart the server.
For development with automatic recompilation:
npm run watchPress F5 to launch the Extension Development Host.
None currently known. Individual test methods can now be run independently.
This extension is provided as-is for local development use.
For issues or questions, please contact your development team.