CN116541309B - Test method, device, equipment and medium based on transaction system conversion - Google Patents

Test method, device, equipment and medium based on transaction system conversion Download PDF

Info

Publication number
CN116541309B
CN116541309B CN202310804642.6A CN202310804642A CN116541309B CN 116541309 B CN116541309 B CN 116541309B CN 202310804642 A CN202310804642 A CN 202310804642A CN 116541309 B CN116541309 B CN 116541309B
Authority
CN
China
Prior art keywords
test
transaction
result
data
directory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310804642.6A
Other languages
Chinese (zh)
Other versions
CN116541309A (en
Inventor
张笑虹
杨剑
李锐佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Huarui Software Co ltd
Shenzhen Huarui Distributed Technology Co ltd
Original Assignee
Shanghai Huarui Software Co ltd
Shenzhen Huarui Distributed Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Huarui Software Co ltd, Shenzhen Huarui Distributed Technology Co ltd filed Critical Shanghai Huarui Software Co ltd
Priority to CN202310804642.6A priority Critical patent/CN116541309B/en
Publication of CN116541309A publication Critical patent/CN116541309A/en
Application granted granted Critical
Publication of CN116541309B publication Critical patent/CN116541309B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software

Abstract

The invention relates to the technical field of artificial intelligence, and provides a testing method, a device, equipment and a medium based on transaction system conversion, which can detect a testing environment to determine whether each deployment and configuration are correct, query transaction information according to a directory file to realize automatic query of transaction information, improve testing efficiency, detect order accessibility of a heterogeneous system so as to pre-examine next data before ordering, avoid testing errors, access an interface of an original centralized transaction system of a client and issue a bill according to the transaction information and testing data, access an interface of the heterogeneous system and issue a bill according to the transaction information and the testing data, and conduct a comparison test based on a first transaction result, a second transaction result, a first disc after-leading a clearing result and a second disc after-leading a clearing result to obtain a testing result, so as to detect consistency of two systems of conversion migration and provide basis for replacement of the heterogeneous system.

Description

Test method, device, equipment and medium based on transaction system conversion
Technical Field
The present invention relates to the field of big data technologies, and in particular, to a method, an apparatus, a device, and a medium for testing transaction system conversion.
Background
When the original centralized transaction system of the client is docked, the client at the centralized counter needs to be migrated to a heterogeneous system to conduct transaction, and after the client is closed, the client is imported to a platform such as a medium-rise platform to conduct settlement.
In the importing and exporting process, the relation conversion of service representation between two sets of systems needs to be processed, the requirements are communicated and confirmed by the products and clients, and the conversion requirement development is carried out by data development of delivery groups and the like. The conversion relation of the upper field and the lower field needs to be covered, and all the upper field conversion requirements and all the lower field service scenes are required to be covered.
In the prior art, the upper field and lower field comparison test is carried out by manually covering the requirements and scenes, the requirements of a basic system can be met, the test efficiency is low, and errors are easy to occur.
Disclosure of Invention
In view of the above, it is necessary to provide a testing method, device, equipment and medium based on transaction system conversion, which aims to solve the testing problem of conversion between the original centralized transaction system and heterogeneous system of clients.
A transaction system conversion based test method, the transaction system conversion based test method comprising:
responding to a test instruction based on conversion between the original centralized transaction system of the client and the heterogeneous system, and detecting a test environment;
When the test environment passes the detection, the test data and the directory file are called according to the test instruction;
inquiring transaction information according to the directory file;
detecting order reachability of the heterogeneous system;
when the order reachability passes the detection, accessing an interface of the original centralized transaction system of the client and issuing a bill according to the transaction information and the test data, and accessing an interface of the heterogeneous system and issuing a bill according to the transaction information and the test data;
acquiring a first transaction result and a first post-disc imported clearing result of an original centralized transaction system of the client, and acquiring a second transaction result and a second post-disc imported clearing result of the heterogeneous system;
and performing a comparison test based on the first transaction result, the second transaction result, the first post-disk imported clearing result and the second post-disk imported clearing result to obtain a test result.
According to a preferred embodiment of the present invention, the detecting the test environment includes:
acquiring whether the connection of an installation package, a database, an operation assembly and a standard gateway corresponding to the heterogeneous system after the test environment is deployed is normal;
and detecting whether the connection of the peripheral interfaces of the original centralized transaction system of the client is normal.
According to a preferred embodiment of the present invention, the querying transaction information according to the directory file includes:
acquiring a case file from the directory file;
acquiring the service type, the securities state and the trade direction in the case file as service parameter information;
determining the service parameter information as a query field to query in the database to obtain a corresponding security code;
backfilling the security code as the transaction information.
According to a preferred embodiment of the present invention, the detecting order reachability of the heterogeneous system includes:
determining a current account according to the test data;
checking fund data and holding data of the current account, checking whether the current consignment price and the current consignment quantity are consigned successfully or not and outputting consignment results according to the service type and the transaction direction and through a transaction interface, the database and the operation assembly of the heterogeneous system;
when the fund data and the warehouse holding data pass the verification, the current consignment price and the current consignment quantity consignment succeed and a consignment result is output, determining that the order reachability passes the detection; or alternatively
And when the fund data and the holding data are not checked, or the current consignment price and the current consignment quantity are not consigned successfully, and a consignment result is output, determining that the order reachability is not detected.
According to a preferred embodiment of the invention, the method further comprises:
reading a test case in the test data;
after the test case is read, acquiring an account identifier from the test data;
according to the account identifier, securities of a securities account, a fund account, a securities price, a private account, a two-share securities account, an ETF component share, an ETF trading unit and an option mark are called from the database as account information;
caching the account information into a configuration file catalog;
in the testing process, when the database is abnormally connected, the account information is called from the configuration file catalogue;
when the account information is cached in the configuration file catalog, the same account information is cached once with a time stamp.
According to a preferred embodiment of the invention, the method further comprises:
in the test process, acquiring a last historical test result of a case file belonging to the same sheet;
And when the historical test result is a passing test, skipping the execution of the case file, and writing the historical test result into the test result.
According to a preferred embodiment of the present invention, the comparing test based on the first transaction result, the second transaction result, the first post-disk imported clearing result, and the second post-disk imported clearing result, where the obtaining the test result includes:
comparing the first transaction result with the second transaction result field by field, and comparing the first disc post-import clearing result with the second disc post-import clearing result;
when the first transaction result is the same as the second transaction result and the first disc post-import clearing result is the same as the second disc post-import clearing result, determining that the test result is a passing test; or alternatively
And when the first transaction result is different from the second transaction result and/or the first disc post-import clearing result is different from the second disc post-import clearing result, determining that the test result is not passed.
A transaction system conversion based testing device, the transaction system conversion based testing device comprising:
The detection unit is used for responding to a test instruction based on conversion between the original centralized transaction system of the client and the heterogeneous system and detecting a test environment;
the calling unit is used for calling the test data and the directory file according to the test instruction when the test environment passes the detection;
the inquiring unit is used for inquiring transaction information according to the directory file;
the detection unit is also used for detecting the order accessibility of the heterogeneous system;
the order issuing unit is used for accessing an interface of the original centralized transaction system of the client and issuing an order according to the transaction information and the test data when the order accessibility passes detection, and accessing an interface of the heterogeneous system and issuing an order according to the transaction information and the test data;
the acquisition unit is used for acquiring a first transaction result and a first disc post-import clearing result of the original centralized transaction system of the client, and acquiring a second transaction result and a second disc post-import clearing result of the heterogeneous system;
and the test unit is used for carrying out comparison test based on the first transaction result, the second transaction result, the first disc post-import clearing result and the second disc post-import clearing result to obtain a test result.
A computer device, the computer device comprising:
a memory storing at least one instruction; a kind of electronic device with high-pressure air-conditioning system
And the processor executes the instructions stored in the memory to realize the testing method based on the conversion of the transaction system.
A computer readable storage medium having stored therein at least one instruction for execution by a processor in a computer device to implement the transaction system based conversion testing method.
According to the technical scheme, the testing environment can be detected to determine whether each deployment and configuration are correct, transaction information is queried according to the directory file to realize automatic query of the transaction information, testing efficiency is improved, order accessibility of the heterogeneous system is detected so as to pre-examine next data before ordering, testing errors are avoided, an interface of an original centralized transaction system of a client is accessed, the order is issued according to the transaction information and the testing data, an interface of the heterogeneous system is accessed, the order is issued according to the transaction information and the testing data, a comparison test is conducted based on a first transaction result, a second transaction result, a first disc after-import clearing result and a second disc after-import clearing result, and the testing result is obtained, so that consistency of two systems of conversion and migration is detected, and basis is provided for replacement and online of the heterogeneous system.
Drawings
FIG. 1 is a flow chart of a testing method based on transaction system conversion according to a preferred embodiment of the present invention.
FIG. 2 is a functional block diagram of a testing apparatus based on transaction system conversion according to a preferred embodiment of the present invention.
FIG. 3 is a schematic diagram of a computer device for implementing a testing method based on transaction system conversion according to a preferred embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
FIG. 1 is a flow chart of a testing method based on transaction system conversion according to a preferred embodiment of the present invention. The order of the steps in the flowchart may be changed and some steps may be omitted according to various needs.
The test method based on the conversion of the transaction system is applied to one or more computer devices, wherein the computer device is a device capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, and the hardware of the computer device comprises, but is not limited to, a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a programmable gate array (Field-Programmable Gate Array, FPGA), a digital processor (Digital Signal Processor, DSP), an embedded device and the like.
The computer device may be any electronic product that can interact with a user in a human-computer manner, such as a personal computer, tablet computer, smart phone, personal digital assistant (Personal Digital Assistant, PDA), game console, interactive internet protocol television (Internet Protocol Television, IPTV), smart wearable device, etc.
The computer device may also include a network device and/or a user device. Wherein the network device includes, but is not limited to, a single network server, a server group composed of a plurality of network servers, or a Cloud based Cloud Computing (Cloud Computing) composed of a large number of hosts or network servers.
The server may be an independent server, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results.
Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
The network in which the computer device is located includes, but is not limited to, the internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN), and the like.
And S10, responding to a test instruction based on conversion between the original centralized transaction system of the client and the heterogeneous system, and detecting the test environment.
The premise of testing the heterogeneous system is that the client data of the heterogeneous system and the client original centralized transaction system are consistent when the system is started, and the client data is exported to the heterogeneous system through an interface by the client original centralized transaction system, so that the process needs to be tested to ensure the data consistency.
Meanwhile, two sets of systems are required to report together in the process so as to detect whether the results processed by the two sets of systems are consistent or not, if the results are inconsistent, the whole set of systems are required to be restarted and are re-calibrated to the starting point of the systems, and therefore pre-detection is required to be carried out so as to improve the once test passing rate. If the pre-inspection finds that the test expectation cannot be met, the temporary adjustment is performed, so that the test can be continuously advanced when the initial data does not have the current scene test premise, and the data is not readjusted to restart the two sets of systems.
Based on the above, the present embodiment performs a test based on the conversion of the transaction system before the heterogeneous system is brought on line.
For example: before the heterogeneous system is on line, whether the transaction results of the simultaneous transaction of the heterogeneous system and the original client centralized transaction system are consistent under the same coupon, the equivalent initial authority model and the equivalent cost model needs to be detected, so that the test instruction needs to be triggered. Specifically, the system A is an online system, a system B is needed to be online, and daily after-disc settlement interaction is formed with the online system A, wherein the system A is the original centralized transaction system of the client, and the system B is the heterogeneous system.
In this example, the detecting the test environment includes:
acquiring whether the connection of an installation package, a database, an operation assembly and a standard gateway corresponding to the heterogeneous system after the test environment is deployed is normal;
and detecting whether the connection of the peripheral interfaces of the original centralized transaction system of the client is normal.
Through the embodiment, the test environment can be detected before the conversion test is performed, so that problems in the test process are avoided.
For example: an environment detection command, such as python run. Py-service check_env, may be configured, and the environment may be detected by running the detection command.
S11, when the test environment passes the detection, the test data and the directory file are called according to the test instruction.
Wherein the test data may include, but is not limited to: account identification, test cases, accounts, etc.
Wherein, the directory file may include, but is not limited to: document directories, comparison test directories, file directories, public configuration directories, etc.
In this embodiment, the test instruction may be parsed to obtain the addresses of the test data and the directory file, and the test data and the directory file may be read according to the parsed addresses.
S12, inquiring transaction information according to the directory file.
In this embodiment, the querying transaction information according to the directory file includes:
acquiring a case file from the directory file;
acquiring the service type, the securities state and the trade direction in the case file as service parameter information;
determining the service parameter information as a query field to query in the database to obtain a corresponding security code;
backfilling the security code as the transaction information.
Through the embodiment, the security codes can be automatically inquired without human participation, and the secondary testing efficiency is further improved.
S13, detecting the order accessibility of the heterogeneous system.
In this embodiment, the detecting the order reachability of the heterogeneous system includes:
determining a current account according to the test data;
checking fund data and holding data of the current account, checking whether the current consignment price and the current consignment quantity are consigned successfully or not and outputting consignment results according to the service type and the transaction direction and through a transaction interface, the database and the operation assembly of the heterogeneous system;
when the fund data and the warehouse holding data pass the verification, the current consignment price and the current consignment quantity consignment succeed and a consignment result is output, determining that the order reachability passes the detection; or alternatively
And when the fund data and the holding data are not checked, or the current consignment price and the current consignment quantity are not consigned successfully, and a consignment result is output, determining that the order reachability is not detected.
Through the embodiment, the pre-checking of the next data can be performed before ordering, so that the accessibility of the pre-checked order can be ensured, and the normal execution of the testing process can be ensured.
And S14, when the order accessibility passes the detection, accessing an interface of the original centralized transaction system of the client and issuing a bill according to the transaction information and the test data, and accessing an interface of the heterogeneous system and issuing a bill according to the transaction information and the test data.
Specifically, the test cases in the test data may be executed based on the transaction information, and then the issuing order may be executed.
In the above embodiment, the original centralized transaction system of the client and the heterogeneous system can be ensured to execute the transaction under the same conditions of the ticket, the equivalent initial authority model, the cost model and the like, and the same environment basis is provided for the comparison of the subsequent transaction results, so that the transaction results of the two have actual comparability.
In this embodiment, the method further includes:
and when the order reachability fails to pass the detection, calling a preset interface to adjust the coupon authority.
In the above embodiment, when the order is not reachable, an interface is automatically called to adjust the ticket authority, etc., so as to ensure that the order is reachable.
S15, acquiring a first transaction result and a first disc post-import clearing result of the original centralized transaction system of the client, and acquiring a second transaction result and a second disc post-import clearing result of the heterogeneous system.
In this embodiment, the first transaction result and the second transaction result are obtained after the transaction is executed under the same condition, so that the two results have a certain comparability.
Normally, if the corresponding transaction system is normal, the first transaction result and the second transaction result should be the same, so that after the original centralized transaction system of the client is migrated to the heterogeneous system, the normal transaction process is not influenced.
In this embodiment, the first post-disk import clearing result and the second post-disk import clearing result are the results of the post-disk import clearing center after the transaction is completed under the same condition, and therefore, the two are also comparable.
Normally, if the corresponding transaction system is normal, the post-first-disc imported clearing result and the post-second-disc imported clearing result should be the same.
Conversely, if the first transaction result is different from the second transaction result and/or the first post-disk imported clearing result and the second post-disk imported clearing result are different, the heterogeneous system is abnormal after migration.
S16, performing a comparison test based on the first transaction result, the second transaction result, the first disc post-import clearing result and the second disc post-import clearing result to obtain a test result.
In this embodiment, after the process comparison is completed, the data after the disc needs to be dropped to a unified standard format, and the database in the standard format is input by the clearing center, and since the original centralized transaction system of the client is a system running in normal production, the data of the import clearing center generated by the transaction in the default disc in the original centralized transaction system of the client is correct. Therefore, if the heterogeneous system goes through the same process, the transaction data is compared word by word and segment by segment after being generated and imported into the clearing center data, and the same input is processed by the same set of program by utilizing the state machine principle, the processing results are necessarily consistent, so that overdraft cannot occur after the heterogeneous system goes on line, the transaction continuity is ensured, and the continuous operation and maintenance stable operation of the transaction day is ensured.
Specifically, the performing a comparison test based on the first transaction result, the second transaction result, the first post-disk imported clearing result, and the second post-disk imported clearing result, where obtaining a test result includes:
comparing the first transaction result with the second transaction result field by field, and comparing the first disc post-import clearing result with the second disc post-import clearing result;
when the first transaction result is the same as the second transaction result and the first post-disk imported clearing result is the same as the second post-disk imported clearing result, the fact that after the original centralized transaction system of the client is migrated to the heterogeneous system is explained, normal execution of the transaction is not affected, the transaction results can still be guaranteed to be the same, and through field-by-field comparison of data (such as a database table) such as a post-disk imported clearing table, consistency of the data imported into a clearing center after the same transaction case is completed by the two systems is verified, and the result after online transaction clearing of the heterogeneous system is ensured to meet expectations; or alternatively
When the first transaction result is different from the second transaction result and/or the first-disc-later-introduced clearing result is different from the second-disc-later-introduced clearing result, the normal execution of the transaction is influenced after the original centralized transaction system of the client is migrated to the heterogeneous system, or the consistency of data (such as a database table) of the two systems after the same transaction case is completed is verified by comparing fields by fields, so that the result after the online transaction clearing of the heterogeneous system is ensured to meet the expectation, at the moment, the test result can be determined to be not passed, at the moment, abnormal response can be timely performed, and adverse influence on the transaction due to system migration is avoided.
For example: it is possible to compare whether the following are identical by testing:
the interface returns whether the following conditions are consistent: whether the same meaning is consistent in the return fields of different interfaces;
whether the script is consistent: script naming, method naming, class name, naming rule are consistent;
whether the input and the output are consistent: and inputting a case file and outputting whether the corresponding relation of the report file is consistent.
In this embodiment, the method further includes:
reading a test case in the test data;
after the test case is read, acquiring an account identifier from the test data;
according to the account identifier, securities of a securities account, a fund account, a securities price, a private account, a two-share securities account, an ETF (Exchange Traded Fund, trade type open index fund) component share, an ETF trade unit and an option mark are called from the database as account information;
caching the account information into a configuration file catalog;
in the testing process, when the database is abnormally connected, the account information is called from the configuration file catalogue;
when the account information is cached in the configuration file catalog, the same account information is cached once with a time stamp.
The configuration file directory may be a local cache directory, such as an auto/cache. Specifically, the data can be cached in a manner of 'method name+access key' in bosdb.py, the same client number is cached once, and the same security code is cached once, so that the data of the same account information is prevented from being cached repeatedly to cause data redundancy. And the existing cache is refreshed, and each execution backs up the just refreshed cache with a time stamp.
Thus, the data in the cache may be used when the database connection is abnormal.
In the above embodiment, by caching account information such as securities accounts, funds accounts, securities prices, and the like, the caching function of the heterogeneous system is added, so that dependence on heterogeneous system environments can be eliminated, and the ordering can be normally executed even if the heterogeneous system database fails to connect.
In this embodiment, the method further includes:
in the test process, acquiring a last historical test result of a case file belonging to the same sheet;
and when the historical test result is a passing test, skipping the execution of the case file, and writing the historical test result into the test result.
For example: when the case file of the same sheet is executed, the last historical result of the current day is obtained, if the historical result passes, the obtained result is filled into the current result, and the data_from column in the result displays 'last'. The result of the history test is cached, if the comparison is passed, the cache content is directly fetched, and the data_from column in the result shows the comparison passing time, such as '20220303-121212', when the comparison is performed, the result of the history test can be cached under the compare/report/record directory.
In the above embodiment, in order to avoid that the case file that has passed in the previous stage is repeatedly executed, the result that has passed in the history is filled in the current result file, which not only improves the execution efficiency, but also avoids that the same case file is repeatedly executed to cause data redundancy.
It should be noted that, in order to ensure the test quality, the function of taking the history test result may be configured as a default function, and if this function is not used, a parameter such as "- -run_all_force" may be added after the command line to mask the function.
The testing method based on transaction system conversion adopted in the embodiment can cover authority comparison, business comparison test and the like so as to verify the accuracy of the on-site and the accuracy of system processing. Wherein, the authority comparison includes: and executing the same business delegation by the security account of the corresponding authority to judge whether the same authority control result is received. The service comparison test comprises the following steps: under the same rate, business rule and matching rule, whether the funds difference, the warehouse holding change and the like generated by the same order of the two sets of systems are consistent or not.
In this embodiment, in the testing process, the progress of each service test may be counted, so as to count the execution data, and display the execution data in forms of a table, a histogram, etc., so that the testing process is convenient to view in real time, and when an abnormality occurs in the testing process, relevant staff can timely take countermeasures against the abnormality, so that the testing process can be executed more accurately.
In this embodiment, to adapt to the rules of different transaction systems, configurable data processing rules may also be provided and applied to the database comparison stage. For example: the database is compared with different lower-field rules, and different rules can be configured in the database comparison configuration compare_rule; in the database comparison, carrying out custom processing on heterogeneous system or counter business test result data processing and sql query results; different systems in the disk are configured with different calculation rules, and a comparison function and a parameter transmission can be configured in a comparison configuration compare_rule.
According to the technical scheme, the testing environment can be detected to determine whether each deployment and configuration are correct, transaction information is queried according to the directory file to realize automatic query of the transaction information, testing efficiency is improved, order accessibility of the heterogeneous system is detected so as to pre-examine next data before ordering, testing errors are avoided, an interface of an original centralized transaction system of a client is accessed, the order is issued according to the transaction information and the testing data, an interface of the heterogeneous system is accessed, the order is issued according to the transaction information and the testing data, a comparison test is conducted based on a first transaction result, a second transaction result, a first disc after-import clearing result and a second disc after-import clearing result, and the testing result is obtained, so that consistency of two systems of conversion and migration is detected, and basis is provided for replacement and online of the heterogeneous system.
FIG. 2 is a functional block diagram of a testing apparatus according to a preferred embodiment of the present invention based on transaction system conversion. The testing device 11 based on transaction system conversion comprises a detecting unit 110, a calling unit 111, a querying unit 112, a bill issuing unit 113, an acquiring unit 114 and a testing unit 115. The module/unit referred to in the present invention refers to a series of computer program segments, which are stored in a memory, capable of being executed by a processor and of performing a fixed function. In the present embodiment, the functions of the respective modules/units will be described in detail in the following embodiments.
The detecting unit 110 is configured to detect a test environment in response to a test instruction based on conversion between the original centralized transaction system and the heterogeneous system of the client.
The retrieving unit 111 is configured to retrieve test data and a directory file according to the test instruction when the test environment passes the detection.
The query unit 112 is configured to query transaction information according to the directory file.
The detecting unit 110 is further configured to detect order reachability of the heterogeneous system.
The order issuing unit 113 is configured to access an interface of an original centralized transaction system of the customer and issue an order according to the transaction information and the test data, and access an interface of the heterogeneous system and issue an order according to the transaction information and the test data when the order reachability passes detection.
The obtaining unit 114 is configured to obtain a first transaction result and a first post-disc imported clearing result of the original centralized transaction system of the client, and obtain a second transaction result and a second post-disc imported clearing result of the heterogeneous system.
The test unit 115 is configured to perform a comparison test based on the first transaction result, the second transaction result, the first post-disk imported clearing result, and the second post-disk imported clearing result, to obtain a test result.
According to the technical scheme, the testing environment can be detected to determine whether each deployment and configuration are correct, transaction information is queried according to the directory file to realize automatic query of the transaction information, testing efficiency is improved, order accessibility of the heterogeneous system is detected so as to pre-examine next data before ordering, testing errors are avoided, an interface of an original centralized transaction system of a client is accessed, the order is issued according to the transaction information and the testing data, an interface of the heterogeneous system is accessed, the order is issued according to the transaction information and the testing data, a comparison test is conducted based on a first transaction result, a second transaction result, a first disc after-import clearing result and a second disc after-import clearing result, and the testing result is obtained, so that consistency of two systems of conversion and migration is detected, and basis is provided for replacement and online of the heterogeneous system.
Fig. 3 is a schematic structural diagram of a computer device according to a preferred embodiment of the present invention for implementing a testing method based on transaction system conversion.
The computer device 1 may comprise a memory 12, a processor 13 and a bus, and may further comprise a computer program stored in the memory 12 and executable on the processor 13, for example a test program based on a transaction system conversion.
It will be appreciated by those skilled in the art that the schematic diagram is merely an example of the computer device 1 and does not constitute a limitation of the computer device 1, the computer device 1 may be a bus type structure, a star type structure, the computer device 1 may further comprise more or less other hardware or software than illustrated, or a different arrangement of components, for example, the computer device 1 may further comprise an input-output device, a network access device, etc.
It should be noted that the computer device 1 is only used as an example, and other electronic products that may be present in the present invention or may be present in the future are also included in the scope of the present invention by way of reference.
The memory 12 includes at least one type of readable storage medium including flash memory, a removable hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 12 may in some embodiments be an internal storage unit of the computer device 1, such as a removable hard disk of the computer device 1. The memory 12 may in other embodiments also be an external storage device of the computer device 1, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the computer device 1. Further, the memory 12 may also include both an internal storage unit and an external storage device of the computer device 1. The memory 12 may be used not only for storing application software installed in the computer device 1 and various types of data, such as codes of test programs converted based on a transaction system, but also for temporarily storing data that has been output or is to be output.
The processor 13 may be comprised of integrated circuits in some embodiments, for example, a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, a combination of various control chips, and the like. The processor 13 is a Control Unit (Control Unit) of the computer device 1, connects the respective components of the entire computer device 1 using various interfaces and lines, executes various functions of the computer device 1 and processes data by running or executing programs or modules stored in the memory 12 (for example, executing a test program based on transaction system conversion, etc.), and calling data stored in the memory 12.
The processor 13 executes the operating system of the computer device 1 and various types of applications installed. The processor 13 executes the application program to implement the steps of the various transaction system conversion based test method embodiments described above, such as the steps shown in fig. 1.
Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules/units may be a series of computer readable instruction segments capable of performing the specified functions, which instruction segments describe the execution of the computer program in the computer device 1. For example, the computer program may be divided into a detection unit 110, a retrieval unit 111, a query unit 112, a ticket issuing unit 113, an acquisition unit 114, a test unit 115.
The integrated units implemented in the form of software functional modules described above may be stored in a computer readable storage medium. The software functional module is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a computer device, or a network device, etc.) or a processor (processor) to execute portions of the transaction system based test method according to the various embodiments of the invention.
The modules/units integrated in the computer device 1 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on this understanding, the present invention may also be implemented by a computer program for instructing a relevant hardware device to implement all or part of the procedures of the above-mentioned embodiment method, where the computer program may be stored in a computer readable storage medium and the computer program may be executed by a processor to implement the steps of each of the above-mentioned method embodiments.
Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory, or the like.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created from the use of blockchain nodes, and the like.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
The bus may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one straight line is shown in fig. 3, but not only one bus or one type of bus. The bus is arranged to enable a connection communication between the memory 12 and at least one processor 13 or the like.
Although not shown, the computer device 1 may further comprise a power source (such as a battery) for powering the various components, preferably the power source may be logically connected to the at least one processor 13 via a power management means, whereby the functions of charge management, discharge management, and power consumption management are achieved by the power management means. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The computer device 1 may further include various sensors, bluetooth modules, wi-Fi modules, etc., which will not be described in detail herein.
Further, the computer device 1 may also comprise a network interface, optionally comprising a wired interface and/or a wireless interface (e.g. WI-FI interface, bluetooth interface, etc.), typically used for establishing a communication connection between the computer device 1 and other computer devices.
The computer device 1 may optionally further comprise a user interface, which may be a Display, an input unit, such as a Keyboard (Keyboard), or a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the computer device 1 and for displaying a visual user interface.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
Fig. 3 shows only a computer device 1 with components 12-13, it being understood by those skilled in the art that the structure shown in fig. 3 is not limiting of the computer device 1 and may include fewer or more components than shown, or may combine certain components, or a different arrangement of components.
In connection with fig. 1, the memory 12 in the computer device 1 stores a plurality of instructions to implement a transaction system conversion based testing method, the processor 13 being executable to implement:
responding to a test instruction based on conversion between the original centralized transaction system of the client and the heterogeneous system, and detecting a test environment;
when the test environment passes the detection, the test data and the directory file are called according to the test instruction;
inquiring transaction information according to the directory file;
detecting order reachability of the heterogeneous system;
when the order reachability passes the detection, accessing an interface of the original centralized transaction system of the client and issuing a bill according to the transaction information and the test data, and accessing an interface of the heterogeneous system and issuing a bill according to the transaction information and the test data;
Acquiring a first transaction result and a first post-disc imported clearing result of an original centralized transaction system of the client, and acquiring a second transaction result and a second post-disc imported clearing result of the heterogeneous system;
and performing a comparison test based on the first transaction result, the second transaction result, the first post-disk imported clearing result and the second post-disk imported clearing result to obtain a test result.
Specifically, the specific implementation method of the above instructions by the processor 13 may refer to the description of the relevant steps in the corresponding embodiment of fig. 1, which is not repeated herein.
The data in this case were obtained legally.
In the several embodiments provided in the present invention, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The invention is operational with numerous general purpose or special purpose computer system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. The units or means stated in the invention may also be implemented by one unit or means, either by software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (7)

