Testing a Join
What to test, with which cases, and why the ordinary path is the least useful thing to check.
Running it · Procedure
Integration testing usually confirms that a normal record crosses successfully, which is the case that was never going to fail.
The cases worth testing
A person who exists in one system and not the other.
A shift crossing midnight.
A mid-period leaver, and a mid-period starter.
A correction to a closed period.
A department that was renamed between the transfer and the import.
A duplicate transfer of the same file.
A file that is empty, and a file that is truncated.
Seven cases. Each one is a real incident somewhere, and each is a decision the interface makes silently.
The two that matter most
The duplicate transfer, which tests idempotency and determines whether every future failure is a rerun or a cleanup.
The truncated file, because an import that accepts eighty percent of a file and reports success is the failure mode that reaches payroll.
Test both deliberately — most implementations have tested neither.
Testing with real data
A copy of production, in a separate environment.
Which extends the processing of personal data and needs handling accordingly: anonymise where the awkward cases survive it, restrict access as tightly as production where they do not.
And include it in retention, because test environments accumulate copies that outlive their purpose.
What to test after changes
Any upgrade of either end.
Any configuration change to a calculation.
Any reference data restructure.
And annually regardless, because interfaces drift without anyone changing them — a field grows, a code list gains an entry, a volume doubles.
Recording it
What was tested, with which case, against what expected result, on what date.
Two lines per case.
"We tested the integration" is a claim; a dated list of seven cases with results is evidence, and the difference matters when a payment is questioned.
The rehearsal worth doing once
Break a join deliberately, in a test environment, and see how long it takes to notice.
If the answer is "at month end", the monitoring is the reconciliation and nothing else — which may be acceptable, and should be a decision rather than a discovery.
Test the truncated file
The case that reaches payroll.
An import that accepts eighty percent of a file and reports success is the failure mode this whole subject is about.
Send a deliberately truncated file in a test environment and see what happens.
Most implementations have never done this, and a meaningful share of them fail it.
Connect policy and data
The choices in this note can be compared with review this team workflow. Keep the written purpose in control and enable only the information needed at this boundary.
Independent reference
For a thematic point of reference, see OWASP. Its current material provides useful context beyond product documentation.