Final design
The end-to-end test includes deviations from the plan. Which conditions ensure a valid result?
Testing only times that match the plan hides offline risks.
Starting point A new correction references the original entry and the reason.
Assumptions for the example case
A fictional maintenance operation with a defined qualification for each shift. The example requires 11 hours of rest between planned shifts; this is an exercise assumption and does not replace an employment-law review. All quantities, thresholds and operational objectives are illustrative assumptions.
Shift-planning architecture with test markers
Planning API and synchronization
The interface and offline app use the authenticated API endpoint; planning and time records remain separate modules sharing a datastore.
Test plan with expected outcomes
| Input and initial state | Expected result | Return to an earlier step |
|---|---|---|
| P-47 available → confirm two overlapping shifts in orders A/B and B/A | Exactly one confirmed; other conflict. | Step 5 |
| B-47 saved → Identical, then occurredAt change | One time entry remains; changing it causes a conflict. A correction is a separate operation. | Step 4 |
| Previous shift ends 16:00 → Next start 02:59:59 /03:00:00 /03:00:01 Next day | Only the first violates the 11 h rest period; qualification valid until 15:59:59 is insufficient, until 16:00 is sufficient. | Step 2 |
| Shift cancelled, real work reported → Import offline booking and check | Work remains preserved and in clarification; cancellation does not erase any actual time. | Step 5/9 |
P-47 available → confirm two overlapping shifts in orders A/B and B/A
- Expected result
- Exactly one confirmed; other conflict.
- Return to an earlier step
- Step 5
B-47 saved → Identical, then occurredAt change
- Expected result
- One time entry remains; changing it causes a conflict. A correction is a separate operation.
- Return to an earlier step
- Step 4
Previous shift ends 16:00 → Next start 02:59:59 /03:00:00 /03:00:01 Next day
- Expected result
- Only the first violates the 11 h rest period; qualification valid until 15:59:59 is insufficient, until 16:00 is sufficient.
- Return to an earlier step
- Step 2
Shift cancelled, real work reported → Import offline booking and check
- Expected result
- Work remains preserved and in clarification; cancellation does not erase any actual time.
- Return to an earlier step
- Step 5/9
End-to-end test and unresolved agreements
- First end-to-end path
- Confirm a shift with its qualification, test concurrency and the rest-period boundary, import offline times twice and resolve deviations from the plan through domain review.
- Clarify before real use
- Review actual working-time, privacy, collective-agreement and employee-participation rules, as well as time-zone handling, with operational and legal specialists.
The end-to-end test includes deviations from the plan.
Test a cancelled shift with work actually performed.
Testing only times that match the plan hides offline risks.
The eligibility check accepts exactly 11 h; revisit step 2. Synchronisation preserves one time entry; revisit steps 4 and 7.
- Alternative considered
- Happy Path does not provide proof.
- Trade-off
- Test needs separate plan and actual events.
- Reassess
- Further rules follow after proof.
Try it yourself
Identify the steps to revisit for rest-period and replay failures.
A hint for your attempt
Testing only times that match the plan hides offline risks.
Compare with a possible solution
- Rest period
- The eligibility check accepts exactly 11 h; revisit step 2.
- Replay
- Synchronisation preserves one time entry; revisit steps 4 and 7.
Apply to your project
How does this principle apply in your own project: The end-to-end test includes deviations from the plan.
Start your own design
Choose a small case from your project. The template collects the ten design tasks and leaves space for your sketches, decisions, and open assumptions. You can edit it in your text editor or note-taking app.
Download design template (.md)Compare the ten tasks with the example case
Purpose and boundary
How does this principle apply in your own project: Planned and actual work answer different questions.
In the example: Actual working times are preserved independently.
Requirements
How does this principle apply in your own project: Qualifications must cover the entire shift.
In the example: Validity through and including 16:00 is required.
Scale estimates
How does this principle apply in your own project: Check rest periods as time differences.
In the example: UTC instants make the time difference unambiguous.
Interfaces
How does this principle apply in your own project: Offline identifiers preserve the time entry.
In the example: Device and event identifiers form the deduplication key.
Data and states
How does this principle apply in your own project: Cancellation does not erase work performed.
In the example: The time account remains independent.
Overall architecture
How does this principle apply in your own project: One datastore supports two domain modules.
In the example: The modules remain separate within the relational datastore.
Critical flow
How does this principle apply in your own project: Resolve concurrency when confirming.
In the example: Commit interval and rest-period checks together with the allocation.
Bottlenecks and trade-offs
How does this principle apply in your own project: A synchronisation backlog does not establish that no work was done.
In the example: Measure device data age and event gaps.
Operations and security
How does this principle apply in your own project: Corrections remain auditable.
In the example: A new correction references the original entry and the reason.
Final design
How does this principle apply in your own project: The end-to-end test includes deviations from the plan.
In the example: Test a cancelled shift with work actually performed.