How We Built a Data‑Driven Automated Reconciliation Test Platform for Hotel Finance
This article explains how a hotel finance team tackled multi‑source, high‑volume reconciliation challenges by creating a Java‑based, data‑driven automated testing platform using Maven, TestNG, and Apache POI, improving efficiency, accuracy, and maintainability while outlining the framework architecture and future enhancements.
Why Automation Testing?
Financial reconciliation data demands high precision, and previously the consistency checks relied on manual processing by finance staff, leading to slow, error‑prone results.
Growth in hotel operations increased the volume and complexity of reconciliation tasks, exposing problems such as heterogeneous OTA data formats, massive data volumes, repetitive regression cycles, and difficulty in real‑time issue tracking.
Data‑Driven Automation System
To address these issues, the team built an automated testing platform that uses Excel as the data source and Java for integration, filtering, and comparison, thereby processing large datasets quickly and freeing finance personnel from tedious manual work.
Understanding Data‑Driven Testing
Data‑driven testing separates test data from test code. Test scripts receive parameters via constructors, allowing data changes to drive test execution without modifying code, which enhances reuse and maintainability.
Technical Implementation
The framework combines Maven , TestNG , Java , and Apache POI :
Maven manages project builds and dependencies.
TestNG provides annotations for controlling test flow, grouping, and parameterization.
Apache POI reads and writes Excel files, enabling Java to parse test data.
A typical test case reads data from Excel via POI, processes it in Java, and generates a report.
Framework Structure
The architecture includes the following modules:
DataProvider : supplies test data to scripts.
TestScript : encapsulates test logic.
commonFunction : reusable utility methods.
Data : shared constant data.
Report : handles test result output.
Execution Entry : an XML file (testng.xml) configures test scope.
Execution flow:
TestNG reads testng.xml as the entry point.
DataProvider drives test scripts with parameters.
Test scripts use POI to read Excel data, Java processes it, and results are written to the Report module.
Framework Optimization
Continuous improvements include consolidating frequently used data into a dedicated Data module, enhancing Excel read/write robustness in commonFunction, and pre‑processing Excel data to reduce nested loops and improve performance.
Future Plans
The current Excel‑based data source requires manual aggregation, hindering continuous integration. The roadmap proposes exposing data via APIs, enabling Jenkins‑driven CI pipelines, providing a visual parameter input for finance users, and allowing them to trigger tests directly, thus increasing regression frequency and reducing financial risk.
Conclusion
By adopting a data‑driven automated testing framework, the hotel finance team achieved faster, more accurate reconciliation, reduced manual effort, and set the foundation for further CI integration and scalability.
Mafengwo Technology
External communication platform of the Mafengwo Technology team, regularly sharing articles on advanced tech practices, tech exchange events, and recruitment.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
