Customer Cases
Pricing

Application of Automated Testing in Banking Data Unloading Testing: A Complete Guide

A complete guide to automated testing in banking data unloading. Learn GUT implementation, FLG/DAT parsing, and case studies for accurate cross-system data verification.

In the banking industry, back-end systems involve numerous business platforms, massive data volumes, and intricate inter-system interactions. Data unloading testing is a critical process to ensure the accuracy, completeness, and consistency of cross-system data interaction. However, manual testing often fails to achieve sufficient coverage for large-scale datasets, leading to potential data discrepancies and operational risks. Automated testing effectively addresses this limitation by enabling efficient, comprehensive, and repeatable verification. This guide details how to apply automated testing to data unloading testing in banking scenarios, with a focus on practical implementation, key considerations, and real-world case studies.

Let’s explore the step-by-step implementation and optimization strategies for automated data unloading testing in banking systems.

01 Test Object: GUT Data Unloading Mechanism

Before initiating data unloading testing, it is essential to clarify the test object. This article takes GUT (General Unloading Tool) — a widely used data unloading method in banking back-end systems — as an example. A single GUT unloading task executes one SQL statement to complete data extraction. Upon task completion, two core files are generated:

  • DAT Data File: Stores unloaded database data in fixed-length fields, following the field offset specifications defined in the FLG file. It is the core carrier of unloaded data and the key object for data verification.

  • FLG Flag File: Records the offset values of each field in the fixed-length DAT file. Its core function is to verify whether the fixed-length calculation of fields complies with the enterprise’s overall architecture standards, ensuring data consistency across systems.

02 Core Automated Testing Approach for Data Unloading

After defining the test object, we outline the standardized automated testing workflow, designed to ensure full coverage and high accuracy. The core logic of automated data unloading testing is as follows:

  1. Parse the FLG file to extract key metadata, including database table name, field name, field type, field length, start offset, and end offset. Then, retrieve the original field data from the corresponding database table using code (e.g., Python, Java) or automated testing tools.

  2. Based on the field information parsed from the FLG file, extract the actual field values written into the DAT file — a critical step to ensure subsequent comparison accuracy.

  3. Traverse the original database data and the unloaded DAT file data row by row, performing field-by-field precise comparison to identify any inconsistencies.

  4. Locate inconsistent data records in the test results, analyze the root causes (e.g., FLG configuration errors, data type conversion issues), and provide targeted optimization suggestions.

03 Step-by-Step Implementation of Automated Data Unloading Testing

The most critical part of the automated testing workflow is the parsing of FLG and DAT files and accurate data extraction. Regular expressions (regex) are widely used to extract key information efficiently, ensuring compatibility with banking system data formats.

Step 1: FLG File Parsing (Key Metadata Extraction)

First, extract the database table name according to the bank’s database table naming conventions. Since the unloaded field information in the FLG file follows a unified format, multi-line regular expressions can be used to accurately extract all required metadata, including field name, field type, field length, start offset, and end offset. This step lays the foundation for subsequent DAT file parsing and data comparison.

Step 2: DAT File Field Value Extraction (Two Reliable Methods)

Unlike FLG files, DAT files support diverse character sets (including Chinese and English) and store fields in fixed lengths without delimiters. Direct character-length matching is unreliable in mixed-language scenarios. Here are two industry-proven extraction methods forbanking data unloading testing:

  1. Binary Mode Reading: Open the DAT file in binary mode. Calculate the byte length of each field by subtracting the start offset from the end offset of adjacent fields. Read the corresponding number of bytes according to the calculated offset length, then decode the binary data into a readable string (supporting both Chinese and English characters) to ensure no data loss.

  2. Unicode Regular Expression Matching: Open the DAT file in binary mode, construct a regular expression in Unicode format, and match any characters of the calculated byte length (e.g., use (.{10}) for a 10-byte field). After matching, decode each field result one by one to obtain the actual field value.

Step 3: Row-by-Row Comparison & Result Analysis

Perform a full traversal of the original database data and the unloaded DAT file data, conducting field-by-field matching. Key considerations include: data format conversion (ensuring consistency between database and unloaded data), handling of diverse data types (e.g., numeric, date, string), and continuous debugging and optimization of the matching logic. Finally, analyze the comparison results to locate problematic files, faulty unloading scripts, and data inconsistency reasons.