1. The testing method based on the transaction system conversion is characterized by comprising the following steps of:
responding to a test instruction based on conversion between the original centralized transaction system of the client and the heterogeneous system, and detecting a test environment;
when the test environment passes the detection, the test data and the directory file are called according to the test instruction;
inquiring transaction information according to the directory file;
detecting order reachability of the heterogeneous system;
When the order reachability passes the detection, accessing an interface of the original centralized transaction system of the client and issuing a bill according to the transaction information and the test data, and accessing an interface of the heterogeneous system and issuing a bill according to the transaction information and the test data;
acquiring a first transaction result and a first post-disc imported clearing result of an original centralized transaction system of the client, and acquiring a second transaction result and a second post-disc imported clearing result of the heterogeneous system;
performing a comparison test based on the first transaction result, the second transaction result, the first post-disk imported clearing result and the second post-disk imported clearing result to obtain a test result;
the step of retrieving test data and directory files according to the test instruction includes:
analyzing the test instruction to obtain the test data and the address of the directory file;
reading the test data and the directory file according to the address;
the test data comprises an account identifier, a test case and an account, and the directory file comprises a document directory, a comparison test directory, a file directory and a public configuration directory;
The detecting the test environment comprises:
acquiring whether the connection of an installation package, a database, an operation assembly and a standard gateway corresponding to the heterogeneous system after the test environment is deployed is normal;
detecting whether the connection of the peripheral interfaces of the original centralized transaction system of the client is normal or not;
the inquiring transaction information according to the directory file comprises the following steps:
acquiring a case file from the directory file;
acquiring the service type, the securities state and the trade direction in the case file as service parameter information;
determining the service parameter information as a query field to query in the database to obtain a corresponding security code;
backfilling the security code as the transaction information;
the detecting order reachability of the heterogeneous system includes:
determining a current account according to the test data;
checking fund data and holding data of the current account, checking whether the current consignment price and the current consignment quantity are consigned successfully or not and outputting consignment results according to the service type and the transaction direction and through a transaction interface, the database and the operation assembly of the heterogeneous system;
When the fund data and the warehouse holding data pass the verification, the current consignment price and the current consignment quantity consignment succeed and a consignment result is output, determining that the order reachability passes the detection; or alternatively
And when the fund data and the holding data are not checked, or the current consignment price and the current consignment quantity are not consigned successfully, and a consignment result is output, determining that the order reachability is not detected.
2. The transaction system based conversion testing method of claim 1, further comprising:
reading a test case in the test data;
after the test case is read, acquiring an account identifier from the test data;
according to the account identifier, securities of a securities account, a fund account, a securities price, a private account, a two-share securities account, an ETF component share, an ETF trading unit and an option mark are called from the database as account information;
caching the account information into a configuration file catalog;
in the testing process, when the database is abnormally connected, the account information is called from the configuration file catalogue;
when the account information is cached in the configuration file catalog, the same account information is cached once with a time stamp.
3. The transaction system based conversion testing method of claim 1, further comprising:
in the test process, acquiring a last historical test result of a case file belonging to the same sheet;
and when the historical test result is a passing test, skipping the execution of the case file, and writing the historical test result into the test result.
4. The method of claim 1, wherein comparing the test based on the first transaction result, the second transaction result, the first post-disk import clearing result, and the second post-disk import clearing result to obtain test results comprises:
comparing the first transaction result with the second transaction result field by field, and comparing the first disc post-import clearing result with the second disc post-import clearing result;
when the first transaction result is the same as the second transaction result and the first disc post-import clearing result is the same as the second disc post-import clearing result, determining that the test result is a passing test; or alternatively
And when the first transaction result is different from the second transaction result and/or the first disc post-import clearing result is different from the second disc post-import clearing result, determining that the test result is not passed.
5. A transaction system conversion based testing device, the transaction system conversion based testing device comprising:
the detection unit is used for responding to a test instruction based on conversion between the original centralized transaction system of the client and the heterogeneous system and detecting a test environment;
the calling unit is used for calling the test data and the directory file according to the test instruction when the test environment passes the detection;
the inquiring unit is used for inquiring transaction information according to the directory file;
the detection unit is also used for detecting the order accessibility of the heterogeneous system;
the order issuing unit is used for accessing an interface of the original centralized transaction system of the client and issuing an order according to the transaction information and the test data when the order accessibility passes detection, and accessing an interface of the heterogeneous system and issuing an order according to the transaction information and the test data;
the acquisition unit is used for acquiring a first transaction result and a first disc post-import clearing result of the original centralized transaction system of the client, and acquiring a second transaction result and a second disc post-import clearing result of the heterogeneous system;
the test unit is used for carrying out comparison test based on the first transaction result, the second transaction result, the first disc post-import clearing result and the second disc post-import clearing result to obtain a test result;
The step of retrieving test data and directory files according to the test instruction includes:
analyzing the test instruction to obtain the test data and the address of the directory file;
reading the test data and the directory file according to the address;
the test data comprises an account identifier, a test case and an account, and the directory file comprises a document directory, a comparison test directory, a file directory and a public configuration directory;
the detecting the test environment comprises:
acquiring whether the connection of an installation package, a database, an operation assembly and a standard gateway corresponding to the heterogeneous system after the test environment is deployed is normal;
detecting whether the connection of the peripheral interfaces of the original centralized transaction system of the client is normal or not;
the inquiring transaction information according to the directory file comprises the following steps:
acquiring a case file from the directory file;
acquiring the service type, the securities state and the trade direction in the case file as service parameter information;
determining the service parameter information as a query field to query in the database to obtain a corresponding security code;
backfilling the security code as the transaction information;
The detecting order reachability of the heterogeneous system includes:
determining a current account according to the test data;
checking fund data and holding data of the current account, checking whether the current consignment price and the current consignment quantity are consigned successfully or not and outputting consignment results according to the service type and the transaction direction and through a transaction interface, the database and the operation assembly of the heterogeneous system;
when the fund data and the warehouse holding data pass the verification, the current consignment price and the current consignment quantity consignment succeed and a consignment result is output, determining that the order reachability passes the detection; or alternatively
And when the fund data and the holding data are not checked, or the current consignment price and the current consignment quantity are not consigned successfully, and a consignment result is output, determining that the order reachability is not detected.
6. A computer device, the computer device comprising:
a memory storing at least one instruction; a kind of electronic device with high-pressure air-conditioning system
A processor executing instructions stored in the memory to implement the transaction system based conversion testing method of any one of claims 1 to 4.
7. A computer-readable storage medium, characterized by: the computer-readable storage medium having stored therein at least one instruction for execution by a processor in a computer device to implement the transaction system transition-based test method of any one of claims 1 to 4.
CN202310804642.6A 2023-07-03 2023-07-03 Test method, device, equipment and medium based on transaction system conversion Active CN116541309B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310804642.6A CN116541309B (en) 2023-07-03 2023-07-03 Test method, device, equipment and medium based on transaction system conversion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310804642.6A CN116541309B (en) 2023-07-03 2023-07-03 Test method, device, equipment and medium based on transaction system conversion

