reset_application (warm/cold/origin), read_variables, write_variables, force_variables, unforce_variables, list_forced_variables, create_boot_application (online/offline), source_download, source_upload, plc_file_list, plc_file_transfer, plc_file_delete. API per SP21 ScriptOnline.pyi (ScriptOnlineApplication/ScriptOnlineDevice); semantics cross-checked against helpme-codesys.com/en/ScriptingEngine/ScriptOnline.html. Plan: docs/superpowers/plans/2026-06-12-sp21-api-coverage.md (phase 1). |
||
|---|---|---|
| .. | ||
| e2e.test.ts | ||
| online-tools-prep.test.ts | ||
| README.md | ||
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