04 Key Considerations for Automated Data Unloading Testing (Banking Scenarios)

To avoid misleading test results and ensure the reliability of automated testing, we summarize key precautions based on practical experience in banking data unloading testing:

  1. Adequacy of Database Test Data: When conducting boundary value verification in manual testing, ensure sufficient coverage. For automated testing, use a data generation platform to create bulk test data, including data that meets the maximum field length, to simulate real-world scenarios.

  2. Precision of Numeric Data: Exported data is usually stored as strings. When converting to numeric types, trailing zeros may cause hidden discrepancies. Therefore, include test cases where the least significant decimal digit is non-zero (especially for financial data such as amounts).

  3. Consistency of Date and Time Formats: The date and time format stored in the database often differs from the format of unloaded data. It is necessary to unify the formats through code or tools before conducting comparison tests to avoid false positives.

05 Practical Case Study: Automated Testing for DECIMAL Data Unloading Defects

To demonstrate the value of automated testing in data unloading, we share a real case from a bank’s back-end system testing, focusing on common DECIMAL data (widely used for financial amounts) unloading defects.

During testing, we found inconsistencies between the unloaded DECIMAL data and the source database. After reviewing the GUT official documentation, we confirmed that the length rule for NUMBER and DECIMAL types in GUT is n + 2 (where n is the database field length), with the extra two bytes reserved for the decimal point and sign. However, some field offset differences in the FLG file did not comply with this rule — a defect that is difficult to detect through manual testing.

Verification & Resolution Process

  1. Extract all lines containing the "DECIMAL" keyword from the DAT files in the unloading directory (gerp), redirect the results to a text file, and remove duplicates to avoid redundant analysis.

  2. Use regular expressions to extract key information from each line: table name, field name, data length, decimal places, start offset, and end offset.

  3. For each DECIMAL field, calculate the expected unloading length (data length + 2) and compare it with the actual unloading length (end offset - start offset + 1).

  4. Classify and output fields where the actual length is greater than, less than, or equal to the expected length, then locate the faulty unloading scripts based on the output information.

Why Automated Testing is Indispensable for Banking Data Unloading

Banking back-end systems have extremely large numbers of tables, fields, and data volumes, with each table requiring an independent unloading script. Manual testing cannot cover all data scenarios within a limited time, leading to potential defects being missed. In contrast, automated data unloading testing offers three core advantages:

  • Significantly shortens the testing cycle, improving testing efficiency and accelerating the release of banking system updates.

  • Covers more data scenarios, including boundary values, special characters, and large-volume data, ensuring comprehensive verification.

  • Supports repeated testing, which is especially valuable for regression testing after system upgrades or script modifications.

Beyond basic UI and interface testing, automated testing plays a crucial role in data unloading testing — a time-consuming and repetitive scenario in banking systems. There are many more banking testing scenarios suitable for automation, and we look forward to exploring and sharing with fellow engineering professionals.

 

Latest Posts
1Application of Automated Testing in Banking Data Unloading Testing: A Complete Guide A complete guide to automated testing in banking data unloading. Learn GUT implementation, FLG/DAT parsing, and case studies for accurate cross-system data verification.
2Performance Test Scenario Design Methodology: A Comprehensive Guide Learn how to design effective performance test scenarios with 4 core frameworks (Baseline, Capacity, Stability, Exception). A step-by-step guide for performance test engineers in 2026.
3The Cheating Economics of Engineering Metrics: Why KPIs Fail in Performance Reviews Learn why engineering metrics fail with the cheating economics of vanity KPIs. Discover real examples, pitfalls & how to implement effective Agile metrics for tech teams.
4Enhancing Business Value with Automation: Practical Team Practices Learn how QJIAYI Tech Quality Team enhances automation business value with practical practices. 10k+ test cases, 80+ monthly bugs detected—turn automation into a business-driven capability.
5Testing Fundamentals: A Better Solution for Balancing Product Quality and Testing Efficiency Learn how to balance product quality and testing efficiency with context-driven testing, RBT & practical QA strategies. A better solution for agile testing teams to deliver high-quality products faster.