Data-driven testing process
This connector test process uses two-pass account aggregation scenarios with reusable JSON data files.
Goals
- Keep test inputs editable by humans (JSON files).
- Re-run pass1/pass2 deterministically with the same data.
- Capture generated outputs and side effects for review.
Scenario structure
Each scenario lives under test-data/scenarios/<scenario-id>/ and includes:
scenario.manifest.jsonconfig.jsonidentities.jsonmanagedAccounts.pass1.jsonforms.pass1.jsonmanagedAccounts.pass2.jsonforms.pass2.json
Generated artifacts:
output.pass1.generated.jsonoutput.pass2.generated.jsonsideEffects.pass1.generated.jsonsideEffects.pass2.generated.json
Expected golden artifacts:
output.pass1.expected.jsonoutput.pass2.expected.json
Execution
Run the scenario runner:
node test-data/scenarios/scenarioRunner.js "test-data/scenarios/std-account-list-001"
Run tests:
npm test -- src/operations/__tests__/accountList.test.ts src/operations/__tests__/scenarioRunner.smokeMatrix.test.ts src/services/fusionService/__tests__/fusionService.test.ts
Required assertions
- Pass1 should create potential/candidate matching state without over-correlation.
- Pass2 should apply submitted decisions deterministically.
- Correlation/unmatched counts and disable side effects should be stable for each run.
- Single-account operation tests remain isolated from accountList lifecycle tests.