0
0
Fork 0
Codesys-MCP-SP21-plus/tests/integration
Karstein Phobic Nyvold Kvistad 2c19eca4b3 test+docs(symbol-config): 10 vitest e2e prep tests + README + function-test entry
vitest tests/integration/e2e.test.ts:
  - 10 new template-prep assertions, one per Symbol Configuration tool.
    Each asserts no leftover {PLACEHOLDER} in the rendered script and
    that the relevant CODESYS API method names appear (get_all_signatures,
    application.create_symbol_config, configured_access, etc.).
  - Drive-by: fix the existing add_library e2e test that was missing the
    ALLOW_UNRESOLVED placeholder (added when the resolution gate landed
    in d414c77). Test was previously failing on /\{[A-Z_]+\}/ regex.

Suite is now 107/107 green (excluding the orphan .worktrees/phobics-tui
suite that's been failing pre-this-change).

README.md:
  - Tool count 31 -> 41.
  - New "Symbol Configuration Tools" section under Library Management
    with one row per tool.
  - Project-structure tool count footnote updated.

docs/function-test-2026-04-28.md:
  - Append "Symbol Configuration tools (added 2026-04-28 evening)" block
    with a per-tool vitest/live status grid.
  - Live SP22 column is deferred: the MCP tool list is negotiated at
    Claude Code session start and doesn't refresh mid-session, so the
    new tools aren't callable in the session that built them. Document
    the round-trip cycle so a fresh session can run it.
  - Note the SymbolAccess enum-value probe risk per the plan
    (docs/superpowers/plans/2026-04-28-symbol-config-tools.md).

Python 3 ast.parse run against all 10 new + 1 helper scripts -- 11/11
parsed cleanly (catches the obvious IronPython 2.7 syntax issues that
Py3 would also flag).
2026-04-28 23:52:34 +02:00
..
e2e.test.ts test+docs(symbol-config): 10 vitest e2e prep tests + README + function-test entry 2026-04-28 23:52:34 +02:00
README.md Initial release: MCP server for CODESYS with persistent UI instance 2026-02-08 18:59:16 +10:00

Manual CODESYS Integration Tests

These tests require a real CODESYS installation and cannot run in CI.

Prerequisites

  • CODESYS 3.5 SP19 or SP21 installed
  • No other CODESYS instances running
  • Node.js 18+

Steps

1. Build the package

npm run build

2. Test persistent mode

node dist/bin.js \
  --codesys-path "C:\path\to\CODESYS.exe" \
  --codesys-profile "CODESYS V3.5 SP21 Patch 3" \
  --mode persistent \
  --verbose

Verify:

  • CODESYS UI opens
  • Console shows "CODESYS watcher is ready"
  • The MCP server accepts connections

3. Test headless fallback

node dist/bin.js \
  --codesys-path "C:\path\to\CODESYS.exe" \
  --codesys-profile "CODESYS V3.5 SP21 Patch 3" \
  --mode headless

4. Test --detect flag

node dist/bin.js --detect

Verify: Lists installed CODESYS versions.

5. Ctrl+C shutdown

  • Press Ctrl+C during persistent mode
  • Verify CODESYS shuts down cleanly