Publications (2)

Publication Number Publication Date
CN116541309A CN116541309A (en) 2023-08-04
CN116541309B true CN116541309B (en) 2023-09-29

Family

ID=87445609

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310804642.6A Active CN116541309B (en) 2023-07-03 2023-07-03 Test method, device, equipment and medium based on transaction system conversion

Country Status (1)

Country Link
CN (1) CN116541309B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240910A (en) * 2018-08-13 2019-01-18 兴业证券股份有限公司 Security software trade function test method and storage medium
CN112134764A (en) * 2020-09-27 2020-12-25 中国银行股份有限公司 Method and device for determining connectivity of test environment
CN115131008A (en) * 2022-08-30 2022-09-30 深圳星云智联科技有限公司 Method for realizing differentiated checking mechanism and related product
CN115936886A (en) * 2023-03-15 2023-04-07 深圳华锐分布式技术股份有限公司 Failure detection method, device, equipment and medium for heterogeneous security trading system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1606755A4 (en) * 2003-03-25 2007-01-03 Tradeweb Group L L C Method and system for effecting straight-through-processing of trades of various financial instruments
AU2018256664A1 (en) * 2018-11-02 2020-05-21 Australian Bond Exchange Holdings Limited System and Computer Implemented Method for Facilitating the Transaction and Settlement of a Financial Instrument

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240910A (en) * 2018-08-13 2019-01-18 兴业证券股份有限公司 Security software trade function test method and storage medium
CN112134764A (en) * 2020-09-27 2020-12-25 中国银行股份有限公司 Method and device for determining connectivity of test environment
CN115131008A (en) * 2022-08-30 2022-09-30 深圳星云智联科技有限公司 Method for realizing differentiated checking mechanism and related product
CN115936886A (en) * 2023-03-15 2023-04-07 深圳华锐分布式技术股份有限公司 Failure detection method, device, equipment and medium for heterogeneous security trading system

