This invention relates to a method, apparatus, electronic device, and storage medium for automated accounting testing. The automated accounting testing method includes the following steps: acquiring order information and corresponding merchant configuration information and marketing information; calculating and generating order data to form a basic dataset based on the acquired information and acquiring
business logic; comparing the order information in the basic dataset with the corresponding order data in the acquiring
system to generate a primary identifier field; calculating the settlement amount using the correct order data from the comparison and merchant revenue sharing information according to the clearing rules, comparing it with the settlement amount of the acquiring
system's batch clearing tasks to generate a
secondary identifier field for the corresponding order data; generating corresponding accounting entries based on the order data using an account table and rule table, verifying them against the entries generated by the acquiring
system to generate a
tertiary identifier field for the corresponding order data; and generating a
test report based on the identifiers at each level and the basic
data information.