Test Cases¶
This page covers end-to-end test procedures for the validation system, semantic chain detection, DRD compatibility checks, and template management. Use this as a QA checklist before pushing to ACC.
Prerequisites¶
- Backend running locally:
npm run devinpackages/backend - Frontend running locally:
npm run devinpackages/frontend - Active TriplyDB endpoint:
https://api.open-regels.triply.cc/datasets/stevengort/DMN-discovery/services/DMN-discovery/sparql ZorgtoeslagVoorwaardenCheck.ttluploaded to the test TriplyDB dataset (required for semantic chain tests)
Scenario 1 — Exact match chain (DRD-compatible)¶
Chain: SVB_LeeftijdsInformatie → SZW_BijstandsnormInformatie
Steps:
- Open Chain Builder
- Drag
SVB_LeeftijdsInformatieinto composer - Drag
SZW_BijstandsnormInformatiebelow it
Expected results:
- Console:
[SemanticLinks] ✓ Loaded 26 links (16 semantic) - Console:
[Validation] ✓ DRD | 0 missing | 0 semantic - Validation panel: green checkmark, "Chain is valid and ready to execute"
- Buttons: Execute, Save, Export all active
- Save modal: purple "🎯 DRD Template" badge, "Save as DRD" button
Scenario 2 — Semantic chain (sequential only)¶
Chain: ZorgtoeslagVoorwaardenCheck → berekenrechtenhoogtezorg
Steps:
- Clear composer
- Drag
ZorgtoeslagVoorwaardenCheckinto composer - Drag
berekenrechtenhoogtezorgbelow it
Expected results:
- Console:
[Validation] ⚠️ Sequential | 0 missing | 6 semantic - Six semantic match log entries for:
isIngezetene,heeftJuisteLeeftijd,betalingsregelingOK,vrijVanDetentie,heeftGeldigeVerzekering,inkomenBinnenGrenzen - Validation panel: amber warning, "Sequential execution required (semantic links)"
- Save modal: sequential template badge, no "Save as DRD" option
Scenario 3 — DRD save and execute¶
Continuation from Scenario 1 with a DRD-compatible chain:
- Click Save
- Enter name: "Test DRD" → click Save as DRD
- Wait for deployment success message with deployment ID (UUID format)
Verify localStorage:
const templates = JSON.parse(
localStorage.getItem('linkeddata-explorer-user-templates')
);
const endpoint = 'https://api.open-regels.triply.cc/...';
const testDrd = templates[endpoint].find(t => t.name === 'Test DRD');
console.log('drdDeploymentId:', testDrd.drdDeploymentId); // UUID
console.log('drdEntryPointId:', testDrd.drdEntryPointId); // dmn1_SZW_...
console.log('type:', testDrd.type); // "drd"
- Load the template from My Templates
- Fill
geboortedatum: 1960-01-01 - Click Execute → verify single API call in backend logs, results appear
Scenario 4 — Template system¶
- Build the SVB → SZW chain and save as DRD ("Chain A")
- Build the Zorg → Belasting semantic chain and save as sequential ("Chain B")
- Check My Templates: "Chain A" shows 🔗 DRD badge; "Chain B" shows no DRD badge
- Switch to a different endpoint: verify neither template appears (endpoint-scoped)
- Switch back: both templates reappear
- Delete "Chain A" from My Templates: verify it disappears from the list
Scenario 5 — BPMN Modeler + DRD linking¶
- Navigate to BPMN Modeler
- Open the Tree Felling Permit example
- Click the "Assess Felling Permit" BusinessRuleTask
- In the properties panel, click Link to DMN/DRD
- Verify two option groups appear: "🔗 DRDs" and "📋 Single DMNs"
- If a DRD was saved in Scenario 3, verify it appears in the DRDs group
- Select it: verify
camunda:decisionRefpopulates with thedmn1_prefixed identifier - Verify the purple DRD info card appears with the chain composition
Scenario 6 — Governance badges¶
- Open Chain Builder with an endpoint that has validation metadata
- Locate a DMN with
ronl:validationStatus "validated"in TriplyDB - Verify a green "✓ Gevalideerd" badge appears on the card
- Hover over the badge: verify tooltip shows organisation name and date
- Drag the card into composer: verify badge persists on the composer card
Scenario 7 — Vendor services¶
- Open Chain Builder with an endpoint that has vendor metadata
- Locate a DMN with an associated
ronl:VendorServicein TriplyDB - Verify a blue vendor count badge appears on the card
- Click the badge: verify modal opens with provider details
- Verify all links work (email, phone, service URL, homepage)
- Close modal via close button, backdrop click, and ESC key
Common issues¶
No semantic links loaded:
- Check TriplyDB for dct:subject integrity — must point to variable URI, not DMN URI
- Check skos:exactMatch URIs — must be identical between the two concepts
- Check dct:type values — case-sensitive, must match exactly
DRD deployment fails:
- Verify Operaton is accessible: curl https://operaton.open-regels.nl/engine-rest/version
- Check backend logs for specific Operaton error message
- Try removing the <dmndi:DMNDI> block from the generated XML temporarily
Validation shows amber for an exact-match chain:
- Open browser console, look for [Validation] log line
- If semantic > 0 despite visual identifier match, check for variable type mismatch in TriplyDB ("Boolean" vs "boolean")