Tests
This page lists all automated tests included in the main repository. Each test validates a specific aspect of payroll behaviour — calendars, payrun calculation, retro pay, regulation inheritance, collectors, case data, and reports.
Tests are JSON files executed via the Payroll Console. They can be run individually or all at once:
# Run all tests
Tests/Test.all.pecmd
# Run a single test
<Test>/Test.pecmd
Tests marked with ⭐ are particularly useful as starting points or reference implementations.
For test methods, JSON formats, and authoring guidance see Payroll Testing.
Payrun Tests
Calendar
| Test |
Description |
| Calendar |
Standard Gregorian calendar — period boundaries and cycle transitions |
| LunisoralCalendar |
Lunisolar calendar — period calculation with non-Gregorian month boundaries |
| WeekCalendar |
Weekly calendar — period boundaries on week-based cycles |
Payrun
| Test |
Description |
| Payrun |
Basic payrun execution — wage type evaluation, result storage and assertion |
| PayrunActions ⭐ |
No-Code action syntax — conditional, lookup, range-lookup, duplicate, cycle aggregation |
| PayrunEdge |
Date boundary and temporal edge cases — period splits, overlap, eval-date boundaries, forecast |
| IncrementalPayroll |
Full vs. Incremental jobResult modes |
| WageTypeRestart |
Wage type calculation restart — downstream wage types re-evaluated after restart |
| ForecastPayroll |
Forecast payrun — future evaluation date with not-yet-active case values |
| ConsolidatedPayroll |
YTD accumulation via GetConsolidatedWageTypeResults across three consecutive months |
| Culture |
Culture-sensitive payrun — number/date formatting, culture propagation into scripting |
| Lookup |
Lookup value access — key-based, range-based, missing keys, boundary values |
Retro
| Test |
Description |
| RetroPayroll |
Automatic retro payrun — case value change in a past period triggers correction jobs |
| RetroManualPayroll |
Manually scheduled retro payrun jobs |
| RetroPayMode |
retroPayMode None vs. ValueChange — controls whether retro sub-runs are created |
| ConsolidatedEdge |
NoRetro flag on GetConsolidatedWageTypeResults — retro vs. main-run value isolation |
| PayrunTag |
GetWageTypeResults tag filter — tagged retro sub-run results isolated from untagged results |
Regulation
| Test |
Description |
| DerivedPayroll |
Two-layer regulation inheritance — override, deactivate, lookup override |
| CountryPayroll |
Country-specific C# extension functions via custom FunctionRegister |
| VersionPayroll |
Regulation versioning — correct version applied based on evaluation date |
| VersionEdge |
validFrom boundary — same-day activation (<=) and future version exclusion |
Collector
| Test |
Description |
| Collector |
Collector features — multi-source accumulation, maxResult, minResult, negated |
| Aggregation |
PeriodAggregation modes — Summary, Last, First for overlapping Period values |
Case & Data
| Test |
Description |
| Cancellation |
Case cancellation modes — Keep, Reset, Invert, Previous across Integer, Decimal, Boolean |
| CaseScope |
National, Company, and Employee case scope isolation — scope-correct resolution per wage type |
| Timeless |
Timeless case fields — stable across periods, null-safe when absent, latest-created wins |
| MultiDivision |
Division-scoped case values — same employee, two divisions, each resolves its own salary |
| TimeTracking |
Time tracking integration — hourly rates applied to tracked hours via custom script |
| WageTracingPayroll |
Wage traceability via clusterSetWageTypePeriod — one custom result per time-split per wage type |
Payrun Employee Tests
| Test |
Description |
| PayrunEmployee |
Multi-employee payrun — salary splits, bonus stacking, collectors across 7 months |
Payrun Employee Preview Tests
| Test |
Description |
| PayrunEmployeePreview |
Same scenario as PayrunEmployee — preview mode, no DB persistence, results must match |
Case Tests
| Test |
Description |
| Case |
Case lifecycle — availability, build (field derivation), validate |
Report Tests
| Test |
Description |
| Report |
Report pipeline — build (output parameters) and execute (DataTable row assertions) |