Add tests for Kommunikation Sync implementation and verification scripts
- 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.
This commit is contained in:
67
bitbylaw/scripts/kommunikation_sync/README.md
Normal file
67
bitbylaw/scripts/kommunikation_sync/README.md
Normal file
@@ -0,0 +1,67 @@
|
||||
# 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
|
||||
|
||||
```bash
|
||||
cd /opt/motia-app/bitbylaw
|
||||
python scripts/kommunikation_sync/test_kommunikation_api.py
|
||||
```
|
||||
|
||||
## Verwandte Dokumentation
|
||||
|
||||
- [../../docs/SYNC_OVERVIEW.md](../../docs/SYNC_OVERVIEW.md#kommunikation-sync) - Vollständige Dokumentation
|
||||
- [../../services/kommunikation_sync_utils.py](../../services/kommunikation_sync_utils.py) - Implementierung
|
||||
Reference in New Issue
Block a user