ArchiMate Quick Test Reference
๐ One-Line Full Testโ
cd /home/rubenlinde/nextcloud-docker-dev && docker-compose exec nextcloud php /var/www/html/apps-extra/softwarecatalog/compare_archimate.php
This command will:
- โ Import the GEMMA_release.xml file
- โ Export the imported data
- โ Compare original vs exported XML
- โ Report any differences found
- โ
Save detailed report to
/tmp/archimate_comparison_report.json
๐ Quick Commandsโ
Import Testโ
docker-compose exec nextcloud curl -X POST "http://localhost/index.php/apps/softwarecatalog/api/archimate/import" -H "Content-Type: application/json" -u admin:admin -d '{"file_path": "/var/www/html/apps-extra/softwarecatalog/lib/Settings/GEMMA_release.xml"}'
Export Testโ
docker-compose exec nextcloud curl -X POST "http://localhost/index.php/apps/softwarecatalog/api/archimate/export" -H "Content-Type: application/json" -u admin:admin -d '{}' > /tmp/test_export.xml
Database Inspectionโ
docker-compose exec nextcloud php /var/www/html/apps-extra/softwarecatalog/debug_db.php
Clear Statusโ
docker-compose exec nextcloud curl -X POST "http://localhost/index.php/apps/softwarecatalog/api/archimate/import/cancel" -u admin:admin
๐ฏ Expected Resultsโ
Perfect Round-Tripโ
=== COMPARISON REPORT ===
Total differences found: 0
Elements compared: 2765
Relationships compared: 5696
Views compared: 242
Property definitions compared: 77
Folders compared: X
๐ NO DIFFERENCES FOUND! Perfect round-trip compatibility achieved!
Import Successโ
{
"success": true,
"statistics": {
"elements": {"created": 2765, "updated": 0, "skipped": 0},
"organizations": {"created": 71, "updated": 0, "skipped": 0},
"relationships": {"created": 5696, "updated": 0, "skipped": 0},
"views": {"created": 242, "updated": 0, "skipped": 0},
"property_definitions": {"created": 77, "updated": 0, "skipped": 0}
}
}
๐ง Troubleshootingโ
If Import Failsโ
- Check file exists:
docker-compose exec nextcloud ls -la /var/www/html/apps-extra/softwarecatalog/lib/Settings/GEMMA_release.xml - Clear status:
docker-compose exec nextcloud curl -X POST "http://localhost/index.php/apps/softwarecatalog/api/archimate/import/cancel" -u admin:admin - Check logs:
docker-compose exec nextcloud tail -n 50 /var/www/html/data/nextcloud.log
If Export is Emptyโ
- Verify import worked:
docker-compose exec nextcloud php /var/www/html/apps-extra/softwarecatalog/debug_db.php - Check object counts in database
- Re-run import if needed
If Comparison Shows Differencesโ
- Check specific sections (elements, relationships, etc.)
- Look for patterns in the differences
- Verify property definitions are correct
- Check source/target values in relationships
๐ File Sizes Referenceโ
- GEMMA_release.xml: ~13MB (254,814 lines)
- Exported XML: Should be similar size
- Comparison report: JSON file with detailed differences
๐ Manual Inspection Commandsโ
# Check first 50 lines of export
docker-compose exec nextcloud head -n 50 /tmp/test_export.xml
# Count elements
docker-compose exec nextcloud grep -c '<element ' /tmp/test_export.xml
# Count relationships
docker-compose exec nextcloud grep -c '<relationship ' /tmp/test_export.xml
# Check specific element
docker-compose exec nextcloud grep -A 10 'id-009fa62f25844aa3a87d252bf2b6bb0c' /tmp/test_export.xml