{
  "test_id": "ORCL.HCM.PAYROLL.CALCULATE",
  "scenario_name": "Payroll Calculation",
  "application": "Oracle Fusion Cloud",
  "product": "HCM",
  "module": "Payroll",
  "process": "Payroll Calculation",
  "business_flow": "Hire-to-Pay",
  "scenario_type": "Positive / Functional",
  "priority": "High",
  "automation_status": "SyntraFlow Ready",
  "library": "Syntra Standard",
  "canonical_url": "https://www.syntraflow.cloud/oracle-erp-testing-tool/test-library/hcm/payroll/payroll-calculation/",
  "objective": {
    "intro": "This test validates that Oracle Fusion Payroll correctly calculates payroll for eligible workers, applying configured earnings, allowances and deduction elements to produce accurate gross pay, deduction and net-pay results for the selected payroll period.",
    "confirms": [
      "eligible workers are included in the payroll calculation for the selected payroll period",
      "configured earnings and allowance elements are calculated correctly for each worker",
      "configured deduction elements are applied correctly for each worker",
      "Gross Pay minus Deductions equals Net Pay for each calculated worker — Gross Pay − Deductions = Net Pay",
      "the payroll calculation completes with the expected calculation status",
      "calculated results are retrievable and consistent with the underlying element entries"
    ],
    "scope_note": "This scenario validates the core Payroll Calculation process for workers already enrolled in payroll with the required element entries in place. Upstream element-entry setup, downstream payment processing and payslip generation are covered by separate test scenarios within the same Hire-to-Pay business flow."
  },
  "preconditions": [
    "A valid payroll definition and payroll period are configured and open for calculation.",
    "The worker is enrolled in the payroll and has an active payroll relationship.",
    "Required element entries, such as salary, earnings, allowances and deductions, are in place for the worker.",
    "Applicable tax and statutory deduction setup is available for the worker's legislation.",
    "Where required, timecard or absence data affecting pay has been entered and approved.",
    "The test user has the appropriate Payroll role and access to run and review calculations."
  ],
  "test_data": [
    {
      "field": "Payroll",
      "example": "${PAYROLL}"
    },
    {
      "field": "Pay Period",
      "example": "${PAY_PERIOD}"
    },
    {
      "field": "Worker",
      "example": "${WORKER}"
    },
    {
      "field": "Salary",
      "example": "${SALARY}"
    },
    {
      "field": "Earnings",
      "example": "${EARNINGS}"
    },
    {
      "field": "Allowances",
      "example": "${ALLOWANCES}"
    },
    {
      "field": "Deductions",
      "example": "${DEDUCTIONS}"
    },
    {
      "field": "Element Entries",
      "example": "${ELEMENT_ENTRIES}"
    },
    {
      "field": "Tax Context",
      "example": "${TAX_CONTEXT}"
    },
    {
      "field": "Effective Date",
      "example": "${EFFECTIVE_DATE}"
    }
  ],
  "business_steps": [
    {
      "step_number": 1,
      "step_name": "Sign In to Oracle Fusion Payroll",
      "action": "Sign in to Oracle Fusion Cloud with a user account that has Payroll calculation access.",
      "test_data": "",
      "expected_result": "The Oracle Fusion Cloud home page loads successfully for the authenticated user.",
      "validation_type": "action"
    },
    {
      "step_number": 2,
      "step_name": "Navigate to Payroll",
      "action": "Navigate to the Payroll area used to run and review payroll calculations.",
      "test_data": "",
      "expected_result": "The Payroll work area opens successfully.",
      "validation_type": "action"
    },
    {
      "step_number": 3,
      "step_name": "Locate the Worker's Payroll Calculation",
      "action": "Locate the eligible worker within the selected payroll and payroll period.",
      "test_data": "${WORKER} / ${PAYROLL} / ${PAY_PERIOD}",
      "expected_result": "The worker is found and is eligible for calculation in the selected payroll period.",
      "validation_type": "action"
    },
    {
      "step_number": 4,
      "step_name": "Review Earnings and Deduction Elements",
      "action": "Review the earnings, allowance and deduction element entries configured for the worker.",
      "test_data": "${ELEMENT_ENTRIES}",
      "expected_result": "The reviewed element entries are complete and consistent with the worker's compensation setup.",
      "validation_type": "action"
    },
    {
      "step_number": 5,
      "step_name": "Initiate or Verify Calculation",
      "action": "Initiate the payroll calculation for the worker, or verify the results of an existing scheduled calculation, for the selected effective date.",
      "test_data": "${EFFECTIVE_DATE} / ${TAX_CONTEXT}",
      "expected_result": "The calculation runs, or is confirmed to have run, without unexpected errors.",
      "validation_type": "action"
    },
    {
      "step_number": 6,
      "step_name": "Review Calculated Gross and Net Results",
      "action": "Review the calculated gross pay, earnings, deductions and net pay results returned for the worker.",
      "test_data": "${SALARY} / ${EARNINGS} / ${ALLOWANCES} / ${DEDUCTIONS}",
      "expected_result": "Gross pay, earnings, deductions and net pay results are displayed for the worker and payroll period.",
      "validation_type": "action"
    },
    {
      "step_number": 7,
      "step_name": "Verify Arithmetic Against Expected Formula",
      "action": "Verify that Gross Pay minus Deductions equals the reported Net Pay for the worker's calculated results.",
      "test_data": "",
      "expected_result": "Gross Pay − Deductions = Net Pay holds for the calculated worker.",
      "validation_type": "business_assertion",
      "note": "This is the central business assertion for this scenario. Illustrative example only, not a real payroll result or customer-specific formula: if ${GROSS_PAY}=5000 and ${DEDUCTIONS}=1200, then ${NET_PAY}=3800. Test execution is designed to use ${PLACEHOLDER} tokens rather than real salary figures, and this page does not publish any customer-specific payroll formula as fact."
    },
    {
      "step_number": 8,
      "step_name": "Confirm Calculation Status",
      "action": "Confirm the calculation status recorded for the worker and payroll period.",
      "test_data": "",
      "expected_result": "The calculation status reflects successful completion for the worker.",
      "validation_type": "action"
    }
  ],
  "expected_results": [
    "Payroll is calculated successfully for the eligible worker in the selected payroll period.",
    "Expected earnings and allowances are calculated correctly.",
    "Expected deductions are applied correctly.",
    "Gross Pay minus Deductions equals Net Pay for the calculated worker.",
    "The calculation completes with the expected calculation status.",
    "Calculated results are retrievable and consistent with the underlying element entries."
  ],
  "validation_checkpoints": [
    "Gross Pay minus Deductions equals Net Pay, verified arithmetically.",
    "Expected earnings calculated correctly.",
    "Expected deductions applied correctly.",
    "Payroll period correct.",
    "Worker included in results.",
    "Calculation status correct."
  ]
}
