CN116302952A - Test method, related device and computer storage medium of civil aviation information system - Google Patents
Test method, related device and computer storage medium of civil aviation information system Download PDFInfo
- Publication number
- CN116302952A CN116302952A CN202310033904.3A CN202310033904A CN116302952A CN 116302952 A CN116302952 A CN 116302952A CN 202310033904 A CN202310033904 A CN 202310033904A CN 116302952 A CN116302952 A CN 116302952A
- Authority
- CN
- China
- Prior art keywords
- test case
- target
- test
- unit
- target test
- 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.)
- Pending
Links
- 238000003860 storage Methods 0.000 title claims abstract description 27
- 238000010998 test method Methods 0.000 title claims abstract description 15
- 238000012360 testing method Methods 0.000 claims abstract description 336
- 238000000034 method Methods 0.000 claims abstract description 46
- 238000000586 desensitisation Methods 0.000 claims abstract description 38
- 238000004519 manufacturing process Methods 0.000 claims description 70
- 238000004458 analytical method Methods 0.000 claims description 33
- 238000004590 computer program Methods 0.000 claims description 15
- 238000004088 simulation Methods 0.000 claims description 14
- 230000002950 deficient Effects 0.000 claims description 8
- 230000007547 defect Effects 0.000 claims description 3
- 238000012795 verification Methods 0.000 abstract description 10
- 230000006870 function Effects 0.000 description 15
- 238000010276 construction Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 8
- 238000012545 processing Methods 0.000 description 7
- 230000003993 interaction Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 3
- 238000013507 mapping Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000002427 irreversible effect Effects 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 230000002441 reversible effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application provides a test method of a civil aviation information system, a related device and a computer storage medium, wherein the method comprises the following steps: obtaining a target test case; setting a precondition for executing a target test case in a tested system, and calling related services of the tested system; if the tested system sends a request to an external system, searching a target request message in a desensitization test case library; if the tested system sends a request message to an external system and is consistent with the target request message, a corresponding reply message is found in a target test case; then, the external system is simulated to reply the tested system by using the reply message; after the tested system executes the reply message, an execution result of the test is obtained; and if the execution result of the test is consistent with the expected result in the target test case, determining that the target test case passes the test. Therefore, the security in the system testing process is effectively improved while the credibility and the integrity of verification are ensured.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for testing a civil aviation information system, and a computer storage medium.
Background
The civil aviation passenger service system (Passenger Service System, PSS for short) is born in the 60 th century, and forms full-flow civil aviation passenger information service including flight management, reservation sales, departure service and the like through half-century technical evolution and business accumulation. Because the PSS system has the requirements of complex business, dense transaction, strong real-time performance, high safety, high reliability and the like, the basic technology of the PSS system is monopolized by foreign companies for many years. The current two modules of ticket and reservation of the avionics PSS system support the core business of the airlines and the agents to run on the host, and in order to get rid of the dependence on foreign suppliers, the work of constructing and verifying the open reservation and ticket core transaction system which do not depend on the host is started.
The core reservation and ticket service de-hosting work mainly faces three major challenges:
1. the method relates to hundreds of instruction function transfer of an original host system, and if all regression verification is performed by adopting a traditional manual design test case mode, the workload is huge and the time consumption is extremely long.
2. The production flow log is utilized to construct the playback verification of the test case in the offline environment, so that the risk of influencing the production safety can be avoided, the diversity of data and scenes of the production environment can be restored, and the successful on-line production of the follow-up production can be ensured. However, the civil aviation passenger service system is a key information infrastructure defined by a national institute, and if the public privacy information such as passenger name, certificate number, contact mode and the like exists in the production log and the data snapshot, if a large amount of production data is directly converted into a test case to be imported into a test environment, a large amount of public information leakage risk can be brought.
3. The civil aviation reservation and ticket system has message interaction with a plurality of external systems, such as a foreign airline information system, a global distribution system, a payment platform system and the like, in the process of processing transactions. Coordinating these external systems and system co-testing is a difficult task, and even though co-debugging is performed, the external systems have limited resources and assistance, and it is impossible to perform testing with full-function coordination for a long time, so how to verify the external system messaging processing logic of the system is one of the difficult problems.
Disclosure of Invention
In view of this, the present application provides a testing method, related device and computer storage medium for civil aviation information system, which effectively improves the security in the testing process of the system without affecting the performance and logic of the production system while guaranteeing the reliability and integrity of the verification, and can simulate the external system to receive the request of the tested system and send the simulated return to the tested system, thereby being beneficial to fully verifying the correctness of the related functions of the tested system before the joint debugging of the formal and external systems.
The first aspect of the application provides a test method of a civil aviation information system, which comprises the following steps:
obtaining a target test case; the target test case is a test case obtained by analyzing and constructing a production log or a business data snapshot in a production environment and desensitizing the test case;
setting a precondition for executing the target test case in a tested system, and calling related services of the tested system;
if the tested system sends a request to an external system, searching a target request message in a desensitization test case library; the target request message is a request message generated by a production system in a target test case;
judging whether the message of the request sent by the tested system to the external system is consistent with the target request message or not;
if the fact that the message of the request sent by the tested system to the external system is inconsistent with the target request message is judged, the tested system is indicated to be defective, and the error is recorded;
if the fact that the message of the request sent by the tested system to the external system is consistent with the target request message is judged, a corresponding reply message is found in the target test case;
Simulating an external system to reply the tested system by using the reply message;
after the tested system executes the reply message, an execution result of the test is obtained;
judging whether the execution result of the test is consistent with the expected result in the target test case;
if the execution result of the test is judged to be consistent with the expected result in the target test case, determining that the target test case passes the test;
and if the execution result of the test is inconsistent with the expected result in the target test case, determining that the target test case fails the test.
Optionally, the method for generating the target test case includes:
analyzing the production log at intervals of preset time to obtain first analysis information;
generating a first test case according to the first analysis information;
and desensitizing the first test case to obtain a target test case.
Optionally, the method for generating the target test case includes:
when a transaction occurs in a production system, acquiring a business data snapshot of the transaction;
analyzing the business data snapshot of the transaction to obtain second analysis information;
Generating a second test case according to the second analysis information;
and desensitizing the second test case to obtain a target test case.
Optionally, after obtaining the target test case, the method further includes:
and storing the target test cases in a desensitization test case library.
A second aspect of the present application provides a test device for a civil aviation information system, including:
the first acquisition unit is used for acquiring a target test case; the target test case is a test case obtained by analyzing and constructing a production log or a business data snapshot in a production environment and desensitizing the test case;
the execution unit is used for setting a precondition for executing the target test case in the tested system and calling related services of the tested system;
the first searching unit is used for searching a target request message in the desensitization test case library if the tested system sends a request to an external system; the target request message is a request message generated by a production system in a target test case;
the first judging unit is used for judging whether the message of the request sent by the tested system to the external system is consistent with the target request message or not;
The recording unit is used for indicating that the tested system has defects if the first judging unit judges that the tested system sends a request message to an external system and the target request message is inconsistent, and recording the errors;
the second searching unit is used for searching a corresponding reply message in the target test case if the first judging unit judges that the message of the request sent by the tested system to the external system is consistent with the target request message;
the simulation replying unit is used for simulating an external system to reply the tested system by using the reply message;
the second acquisition unit is used for acquiring an execution result of the test after the tested system executes the reply message;
the second judging unit is used for judging whether the execution result of the current test is consistent with the expected result in the target test case;
the determining unit is used for determining that the target test case passes the test if the second judging unit judges that the execution result of the current test is consistent with the expected result in the target test case;
and the determining unit is further configured to determine that the target test case fails the test if the second judging unit judges that the execution result of the current test is inconsistent with the expected result in the target test case.
Optionally, the generating unit of the target test case includes:
the first analysis unit is used for analyzing the production log at intervals of preset time to obtain first analysis information;
the first generation unit is used for generating a first test case according to the first analysis information;
and the first desensitization unit is used for desensitizing the first test case to obtain a target test case.
Optionally, the generating unit of the target test case includes:
the third acquisition unit is used for acquiring a business data snapshot of the transaction when the transaction occurs in the production system;
the second analysis unit is used for analyzing the business data snapshot of the transaction to obtain second analysis information;
the second generating unit is used for generating a second test case according to the second analysis information;
and the second desensitization unit is used for desensitizing the second test case to obtain a target test case.
Optionally, the testing device of the civil aviation information system further includes:
and the storage unit is used for storing the target test cases into a desensitization test case library.
A third aspect of the present application provides an electronic device, comprising:
one or more processors;
A storage device having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of testing a civil aviation information system as defined in any one of the first aspects.
A fourth aspect of the present application provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a method of testing a civil aviation information system as claimed in any one of the first aspects.
As can be seen from the above schemes, the present application provides a method for testing a civil aviation information system, a related device and a computer storage medium, where the method for testing a civil aviation information system includes: obtaining a target test case; the target test case is a test case obtained by analyzing and constructing a production log or a business data snapshot in a production environment and desensitizing the test case; setting a precondition for executing the target test case in a tested system, and calling related services of the tested system; if the tested system sends a request to an external system, searching a target request message in a desensitization test case library; the target request message is a request message generated by a production system in a target test case; judging whether the message of the request sent by the tested system to the external system is consistent with the target request message or not; if the fact that the message of the request sent by the tested system to the external system is inconsistent with the target request message is judged, the tested system is indicated to be defective, and the error is recorded; if the fact that the message of the request sent by the tested system to the external system is consistent with the target request message is judged, a corresponding reply message is found in the target test case; then, simulating an external system to reply the tested system by using the reply message; after the tested system executes the reply message, an execution result of the test is obtained; judging whether the execution result of the test is consistent with the expected result in the target test case; if the execution result of the test is judged to be consistent with the expected result in the target test case, determining that the target test case passes the test; and if the execution result of the test is inconsistent with the expected result in the target test case, determining that the target test case fails the test. Therefore, the reliability and the integrity of verification are ensured, the safety in the system testing process is effectively improved, the performance and logic of the production system are not affected, the request of an external system for receiving a tested system can be simulated, and the simulation return is sent to the tested system, so that the correctness of the related functions of the tested system can be fully verified before formal and external system joint debugging.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
Fig. 1 is a specific flowchart of a testing method of a civil aviation information system provided in an embodiment of the present application;
fig. 2 is a flowchart of a testing method of a civil aviation information system according to another embodiment of the present application;
fig. 3 is a flowchart of a testing method of a civil aviation information system according to another embodiment of the present application;
fig. 4 is an overall frame diagram of a testing method of a civil aviation information system according to another embodiment of the present application;
fig. 5 is a schematic diagram of a testing device of a civil aviation information system according to another embodiment of the present application;
fig. 6 is a schematic diagram of an electronic device for implementing a testing method of a civil aviation information system according to another embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like herein are merely used for distinguishing between different devices, modules, or units and not for limiting the order or interdependence of the functions performed by such devices, modules, or units.
It should be noted that references to "one" or "a plurality" in this application are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be interpreted as "one or more" unless the context clearly indicates otherwise.
The embodiment of the application provides a test method of a civil aviation information system, as shown in fig. 1, specifically comprising the following steps:
s101, acquiring a target test case.
The target test cases are test cases obtained by analyzing and constructing production logs or business data snapshots in a production environment and desensitizing the production logs or business data snapshots.
In the specific implementation process of the application, the target test case can be obtained from a desensitization test case library through a test case execution component.
The target test cases in this application are divided into four parts:
(1) The precondition is a snapshot of relevant business data prior to a transaction in the production system, including but not limited to order data, ticket data, sales data, and the like.
(2) The trigger condition, i.e. the request that triggers the production system to process the transaction, may be an HTTP request, or an EDI or other type of request.
(3) The external system simulation data is mainly an external system reply message, and is used for sending the reply message to the tested system by the external system simulation component in the execution process of the test case.
(4) The expected result, if the actual result of the executed test case of the tested system is consistent with the expected result, passing the test; otherwise, the tested system may have defects and needs further analysis. For civil aviation reservation and ticket systems, the expected results mainly comprise replies sent to the requesting party, business data after transaction, and request messages sent to an external system in the transaction processing process.
Optionally, in another embodiment of the present application, an implementation manner of the method for generating the target test case, as shown in fig. 2, includes:
S201, analyzing the production log every preset time to obtain first analysis information.
In the specific implementation process of the method, the production log can be pushed to the test case construction component through the production log and service data snapshot pushing component, and the test case construction component analyzes the production log to obtain first analysis information.
S202, generating a first test case according to the first analysis information.
Continuing with the above example, a first test case is generated by a "test case build component" from the first parsing information.
And S203, desensitizing the first test case to obtain a target test case.
Continuing with the above example, the first test case is desensitized by a "desensitizing component" to obtain a target test case.
Optionally, in another embodiment of the present application, an implementation manner of the method for generating the target test case, as shown in fig. 3, includes:
s301, when a transaction occurs in the production system, acquiring a business data snapshot of the transaction.
S302, analyzing the business data snapshot of the transaction to obtain second analysis information.
In the specific implementation process of the method, the business data snapshot of the transaction can be pushed to the test case construction assembly through the production log and business data snapshot pushing assembly, and the test case construction assembly analyzes the business data snapshot of the transaction to obtain second analysis information.
S303, generating a second test case according to the second analysis information.
Continuing with the above example, a second test case is generated by the "test case build component" from the second parsing information.
S304, desensitizing the second test case to obtain a target test case.
Continuing with the above example, the second test case is desensitized by a "desensitizing component" to obtain a target test case.
Optionally, in another embodiment of the present application, after obtaining the target test case, the method further includes:
the target test cases are stored in a desensitized test case library.
It should be noted that, the production log and the service data are pushed, when the implementation is performed, FTP transmission is adopted, the pushing component pushes the production log to the test case construction component once every preset time, and when the transaction occurs in the production system, the service data snapshot of the corresponding transaction is pushed to the test case construction component.
It should be further noted that, the service data pushed by the pushing component includes order data, the order structure used by the host system on production is PNR, the order structure used by the open reservation system in the test system is an open order, and the PNR and the main service fields of the open order are the same, but the structures are different and heterogeneous. Therefore, the construction of the test case component comprises the function of converting PNR orders in service data into open order snapshots, and then the open order snapshots can be used as pre-trade and post-trade service data snapshots in test cases.
In order to implement the function of reservation ticket, the production system involves a host system, an open service engine (IBE), a general service interface (SAT), etc., which have different production logs, and even the same system has multiple logs with different formats. In order to construct a complete test case, the component for constructing the test case has the function of integrating related transaction information in various logs and restoring a transaction scene. The various log information may be integrated by associating, but not limited to, various information such as transaction time, transaction ID, transaction Office, passenger behavior pattern, etc.
Because the transaction number is not recorded in the business data snapshot, the test case assembly needs to be constructed according to the information of the transaction number, the transaction time, the PNR number and the like, and the data snapshots before and after the transaction are associated with the corresponding test cases.
In the specific implementation process of the method, due to the requirement of playback verification, the desensitization algorithm is irreversible, sensitive information is not revealed, and the security of private data of passengers is ensured; moreover, the desensitization must not interfere with the operation of the verification case, business processing, and availability. Therefore, for data such as telephone, address, etc. which is only used for recording and displaying, the whole is replaced with other character strings according to the desensitization rule. For data that would affect the processing logic, encryption is performed according to the traffic requirements. Such as: the system can judge whether the passenger type is adult, child or infant according to the birth date in the identity card, the passenger type can influence the free luggage amount, the optional seat position and the like, so that when the identity card number is desensitized, the part representing the birth date needs to be reserved, other information is replaced by character strings with equal length, and finally the last check code is calculated according to a check algorithm issued by the public security department.
Specifically, the passenger name is desensitized:
the name is used as the unique mark of the passenger in the business process, is not available for the duplicate name in the same order, and is divided into a Chinese name and a Pinyin name. Some names have suffixes such as: CHD (representing a child passenger), VVIP/(representing a particularly important passenger), etc., the suffix may affect the system's handling rules for the passenger.
Desensitization requirement: the passenger name is not repeated within the same PNR and the name suffix is retained.
Passengers with chinese names: the Chinese name and the corresponding name pinyin are replaced according to the appearance sequence of the passengers, and the replacement rule is that common names are added with Chinese numbers.
The second generation ID card number of the people's republic of China is desensitized:
the length of the second-generation identity card is 18 bits (3 bits province code+3 bits region code+8 bits birthday+3 bits sequence code+1 bit check bit), the civil aviation information system can judge the type of the passenger (adult, child and infant) by using the birthday information in the identity card, and the type of the passenger can influence the processing logic of the system, so that 8 bits of birthday information must be reserved after desensitization.
Desensitization protocol: the region codes from 1 st bit to 6 th bit are replaced by '123456', the sequence codes from 2 nd bit to 4 th bit are replaced by '123', and then the last check code is calculated according to a check algorithm issued by the public security department. For example: the pre-desensitization identity number is 110102198206175117 and the post-desensitization identity number is 123456198206175117.
In the specific implementation process, the desensitization range is as follows: passenger name class (chinese name, english name), certificate information class (valid certificate information such as identity card, passport, port australian pass, cell card, frequent-check card number, etc.), telephone number (landline phone and cell phone number), address (passenger address), payment information class (bank card number, credit card number).
The desensitized object is: all data in the test cases that are within the desensitization range.
The desensitized data must remain consistent throughout the transaction. Such as: if a passenger name is desensitized to be Zhang Sang, in the same test case, no matter the business data snapshot, the request message, the reply message from the external system to the tested system, etc., the place where the passenger name appears should be desensitized to be Zhang Sang, and the logical consistency of the data is maintained. Therefore, the desensitization component firstly desensitizes the sensitive data in the transaction data snapshot, records the mapping relation between the information before desensitization and the information after desensitization, and then desensitizes the sensitive information in the related message according to the mapping relation.
S102, setting preconditions for executing target test cases in the tested system, and calling related services of the tested system.
Specifically, the "test case execution component" executes the target test case, sets preconditions for executing the target test case in the tested system, and invokes relevant services of the tested system.
S103, if the tested system sends a request to an external system, searching a target request message in a desensitization test case library.
The target request message is a request message generated by a production system in a target test case.
Specifically, if the tested system sends a request to the external system, the external system simulation component receives the request, and the external system simulation component searches for a target request message in the desensitization test case library.
S104, judging whether the request message sent by the tested system to the external system is consistent with the target request message.
Specifically, if it is determined that the request message sent by the tested system to the external system is inconsistent with the target request message, step S105 is executed; if it is determined that the request message sent by the tested system to the external system is consistent with the target request message, step S106 is executed.
S105, the tested system is defective, and the error is recorded.
S106, finding out a corresponding reply message in the target test case.
S107, the external system is simulated to reply the tested system by using the reply message.
S108, after the tested system executes the reply message, an execution result of the test is obtained.
S109, judging whether the execution result of the test is consistent with the expected result in the target test case.
Specifically, if it is determined that the execution result of the present test is consistent with the expected result in the target test case, step S110 is executed; if it is determined that the execution result of the current test is inconsistent with the expected result in the target test case, step S111 is executed.
S110, determining that the target test case passes the test.
S111, determining that the target test case fails the test.
As shown in fig. 4, an overall frame diagram of a testing method of a civil aviation information system provided in an embodiment of the present application is:
the method comprises the following steps of (1) pushing log information and service data snapshots in a production environment to (test case construction assembly) by (a) a production log and service data snapshot pushing assembly).
And 2, analyzing the pushed production log and data snapshot information to construct a test case.
Step 3 [ desensitizing component ] mainly desensitizes the sensitive data in the test cases, and pushes the desensitized test cases to the test environment [ desensitizing test case library ] through the [ gatekeeper ].
Step 4 [ test case execution component ] obtains test cases from [ desensitized test case library ].
And 5, executing the test case, setting a precondition for executing the test case in the tested system, and calling the related service of the tested system.
Step 6 if the tested system sends a request to the external system, the external system simulation component receives the request.
And 7, accessing a desensitization test case library, searching a corresponding request message, comparing whether the request message generated by the tested system is consistent with the request message generated by the production system in the test case, and if the corresponding request message is not found or the generated message is inconsistent, indicating that the tested system is defective and recording errors.
Step 8 [ external System simulation component ] if a consistent request message is found in the test case, a reply message corresponding to the request is found in the test case, and then the found reply message is sent to [ System under test ].
Step 9 [ test case execution component ] obtains the execution result of the tested system, compares the execution result with the expected result in the test case to determine whether the test case passes.
It can be seen that case creation and data desensitization are accomplished in a production environment, the desensitized cases are pushed to a testing environment by a designated gatekeeper, and then a solution for testing is performed in the testing environment. According to the technical scheme, firstly, according to log data of a production environment, a request and a response message related to interaction with an external system in a certain transaction and corresponding business data snapshots such as orders, tickets and the like before and after the transaction are compared and identified, a test case of the transaction is generated, an existing host business scene is reproduced, and the authenticity and the integrity of playback verification are ensured; then desensitizing the sensitive information in the test case, providing the desensitized sensitive information for the test environment, and protecting the privacy data of passengers; and finally, verifying the tested system by executing the desensitized test cases in the test environment, and if the interaction with the external system is involved in the test cases, simulating the interaction between the external system and the tested system by using the external system simulation component, and replacing and coordinating the external system in the mode, so as to fully verify the capability of the to-be-tested system and the external system for message interaction.
According to the scheme, the application provides a test method of a civil aviation information system, which comprises the following steps: obtaining a target test case; the target test case is a test case obtained by analyzing and constructing a production log or a business data snapshot in a production environment and desensitizing the test case; setting a precondition for executing a target test case in a tested system, and calling related services of the tested system; if the tested system sends a request to an external system, searching a target request message in a desensitization test case library; the target request message is a request message generated by a production system in a target test case; judging whether the request message sent by the tested system to the external system is consistent with the target request message; if the fact that the request message sent by the tested system to the external system is inconsistent with the target request message is judged, the tested system is indicated to be defective, and the error is recorded; if the request message sent by the tested system to the external system is judged to be consistent with the target request message, a corresponding reply message is found in the target test case; then, the external system is simulated to reply the tested system by using the reply message; after the tested system executes the reply message, an execution result of the test is obtained; judging whether the execution result of the test is consistent with the expected result in the target test case; if the execution result of the test is judged to be consistent with the expected result in the target test case, determining that the target test case passes the test; if the execution result of the test is inconsistent with the expected result in the target test case, determining that the target test case fails the test. Therefore, the reliability and the integrity of verification are ensured, the safety in the system testing process is effectively improved, the performance and logic of the production system are not affected, the request of an external system for receiving a tested system can be simulated, and the simulation return is sent to the tested system, so that the correctness of the related functions of the tested system can be fully verified before formal and external system joint debugging.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The names of messages or information interacted between the various devices in the embodiments of the present application are for illustrative purposes only and are not intended to limit the scope of such messages or information.
Computer program code for carrying out operations of the present application may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Python, java, C ++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Another embodiment of the present application provides a testing device for a civil aviation information system, as shown in fig. 5, specifically including:
a first obtaining unit 501, configured to obtain a target test case.
The target test cases are test cases obtained by analyzing and constructing production logs or business data snapshots in a production environment and desensitizing the production logs or business data snapshots.
Optionally, in another embodiment of the present application, an implementation of the generating unit of the target test case includes:
the first analysis unit is used for analyzing the production log at intervals of preset time to obtain first analysis information.
The first generation unit is used for generating a first test case according to the first analysis information.
And the first desensitization unit is used for desensitizing the first test case to obtain a target test case.
The specific working process of the unit disclosed in the foregoing embodiments of the present application may refer to the content of the corresponding method embodiment, as shown in fig. 2, which is not described herein again.
Optionally, in another embodiment of the present application, an implementation of the generating unit of the target test case includes:
and the third acquisition unit is used for acquiring a business data snapshot of the transaction when the transaction occurs in the production system.
And the second analysis unit is used for analyzing the business data snapshot of the transaction to obtain second analysis information.
And the second generating unit is used for generating a second test case according to the second analysis information.
And the second desensitization unit is used for desensitizing the second test case to obtain a target test case.
The specific working process of the unit disclosed in the foregoing embodiments of the present application may refer to the content of the corresponding method embodiment, as shown in fig. 3, which is not described herein again.
Optionally, in another embodiment of the present application, an implementation manner of the test device of the civil aviation information system further includes:
and the storage unit is used for storing the target test cases into the desensitization test case library.
The specific working process of the unit disclosed in the foregoing embodiments of the present application may refer to the content of the corresponding method embodiment, which is not described herein again.
And the execution unit 502 is used for setting preconditions for executing the target test case in the tested system and calling related services of the tested system.
The first searching unit 503 is configured to search the desensitization test case library for the target request message if the tested system sends a request to the external system.
The target request message is a request message generated by a production system in a target test case.
A first determining unit 504, configured to determine whether the request message sent by the tested system to the external system is consistent with the target request message.
A recording unit 505, configured to, if the first determining unit 504 determines that the request message sent by the tested system to the external system is inconsistent with the target request message, indicate that the tested system is defective, and record the error.
The second searching unit 506 is configured to find a corresponding reply message in the target test case if the first judging unit 504 judges that the request message sent by the tested system to the external system is consistent with the target request message.
The simulation reply unit 507 is used for simulating the external system to reply the tested system by using the reply message.
The second obtaining unit 508 is configured to obtain an execution result of the current test after the tested system executes the reply message.
The second determining unit 509 is configured to determine whether the execution result of the current test is consistent with the expected result in the target test case.
And the determining unit 510 is configured to determine that the target test case passes the test if the second determining unit 509 determines that the execution result of the current test is consistent with the expected result in the target test case.
The determining unit 510 is further configured to determine that the target test case fails the test if the second determining unit 509 determines that the execution result of the current test is inconsistent with the expected result in the target test case.
The specific working process of the unit disclosed in the foregoing embodiments of the present application may refer to the content of the corresponding method embodiment, as shown in fig. 1, which is not repeated herein.
According to the scheme, the application provides a testing device of a civil aviation information system: the first acquisition unit 501 acquires a target test case; the target test case is a test case obtained by analyzing and constructing a production log or a business data snapshot in a production environment and desensitizing the test case; the execution unit 502 sets preconditions for executing the target test cases in the tested system and invokes relevant services of the tested system; if the tested system sends a request to an external system, the first searching unit 503 searches the desensitization test case library for a target request message; the target request message is a request message generated by a production system in a target test case; the first judging unit 504 judges whether the request message sent by the tested system to the external system is consistent with the target request message; if the first judging unit 504 judges that the message of the request sent by the tested system to the external system is inconsistent with the target request message, the tested system is indicated to be defective, and the recording unit 505 records the error; if the first judging unit 504 judges that the message of the request sent by the tested system to the external system is consistent with the target request message, the second searching unit 506 finds the corresponding reply message in the target test case; then, the simulation replying unit 507 uses the replying message to simulate the external system replying the tested system; after that, the second obtaining unit 508 obtains the execution result of the test after the tested system executes the reply message; the second judging unit 509 judges whether the execution result of the present test is consistent with the expected result in the target test case; if the second determining unit 509 determines that the execution result of the current test is consistent with the expected result in the target test case, the determining unit 510 determines that the target test case passes the test; if the second determining unit 509 determines that the execution result of the current test is inconsistent with the expected result in the target test case, the determining unit 510 determines that the target test case fails the test. Therefore, the reliability and the integrity of verification are ensured, the safety in the system testing process is effectively improved, the performance and logic of the production system are not affected, the request of an external system for receiving a tested system can be simulated, and the simulation return is sent to the tested system, so that the correctness of the related functions of the tested system can be fully verified before formal and external system joint debugging.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
Another embodiment of the present application provides an electronic device, as shown in fig. 6, including:
one or more processors 601.
A storage device 602 on which one or more programs are stored.
The one or more programs, when executed by the one or more processors 601, cause the one or more processors 601 to implement the method of testing a civil aviation information system as in any of the embodiments described above.
Another embodiment of the present application provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a method for testing a civil aviation information system as in any of the above embodiments.
In the context of this application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It should be noted that the computer readable medium described in the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, a computer-readable signal medium may include a data signal that propagates in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
Another embodiment of the present application provides a computer program product for performing the method of testing a civil aviation information system of any one of the above, when the computer program product is executed.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from ROM. The above-described functions defined in the methods of the embodiments of the present application are performed when the computer program is executed by a processing device.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.
While several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present application. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
The foregoing description is only of the preferred embodiments of the present application and is presented as a description of the principles of the technology being utilized. It will be appreciated by persons skilled in the art that the scope of the application referred to in this application is not limited to the specific combinations of features described above, but it is intended to cover other embodiments in which any combination of features described above or their equivalents is contemplated without departing from the spirit of the application. Such as the above-mentioned features and the technical features having similar functions (but not limited to) applied for in this application are replaced with each other.
Claims (10)
1. A method for testing a civil aviation information system, comprising:
obtaining a target test case; the target test case is a test case obtained by analyzing and constructing a production log or a business data snapshot in a production environment and desensitizing the test case;
Setting a precondition for executing the target test case in a tested system, and calling related services of the tested system;
if the tested system sends a request to an external system, searching a target request message in a desensitization test case library; the target request message is a request message generated by a production system in a target test case;
judging whether the message of the request sent by the tested system to the external system is consistent with the target request message or not;
if the fact that the message of the request sent by the tested system to the external system is inconsistent with the target request message is judged, the tested system is indicated to be defective, and the error is recorded;
if the fact that the message of the request sent by the tested system to the external system is consistent with the target request message is judged, a corresponding reply message is found in the target test case;
simulating an external system to reply the tested system by using the reply message;
after the tested system executes the reply message, an execution result of the test is obtained;
judging whether the execution result of the test is consistent with the expected result in the target test case;
If the execution result of the test is judged to be consistent with the expected result in the target test case, determining that the target test case passes the test;
and if the execution result of the test is inconsistent with the expected result in the target test case, determining that the target test case fails the test.
2. The test method of claim 1, wherein the method of generating the target test case comprises:
analyzing the production log at intervals of preset time to obtain first analysis information;
generating a first test case according to the first analysis information;
and desensitizing the first test case to obtain a target test case.
3. The test method of claim 1, wherein the method of generating the target test case comprises:
when a transaction occurs in a production system, acquiring a business data snapshot of the transaction;
analyzing the business data snapshot of the transaction to obtain second analysis information;
generating a second test case according to the second analysis information;
and desensitizing the second test case to obtain a target test case.
4. A test method according to claim 2 or 3, wherein after obtaining the target test case, further comprising:
and storing the target test cases in a desensitization test case library.
5. A test device for a civil aviation information system, comprising:
the first acquisition unit is used for acquiring a target test case; the target test case is a test case obtained by analyzing and constructing a production log or a business data snapshot in a production environment and desensitizing the test case;
the execution unit is used for setting a precondition for executing the target test case in the tested system and calling related services of the tested system;
the first searching unit is used for searching a target request message in the desensitization test case library if the tested system sends a request to an external system; the target request message is a request message generated by a production system in a target test case;
the first judging unit is used for judging whether the message of the request sent by the tested system to the external system is consistent with the target request message or not;
the recording unit is used for indicating that the tested system has defects if the first judging unit judges that the tested system sends a request message to an external system and the target request message is inconsistent, and recording the errors;
The second searching unit is used for searching a corresponding reply message in the target test case if the first judging unit judges that the message of the request sent by the tested system to the external system is consistent with the target request message;
the simulation replying unit is used for simulating an external system to reply the tested system by using the reply message;
the second acquisition unit is used for acquiring an execution result of the test after the tested system executes the reply message;
the second judging unit is used for judging whether the execution result of the current test is consistent with the expected result in the target test case;
the determining unit is used for determining that the target test case passes the test if the second judging unit judges that the execution result of the current test is consistent with the expected result in the target test case;
and the determining unit is further configured to determine that the target test case fails the test if the second judging unit judges that the execution result of the current test is inconsistent with the expected result in the target test case.
6. The test device of claim 5, wherein the generation unit of the target test case comprises:
The first analysis unit is used for analyzing the production log at intervals of preset time to obtain first analysis information;
the first generation unit is used for generating a first test case according to the first analysis information;
and the first desensitization unit is used for desensitizing the first test case to obtain a target test case.
7. The test device of claim 5, wherein the generation unit of the target test case comprises:
the third acquisition unit is used for acquiring a business data snapshot of the transaction when the transaction occurs in the production system;
the second analysis unit is used for analyzing the business data snapshot of the transaction to obtain second analysis information;
the second generating unit is used for generating a second test case according to the second analysis information;
and the second desensitization unit is used for desensitizing the second test case to obtain a target test case.
8. The test device of claim 6 or 7, further comprising:
and the storage unit is used for storing the target test cases into a desensitization test case library.
9. An electronic device, comprising:
one or more processors;
A storage device having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of testing a civil aviation information system as claimed in any one of claims 1 to 4.
10. A computer storage medium, characterized in that a computer program is stored thereon, wherein the computer program, when executed by a processor, implements a method of testing a civil aviation information system as claimed in any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310033904.3A CN116302952A (en) | 2023-01-10 | 2023-01-10 | Test method, related device and computer storage medium of civil aviation information system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310033904.3A CN116302952A (en) | 2023-01-10 | 2023-01-10 | Test method, related device and computer storage medium of civil aviation information system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116302952A true CN116302952A (en) | 2023-06-23 |
Family
ID=86798619
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310033904.3A Pending CN116302952A (en) | 2023-01-10 | 2023-01-10 | Test method, related device and computer storage medium of civil aviation information system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116302952A (en) |
-
2023
- 2023-01-10 CN CN202310033904.3A patent/CN116302952A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US12032554B2 (en) | Utilizing independently stored validation keys to enable auditing of instrument measurement data maintained in a blockchain | |
CN108932189B (en) | Method and device for saving server log | |
US20130185645A1 (en) | Determining repeat website users via browser uniqueness tracking | |
CN110188103A (en) | Data account checking method, device, equipment and storage medium | |
CN106899563A (en) | Method for authenticating and device, authentication code generating method and device, right discriminating system | |
CN108763071A (en) | A kind of webpage test method and terminal device | |
CN111651363B (en) | Test data acquisition method and device, electronic equipment and medium | |
CN113904821A (en) | Identity authentication method and device and readable storage medium | |
CN111835808B (en) | Data storage method and device, data reading method and device, and storage medium | |
US20220382665A1 (en) | Model-based biased random system test through rest api | |
CN113535577A (en) | Application testing method and device based on knowledge graph, electronic equipment and medium | |
CN115080827B (en) | Sensitive data processing method and device | |
CN116302952A (en) | Test method, related device and computer storage medium of civil aviation information system | |
CN116089920A (en) | Sensitive field early warning method, system, computer equipment and medium | |
CN112084114B (en) | Method and apparatus for testing interfaces | |
US20220269589A1 (en) | Automatically generating datasets by processing collaboration forums using artificial intelligence techniques | |
CN113609014A (en) | Interface field checking method and device, storage medium and electronic equipment | |
CN112187708B (en) | Automatic supplementing method and equipment for certificate chain of digital certificate | |
CN111475400A (en) | Verification method of service platform and related equipment | |
AU2019222794A1 (en) | Method and system for testing and validation of cryptographic algorithms | |
CN111786991A (en) | Block chain-based platform authentication login method and related device | |
CN111538663A (en) | Test case generation method and device, computing device and medium | |
US20160259828A1 (en) | Data comparison and analysis based on data analysis reporting | |
CN115147212A (en) | Verification method and device for account checking system | |
CN117240739A (en) | Method and device for testing consensus algorithm, 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 |