Also Published As

Publication number Publication date
CN116541309A (en) 2023-08-04

Similar Documents

Publication Publication Date Title
CN115936886B (en) Failure detection method, device, equipment and medium for heterogeneous securities trading system
CN113379391A (en) Work order processing method and device, electronic equipment and computer readable storage medium
CN116501610B (en) Method, device, equipment and medium for testing market transaction system
CN116541309B (en) Test method, device, equipment and medium based on transaction system conversion
CN111242779A (en) Financial data characteristic selection and prediction method, device, equipment and storage medium
CN114840388A (en) Data monitoring method and device, electronic equipment and storage medium
CN115168848A (en) Interception feedback processing method based on big data analysis interception
CN114399397A (en) Renewal tracking method, device, equipment and medium
CN114372892A (en) Payment data monitoring method, device, equipment and medium
CN113419718A (en) Data transmission method, device, equipment and medium
CN112686759A (en) Account checking monitoring method, device, equipment and medium
CN114157634A (en) Unique account identification method, device, equipment and storage medium
CN116225971B (en) Transaction interface compatibility detection method, device, equipment and medium
CN116414699B (en) Operation and maintenance testing method, device, equipment and medium
CN115964307B (en) Automatic test method, device, equipment and medium for transaction data
CN116934263B (en) Product batch admittance method, device, equipment and medium
CN116225789B (en) Transaction system backup capability detection method, device, equipment and medium
CN117056337A (en) Service data sorting method, device, equipment and medium
CN115731047B (en) Batch order processing method, equipment and medium
CN116630048B (en) Trading method, device, equipment and medium based on futures quotation K line
CN114614993B (en) System interaction method and device, electronic equipment and storage medium
CN116823141A (en) Payment data processing method, device, equipment and medium
CN114139199A (en) Data desensitization method, apparatus, device and medium
CN116821876A (en) Processing method, device, equipment and medium for product configuration data
CN112634045A (en) Data processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant