- Implemented comprehensive tests for the Kommunikation Sync functionality, covering base64 encoding, marker parsing, creation, type detection, and integration scenarios. - Added a verification script to check for unique IDs in Advoware communications, ensuring stability and integrity of the IDs. - Created utility scripts for code validation, notification testing, and PUT response detail analysis to enhance development and testing processes. - Updated README with details on new tools and their usage.
1.7 KiB
1.7 KiB
Kommunikation Sync - Test Scripts
Test-Scripts für die Kommunikation (Phone/Email/Fax) Synchronisation.
Scripts
test_kommunikation_api.py
Vollständiger API-Test für Advoware Kommunikation-Endpoints.
Testet:
- POST /Kommunikationen (CREATE)
- PUT /Kommunikationen (UPDATE)
- DELETE /Kommunikationen (gibt 403 - erwartet)
- kommKz-Werte (1-12)
- Alle 4 Felder (tlf, bemerkung, kommKz, online)
test_kommunikation_sync_implementation.py
Test der bidirektionalen Sync-Implementierung.
Testet:
- 6 Sync-Varianten (Var1-6)
- Base64-Marker System
- Hash-basierte Change Detection
- Empty Slots (DELETE-Workaround)
- Konflikt-Handling
test_kommunikation_matching_strategy.py
Test verschiedener Matching-Strategien.
Testet:
- Base64-Marker Matching
- Value-Matching für Initial Sync
- kommKz Detection (4-Stufen)
- Edge Cases
test_kommunikation_kommkz_deep.py
Deep-Dive Test für kommKz-Enum.
Testet:
- Alle 12 kommKz-Werte (TelGesch, Mobil, Email, etc.)
- kommKz=0 Bug in GET (Advoware)
- kommKz READ-ONLY bei PUT
test_kommunikation_readonly.py
Test für Read-Only Felder.
Testet:
- kommKz kann bei PUT nicht geändert werden
- Workarounds für Type-Änderungen
test_kommart_values.py
Test für kommArt vs kommKz Unterschiede.
verify_advoware_kommunikation_ids.py
Verifiziert Kommunikation-IDs zwischen Systemen.
Verwendung
cd /opt/motia-app/bitbylaw
python scripts/kommunikation_sync/test_kommunikation_api.py
Verwandte Dokumentation
- ../../docs/SYNC_OVERVIEW.md - Vollständige Dokumentation
- ../../services/kommunikation_sync_utils.py - Implementierung