Skip to content

Testing

Jani Giannoudis edited this page Jul 2, 2023 · 22 revisions

Payroll Testing

Die Payroll Engien untestützt folgende Testmethoden:

Test method Test scope Payroll Console JSON Extension
Case Available Test Test the case available actions and scripts CaseTest .ct.json
Case Build Test Test the case build actions and scripts CaseTest .ct.json
Case Validate Test Test the case validate actions and scripts CaseTest .ct.json
Payrun Test Test company payrun, all employees PayrunTest .pt.json
Payrun Employee Test Test employee payrun PayrunEmployeeTest .et.json
Report Build Test Test the report build scripts ReportTest .rt.json
Report Execute Test Test the report execute scripts ReportTest .rt.json


Case Testing

Der folgende Case Test zeigt die Validierung der Gehalts-Untergrenze aus dem Startbeispiel.

Beispiel Case Validierungstest Test.Salary.ct.json:

1{
2  "$schema": "PayrollEngine.CaseTest.schema.json",
3  "testName": "Test.Salary",
4  "tenantIdentifier": "StartTenant",
5  "userIdentifier": "[email protected]",
6  "employeeIdentifier": "mario.nuñ[email protected]",
7  "payrollName": "StartPayroll",
8  "validateTests": [
9    {
10      "testName": "Employee.Salary.499.Test",
11      "input": {
12        "userIdentifier": "[email protected]",
13        "employeeIdentifier": "mario.nuñ[email protected]",
14        "divisionName": "StartDivision",
15        "case": {
16          "caseName": "Salary",
17          "values": [
18            {
19              "caseFieldName": "Salary",
20              "value": "499",
21              "start": "2023-02-01T00:00:00.0Z",
22              "created": "2023-02-15T18:22:45.0Z"
23            }
24          ]
25        }
26      },
27      "output": {
28        "issues": [
29          {
30            "caseFieldName": "Salary",
31            "issueType" : "CaseInvalid",
32            "number": 400
33          }
34        ]
35      }
36    },
37    {
38      "testName": "Employee.Salary.500.Test",
39      "input": {
40        "userIdentifier": "[email protected]",
41        "employeeIdentifier": "mario.nuñ[email protected]",
42        "divisionName": "StartDivision",
43        "case": {
44          "caseName": "Salary",
45          "values": [
46            {
47              "caseFieldName": "Salary",
48              "value": "500",
49              "start": "2023-02-01T00:00:00.0Z",
50              "created": "2023-02-15T18:22:45.0Z"
51            }
52          ]
53        }
54      },
55      "output": {
56        "values": [
57          {
58            "caseFieldName": "Salary",
59            "value": "500",
60            "start": "2023-02-01T00:00:00.0Z",
61            "created": "2023-02-15T18:22:45.0Z"
62          }
63        ]
64      }
65    }
66  ]
67}

Die Schritte zum Testen der Payroll im Detail:

  • 2: Adjust the JSON schema path to your local environment

Der Test wird mit der Payroll Konsole ausgeführt:

PayrollConsole CaseTest Test.Salary.ct.json

See also Example Case Test.



Payrun Testing



Report Testing

Clone this wiki locally