Skip to main content

Test Suites

The Test Suites window (Tools → Test Suites) is the management hub for Lua test scripts.

Test Suites Window

Window Layout​

AreaDescription
ToolbarHost, Port, Variant fields + Run/Stop/Report buttons
Tree panel (left)Workspace and test hierarchy
Code editor (center)Lua script editor with syntax highlighting and LSP diagnostics
Results panel (bottom)Test step results, log output, duration

Toolbar​

Test Suites Toolbar

ControlDescription
HostController hostname/IP for session:Connect()
PortTCP port for session:Connect()
VariantProtocol variant dropdown
RunExecute the selected test
Run AllExecute all tests in the current workspace sequentially
Stop AllCancel all running tests
Generate ReportExport results (HTML, JSON, JUnit XML)
Unrestricted LuaToggle sandbox mode for the workspace

Workspaces​

Tests are organized into workspaces (folders on disk). Right-click the tree to manage:

ActionDescription
New WorkspaceCreate a new test folder
Rename WorkspaceRename a workspace
Delete WorkspaceDelete workspace and all its tests
New TestCreate a new Lua test script
Rename TestRename a test
Delete TestDelete a test script
ImportImport .lua or .zip files into a workspace
ExportExport workspace as a .zip archive

File Storage​

Tests are stored at:

%APPDATA%\Haller + Erne GmbH\heOPTester\Tests\
├── MyWorkspace/
│ ├── test1.lua
│ ├── test1.lua.meta ← metadata sidecar
│ ├── test2.lua
│ └── test2.lua.meta

Metadata Sidecar​

Each test has an optional .lua.meta JSON file storing:

FieldDescription
nameDisplay name
descriptionTest description
tagsCategorization tags
defaultToolConfigOverride host/port/variant for this test
lastResultLast run status
lastRunTimestamp of last run
runHistoryLast 20 run results

Code Editor​

Code Editor

The editor features:

FeatureDescription
Syntax highlightingLua syntax coloring
Error markersRed dots and underlines for syntax errors (from lua-language-server)
AutocompleteMethod/property suggestions for session, log, assert
TooltipsHover over API methods to see signatures and descriptions
Find/ReplaceCtrl+F for find, Ctrl+H for replace
Code foldingCollapse/expand function/if/for blocks
Status barLine/column, total lines, diagnostic message for current line

LSP Setup​

The editor uses lua-language-server for real-time diagnostics. The language server is installed automatically by the application installer — no manual setup is required.

Running Tests​

Single Test​

  1. Select a test in the tree
  2. Click Run (or right-click → Run)

All Tests in Workspace​

  1. Select a workspace in the tree
  2. Click Run All

Concurrent Runs​

Up to 5 tests can run simultaneously. Each gets its own TCP connection and log.

Test Status​

StatusMeaning
RunningTest is executing
PausedStopped at a log:Break() breakpoint
PassedAll steps completed without assertion failures
FailedAn assertion failed or a timeout occurred
ErrorA Lua runtime error or unexpected exception
CancelledUser clicked Stop

Test Results​

Test Results

Each test run shows:

  • Steps: Each log:Step() call with its own pass/fail
  • Duration: Total execution time
  • Log: Full log output (Info, Warn, Error, Debug messages)

Generating Reports​

After running tests, click Generate Report to export:

FormatDescription
HTMLHuman-readable report with color-coded log output
JSONMachine-readable results with full log entries
JUnit XMLCI/CD integration (Jenkins, GitHub Actions)

All formats include the complete log output from the test run.

Custom HTML Templates​

Place a report_template.html at %APPDATA%\Haller + Erne GmbH\heOPTester\ with these placeholders:

PlaceholderReplaced With
{{TITLE}}Report title
{{GENERATED}}Generation timestamp
{{CONTENT}}Test results HTML

Creating Tests from Logs​

  1. Capture traffic in the main log panel
  2. Go to Tools → Create Test from Log
  3. Configure:

Create Test from Log

OptionDescription
Include assertionsGenerate assert:Equals for responses
Include timing delaysAdd timing comments
Default timeoutTimeout for WaitForMid() calls (default 5000ms)
Test nameFunction name (defaults to main)
  1. Preview the generated script
  2. Save to a workspace

The wizard automatically:

  • Generates Connect() + Handshake() from MID 0001/0002 pairs
  • Converts sent messages to SendMid() or SendRaw()
  • Adds WaitForMid() for responses
  • Detects disconnect/reconnect cycles
  • Skips keep-alive messages (MID 9998/9999)