Testing Method, Related Device and Computer Storage Medium for Civil Aviation Information System

By constructing and desensitizing test cases in the civil aviation information system and simulating external system interaction, the time-consuming, privacy leakage and external joint testing of civil aviation system are solved, and efficient and safe system verification is achieved.

CN116302952BActive Publication Date: 2025-06-27TRAVELSKY TECHNOLOGY LIMITED
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310033904.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-10
Publication Date
2025-06-27
Estimated Expiration
2043-01-10

AI Technical Summary

Technical Problem

In the process of de-hosting core reservation and ticketing business, the civil aviation passenger service system faces the problems of traditional testing methods, the risk of leakage of citizens' privacy information, and the difficulty of joint testing of external systems.

Method used

Provide a test method for civil aviation information system, by analyzing production logs or business data snapshots in the production environment, and performing desensitization processing, simulating the interaction between the external system and the tested system, and verifying the correctness of the system's functional functions.

Benefits of technology

It improves the safety and efficiency of system testing, ensures the credibility and integrity of verification, and avoids the impact on the performance and logic of the production system, and can fully verify relevant functions before formal external system joint debugging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116302952B_ABST
    Figure CN116302952B_ABST
Patent Text Reader

Abstract

The present application provides a test method, related device and computer storage medium for a civil aviation information system. The method includes: obtaining a target test case; setting prerequisite conditions for executing the target test case in the system under test and invoking relevant services of the system under test; if the system under test sends a request to an external system, searching for a target request message in the desensitization test case library; if the message sent by the system under test to the external system is consistent with the target request message, finding a corresponding reply message in the target test case; then, using the reply message to simulate the external system to reply to the system under test; after the system under test executes the reply message, obtaining the execution result of this test; if the execution result of this test is consistent with the expected result in the target test case, determining that the target test case passes the test. Thus, while ensuring the credibility and integrity of verification, the security in the system test process is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and particularly to a test method, related device and computer storage medium for a civil aviation information system. Background Art

[0002] The civil aviation passenger service system (Passenger Service System, abbreviated as PSS) was born in the 1960s. After more than half a century of technological evolution and business accumulation, it has formed a civil aviation passenger information service covering the entire process such as flight management, reservation sales, and departure service. Due to the requirements of complex business, intensive transactions, strong real-time performance, high security, and high reliability of the PSS system, its basic technology has been monopolized by foreign companies for many years. At present, the ticket and reservation modules of the TravelSky PSS system that support the core businesses of airlines and agents are all running on the mainframe. In order to get rid of the dependence on foreign suppliers, the work of building and verifying an open reservation and ticket core transaction system that does not rely on the mainframe has been launched.

[0003] When the core reservation and ticket business is removed from the mainframe, the function verification work mainly faces three major problems:

[0004] First, it involves the transfer of hundreds of instruction functions of the original mainframe system. If all regression verifications are carried out in the traditional way of manually designing test cases, the workload is huge and the time consumption is extremely long.

[0005] Second, using production traffic logs to construct test cases for playback verification in an offline environment can not only avoid the risk of affecting production safety, but also restore the diversity of data and scenarios in the production environment to ensure the smooth subsequent production launch. However, the civil aviation passenger service system is a key information infrastructure defined by the State Council. There are citizen privacy information such as passenger names, ID numbers, and contact information in production logs and data snapshots. If a large amount of production data is directly converted into test cases and imported into the test environment, it will bring a risk of a large amount of citizen information leakage.

[0006] Third, the civil aviation reservation and ticket system has message interactions with many external systems during the process of processing transactions, such as foreign airline information systems, global distribution systems, payment platform systems, etc. Coordinating these external systems and system joint testing is a difficult task. Moreover, even during joint debugging, the resources and assistance provided by external systems are very limited, and it is impossible to cooperate with full functions for a long time for testing. Therefore, how to verify the message sending and receiving processing logic of the external systems of this system is also one of the difficult problems. Summary of the Invention

[0007] In view of this, the present application provides a testing method, related device and computer storage medium for a civil aviation information system, which can effectively improve the security during the system testing process while ensuring the credibility and integrity of verification, without affecting the performance and logic of the production system, and can also simulate an external system to receive requests from the system under test and send simulated responses to the system under test, which is beneficial to fully verify the correctness of relevant functions of the system under test before officially debugging with the external system.

[0008] The first aspect of the present application provides a testing method for a civil aviation information system, including:

[0009] Obtain a target test case; wherein, the target test case is a test case obtained by parsing and constructing production logs or business data snapshots in a production environment and performing desensitization.

[0010] Set preconditions for executing the target test case in the system under test, and call relevant services of the system under test.

[0011] If the system under test sends a request to an external system, search for a target request message in the desensitized test case library; wherein, the target request message is a request message generated by the production system in the target test case.

[0012] Judge whether the message sent by the system under test to the external system is consistent with the target request message.

[0013] If it is judged that the message sent by the system under test to the external system is inconsistent with the target request message, it indicates that there is a defect in the system under test, and record the current error.

[0014] If it is judged that the message sent by the system under test to the external system is consistent with the target request message, find the corresponding response message in the target test case.

[0015] Use the response message to simulate the external system to reply to the system under test.

[0016] After the system under test executes the response message, obtain the execution result of this test.

[0017] Judge whether the execution result of this test is consistent with the expected result in the target test case.

[0018] If it is judged that the execution result of this test is consistent with the expected result in the target test case, determine that the target test case passes the test.

[0019] If it is judged that the execution result of this test is inconsistent with the expected result in the target test case, determine that the target test case fails the test.

[0020] Optionally, the method for generating the target test case includes:

[0021] Parse the production log at preset intervals to obtain first parsing information;

[0022] Generate a first test case based on the first parsing information;

[0023] Desensitize the first test case to obtain the target test case.

[0024] Optionally, the method for generating the target test case includes:

[0025] When a transaction occurs in the production system, obtain a snapshot of the business data of the transaction;

[0026] Parse the snapshot of the business data of the transaction to obtain second parsing information;

[0027] Generate a second test case based on the second parsing information;

[0028] Desensitize the second test case to obtain the target test case.

[0029] Optionally, after obtaining the target test case, it further includes:

[0030] Store the target test case in the desensitized test case library.

[0031] The second aspect of the present application provides a test device for a civil aviation information system, including:

[0032] A first acquisition unit, configured to acquire a target test case; wherein, the target test case is a test case obtained by parsing and constructing a production log or a snapshot of business data in a production environment and then desensitizing it;

[0033] An execution unit, configured to set preconditions for executing the target test case in the system under test and call relevant services of the system under test;

[0034] A first search unit, configured to, if the system under test sends a request to an external system, search for a target request message in the desensitized test case library; wherein, the target request message is a request message generated by the production system in the target test case;

[0035] A first judgment unit, configured to judge whether the message sent by the system under test to the external system is consistent with the target request message;

[0036] A recording unit, which is used to record this error if the first judgment unit determines that the message of the request sent by the system under test to the external system is inconsistent with the target request message, indicating that there is a defect in the system under test.

[0037] A second search unit, which is used to find the corresponding reply message in the target test case if the first judgment unit determines that the message of the request sent by the system under test to the external system is consistent with the target request message.

[0038] A simulation reply unit, which is used to simulate the external system to reply to the system under test by using the reply message.

[0039] A second acquisition unit, which is used to obtain the execution result of this test after the system under test executes the reply message.

[0040] A second judgment unit, which is used to judge whether the execution result of this test is consistent with the expected result in the target test case.

[0041] A determination unit, which is used to determine that the target test case passes the test if the second judgment unit determines that the execution result of this test is consistent with the expected result in the target test case.

[0042] The determination unit is further used to determine that the target test case fails the test if the second judgment unit determines that the execution result of this test is inconsistent with the expected result in the target test case.

[0043] Optionally, the generation unit of the target test case includes:

[0044] A first parsing unit, which is used to parse the production log at preset intervals to obtain first parsing information.

[0045] A first generation unit, which is used to generate a first test case according to the first parsing information.

[0046] A first desensitization unit, which is used to desensitize the first test case to obtain the target test case.

[0047] Optionally, the generation unit of the target test case includes:

[0048] A third acquisition unit, which is used to obtain a snapshot of the business data of the transaction when a transaction occurs in the production system.

[0049] A second parsing unit, which is used to parse the snapshot of the business data of the transaction to obtain second parsing information.

[0050] A second generation unit, which is used to generate a second test case according to the second parsing information.

[0051] A second desensitization unit, configured to desensitize the second test case to obtain a target test case.

[0052] Optionally, the test device for the civil aviation information system further includes:

[0053] A storage unit, configured to store the target test case in a desensitized test case library.

[0054] A third aspect of the present application provides an electronic device, including:

[0055] One or more processors;

[0056] A storage device, on which one or more programs are stored;

[0057] When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the test method for the civil aviation information system according to any one of the first aspect.

[0058] A fourth aspect of the present application provides a computer storage medium, on which a computer program is stored, where when the computer program is executed by a processor, the test method for the civil aviation information system according to any one of the first aspect is implemented.

[0059] As can be seen from the above solution, the present application provides a test method, related device and computer storage medium for a civil aviation information system. The test method for the civil aviation information system includes: obtaining a target test case; wherein, the target test case is a test case obtained by parsing and constructing production logs or business data snapshots in a production environment and then performing desensitization; setting preconditions for executing the target test case in the system to be tested and invoking relevant services of the system to be tested; if the system to be tested sends a request to an external system, searching for a target request message in a desensitized test case library; wherein, the target request message is a request message generated by a production system in the target test case; determining whether the message sent by the system to be tested to the external system is consistent with the target request message; if it is determined that the message sent by the system to be tested to the external system is inconsistent with the target request message, it indicates that the system to be tested has a defect, and record this error; if it is determined that the message sent by the system to be tested to the external system is consistent with the target request message, finding a corresponding response message in the target test case; then, using the response message to simulate the external system to reply to the system to be tested; after that, after the system to be tested executes the response message, obtaining the execution result of this test; determining whether the execution result of this test is consistent with the expected result in the target test case; if it is determined that the execution result of this test is consistent with the expected result in the target test case, determining that the target test case passes the test; if it is determined that the execution result of this test is inconsistent with the expected result in the target test case, determining that the target test case fails the test. Thus, while ensuring the credibility and integrity of the verification, it effectively improves the security during the system testing process, does not affect the performance and logic of the production system, and can also simulate the external system receiving the request from the system to be tested and sending a simulated response to the system to be tested, which is beneficial to fully verifying the correctness of the relevant functions of the system to be tested before the official joint debugging with the external system. Description of the Drawings

[0060] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on the provided drawings.

[0061] Figure 1 Specific flowchart of a test method for a civil aviation information system provided by an embodiment of the present application;

[0062] Figure 2 Flowchart of a test method for a civil aviation information system provided by another embodiment of the present application;

[0063] Figure 3 A flowchart of a test method for a civil aviation information system provided in another embodiment of the present application;

[0064] Figure 4 An overall framework diagram of a test method for a civil aviation information system provided in another embodiment of the present application;

[0065] Figure 5 A schematic diagram of a test device for a civil aviation information system provided in another embodiment of the present application;

[0066] Figure 6 A schematic diagram of an electronic device for implementing a test method of a civil aviation information system provided in another embodiment of the present application. Detailed implementation manners

[0067] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0068] As used herein, the term "including" and its variants are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based 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". The relevant definitions of other terms will be given in the following description.

[0069] It should be noted that the concepts such as "first" and "second" mentioned in the present application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence relationship of the functions performed by these devices, modules or units.

[0070] It should be noted that the modifications of "one" and "multiple" mentioned in the present application are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly specified in the context, it should be understood as "one or more".

[0071] The embodiments of the present application provide a test method for a civil aviation information system, as Figure 1 shown, specifically including the following steps:

[0072] S101. Obtain a target test case.

[0073] Among them, the target test case is a test case obtained by desensitizing the test case constructed by parsing the production log or business data snapshot in the production environment.

[0074] In the specific implementation process of this application, the target test case can be obtained through the "test case execution component" from the "desensitized test case library".

[0075] The target test case in this application is divided into four parts:

[0076] (1) Preconditions, which are snapshots of relevant business data before transactions in the production system. The business data includes, but is not limited to, order data, ticket data, sales data, etc.

[0077] (2) Trigger conditions, that is, requests to trigger the production system to process the transaction, which can be HTTP requests, or EDI or other types of requests.

[0078] (3) External system simulation data, which is mainly the reply message from the external system and is used for the external system simulation component to send reply messages to the system under test during the execution of the test case.

[0079] (4) Expected results. If the actual result of the system under test when executing the test case is consistent with the expected result, the test passes; otherwise, it indicates that there may be defects in the system under test and further analysis is required. For the civil aviation reservation and ticketing system, the expected results mainly include the reply sent to the requester, the business data after the transaction, and the request message sent to the external system during the transaction processing.

[0080] Optionally, in another embodiment of this application, an implementation manner of the method for generating the target test case is as Figure 2 shown, including:

[0081] S201. Parse the production log at preset intervals to obtain the first parsing information.

[0082] In the specific implementation process of this application, the production log can be pushed to the "test case construction component" through the "production log and business data snapshot push component", and the "test case construction component" parses the production log to obtain the first parsing information.

[0083] S202. Generate the first test case according to the first parsing information.

[0084] Continuing with the above example, the "test case construction component" generates the first test case according to the first parsing information.

[0085] S203. Desensitize the first test case to obtain the target test case.

[0086] Continuing with the above example, the "desensitization component" desensitizes the first test case to obtain the target test case.

[0087] Optionally, in another embodiment of the present application, an implementation manner of the method for generating the target test case is as follows Figure 3 shown, including:

[0088] S301. When a transaction occurs in the production system, obtain a snapshot of the business data of the transaction.

[0089] S302. Analyze the snapshot of the business data of the transaction to obtain the second analysis information.

[0090] In the specific implementation process of the present application, the "production log and business data snapshot push component" can push the snapshot of the business data of the transaction to the "test case construction component", and the "test case construction component" analyzes the snapshot of the business data of the transaction to obtain the second analysis information.

[0091] S303. Generate a second test case according to the second analysis information.

[0092] Continuing with the above example, the "test case construction component" generates a second test case according to the second analysis information.

[0093] S304. Desensitize the second test case to obtain the target test case.

[0094] Continuing with the above example, the "desensitization component" desensitizes the second test case to obtain the target test case.

[0095] Optionally, in another embodiment of the present application, after obtaining the target test case, it further includes:

[0096] Store the target test case in the desensitized test case library.

[0097] It should be noted that for the production log and business data push, in the specific implementation, FTP transmission is adopted. The push component pushes the production log to the test case construction component at preset intervals, and when a transaction occurs in the production system, it pushes the snapshot of the business data of the corresponding transaction to the test case construction component.

[0098] It should also be noted that the business data pushed by the push component includes order data. The order structure used by the host system in production is PNR, while the order structure used by the open reservation system in the test system is an open order. The main business fields of PNR and the open order are the same, but the structures are different and heterogeneous. Therefore, the test case construction component includes the function of converting the PNR order in the business data into an open order snapshot, and then the open order snapshot can be used as the business data snapshot before and after the transaction in the test case.

[0099] In order to realize the ticket booking function, the production system involves the host system, open business engine (IBE), common service interface (SAT), etc. These systems have different production logs, and even the same system has multiple logs in different formats. In order to build a complete test case, the component for building the test case has the function of integrating relevant transaction information in multiple logs and restoring the transaction scenario. The integration of multiple log information can be achieved by associating but not limited to transaction time, transaction ID, transaction office, passenger behavior pattern and other information.

[0100] Since the transaction number is not recorded in the business data snapshot, it is necessary to construct a test case component based on the transaction number, transaction time, PNR number and other information to associate the data snapshots before and after the transaction with the corresponding test case.

[0101] In the specific implementation process of this application, due to the requirements of playback verification, the desensitization algorithm should be irreversible, not leak sensitive information, and ensure the security of passengers' privacy data; and desensitization must not hinder the operation of verification use cases, business processing, and be available. Therefore, for data such as telephone numbers and addresses that are only used for recording and display, they are replaced as a whole with other strings according to the desensitization rules. For data that will affect the processing logic, it is encrypted according to business needs. For example: the system will determine whether the passenger type is an adult, child or infant based on the date of birth in the ID card. The passenger type will affect the free baggage allowance and the seat position that can be selected, etc. Therefore, when desensitizing the ID number, it is necessary to retain the part representing the date of birth and replace other information with a string of equal length. Finally, the last check code is calculated according to the verification algorithm issued by the Ministry of Public Security.

[0102] Specifically, the passenger's name is anonymized:

[0103] The name is used as the unique identification of the passenger in the business processing. The name cannot be repeated in the same order, and it is divided into Chinese name and Pinyin name. Some names have suffixes, such as: CHD (for child passengers), VVIP / (for very important passengers), etc. The suffix will affect the system's processing rules for passengers.

[0104] Desensitization requirements: Passenger names should not be repeated in the same PNR, and the name suffix should be retained.

[0105] Passengers with Chinese names: Replace the Chinese names and the corresponding pinyin of the names in the order in which the passengers appear. The replacement rule is the Hundred Family Surnames plus Chinese numbers.

[0106]

[0107] Desensitization of the second generation ID card number of the People's Republic of China:

[0108] The second-generation ID card is 18 digits long (3-digit provincial code + 3-digit area code + 8-digit birthday + 3-digit sequence code + 1-digit check code). The civil aviation information system will use the birthday information in the ID card to determine the passenger type (adult, child, infant), and the passenger type will affect the system processing logic. Therefore, the 8-digit birthday information must be retained after desensitization.

[0109] Desensitization scheme: Replace the area code from the 1st to the 6th digit with "123456", and replace the sequence code from the second-to-last digit to the 4th digit from the end with "123", and then calculate the last check code according to the check algorithm issued by the Ministry of Public Security. For example: Before desensitization, the ID number is 110102198206175117, and after desensitization, the ID number is 123456198206175117.

[0110] In the specific implementation process of this application, the desensitization scope includes: passenger name types (Chinese name, English name), document information types (ID card, passport, Hong Kong and Macau permit, Taiwan compatriot card, frequent flyer card number and other valid document information), telephone numbers (landline and mobile phone numbers), addresses (passenger addresses), payment information types (bank card number, credit card number).

[0111] The desensitization object is: all data within the desensitization scope in the test cases.

[0112] The desensitized data must be consistent within the transaction. For example: If a passenger's name is desensitized to Zhang San, then in the same test case, whether it is the business data snapshot, request message, response message, response message sent by an external system to the system under test, etc., wherever the passenger's name appears, it should be desensitized to "Zhang San" to maintain the logical consistency of the data. Therefore, the desensitization component first desensitizes the sensitive data in the transaction data snapshot, and records the mapping relationship between the information before desensitization and the information after desensitization, and then desensitizes the sensitive information in the relevant messages according to the mapping relationship.

[0113] S102. Set the preconditions for executing the target test case in the system under test, and call the relevant services of the system under test.

[0114] Specifically, the "test case execution component" executes the target test case, sets the preconditions for executing the target test case in the system under test, and calls the relevant services of the system under test.

[0115] S103. If the system under test sends a request to an external system, search for the target request message in the desensitization test case library.

[0116] Among them, the target request message is the request message generated by the production system in the target test case.

[0117] Specifically, if the system under test sends a request to an external system, the "external system simulation component" receives the request, and the "external system simulation component" looks up the target request message in the desensitization test case library.

[0118] S104. Determine whether the message sent by the system under test to the external system is consistent with the target request message.

[0119] Specifically, if it is determined that the message sent by the system under test to the external system is inconsistent with the target request message, then step S105 is executed; if it is determined that the message sent by the system under test to the external system is consistent with the target request message, then step S106 is executed.

[0120] S105. The system under test has a defect, and record this error.

[0121] S106. Find the corresponding response message in the target test case.

[0122] S107. Use the response message to simulate the external system to reply to the system under test.

[0123] S108. After the system under test executes the response message, obtain the execution result of this test.

[0124] S109. Determine whether the execution result of this test is consistent with the expected result in the target test case.

[0125] Specifically, if it is determined that the execution result of this test is consistent with the expected result in the target test case, then step S110 is executed; if it is determined that the execution result of this test is inconsistent with the expected result in the target test case, then step S111 is executed.

[0126] S110. Determine that the target test case passes the test.

[0127] S111. Determine that the target test case fails the test.

[0128] As Figure 4 shown, it is the overall framework diagram of a test method for a civil aviation information system provided by an embodiment of the present application:

[0129] Among them, step 1 [production log and business data snapshot push component] pushes the log information and business data snapshot in the production environment to the [test case construction component].

[0130] Step 2 [test case construction component] parses the pushed production log and data snapshot information and constructs test cases.

[0131] Step 3 [Desensitization Component] mainly desensitizes the sensitive data in the test cases and pushes the desensitized test cases to the [Desensitized Test Case Library] in the test environment through the [Gated Network].

[0132] Step 4 [Test Case Execution Component] retrieves test cases from the [Desensitized Test Case Library].

[0133] Step 5 [Test Case Execution Component] executes the test cases, sets the preconditions for executing the test case in the system under test, and then calls the relevant services of the system under test.

[0134] Step 6 If the system under test sends a request to an external system, the [External System Simulation Component] receives the request.

[0135] Step 7 [External System Simulation Component] accesses the desensitized test case library, searches for the corresponding request message, and compares whether the request message generated by the system under test is consistent with the request message generated by the production system in the test case. If the corresponding request message is not found or the generated messages are inconsistent, it indicates that there is a defect in the system under test, and the error is recorded.

[0136] Step 8 [External System Simulation Component] If a consistent request message is found in the test case, then finds the response message corresponding to the request in the test case, and then sends the found response message to the [System Under Test].

[0137] Step 9 [Test Case Execution Component] obtains the execution result of the system under test, compares whether the execution result is consistent with the expected result in the test case to determine whether the test case passes.

[0138] It can be seen that the solution is to complete case generation and data desensitization in the production environment, push the desensitized cases to the test environment through the specified gated network, and then execute the test in the test environment. This technical solution first compares and identifies the request and response messages involved in an interaction with an external system in a certain transaction, as well as the business data snapshots such as orders and tickets before and after the corresponding transaction, based on the log data in the production environment, generates test cases for this transaction, reproduces the existing host business scenario, and ensures the authenticity and integrity of the playback verification; then desensitizes the sensitive information in the test cases and provides it to the test environment to protect the privacy data of passengers; finally, executes the desensitized test cases in the test environment to verify the system under test. If the test case involves an interaction with an external system, the external system simulation component simulates the interaction between the external system and the system under test, replacing the coordination of the external system in this way, and fully verifying the ability of the system under test to perform message interaction with the external system.

[0139] As can be seen from the above solution, the present application provides a testing method for a civil aviation information system: obtaining a target test case; wherein, the target test case is a test case obtained by parsing and constructing production logs or business data snapshots in a production environment and then performing desensitization; setting preconditions for executing the target test case in the system under test and invoking relevant services of the system under test; if the system under test sends a request to an external system, searching for a target request message in the desensitized test case library; wherein, the target request message is a request message generated by the production system in the target test case; determining whether the message sent by the system under test to the external system is consistent with the target request message; if it is determined that the message sent by the system under test to the external system is inconsistent with the target request message, it indicates that the system under test has a defect, and record this error; if it is determined that the message sent by the system under test to the external system is consistent with the target request message, finding the corresponding response message in the target test case; then, using the response message to simulate the external system to reply to the system under test; after that, after the system under test executes the response message, obtaining the execution result of this test; determining whether the execution result of this test is consistent with the expected result in the target test case; if it is determined that the execution result of this test is consistent with the expected result in the target test case, determining that the target test case passes the test; if it is determined that the execution result of this test is inconsistent with the expected result in the target test case, determining that the target test case fails the test. Thus, while ensuring the credibility and integrity of verification, it effectively improves the security during the system testing process, does not affect the performance and logic of the production system, and can also simulate the external system receiving the request from the system under test and sending a simulated reply to the system under test, which is beneficial to fully verifying the correctness of the relevant functions of the system under test before officially debugging with the external system.

[0140] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations 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 diagram may represent a module, a program segment, or a part of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0141] The names of the messages or information exchanged between multiple devices in the embodiments of the present application are for illustrative purposes only and are not used to limit the scope of these messages or information.

[0142] Computer program code for performing the operations of the present application can be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include, but are not limited to, object-oriented programming languages such as Python, Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).

[0143] Another embodiment of the present application provides a test device for a civil aviation information system, as Figure 5 shown, specifically including:

[0144] A first acquisition unit 501, configured to acquire a target test case.

[0145] Wherein, the target test case is a test case obtained by desensitizing the test case constructed by parsing the production log or business data snapshot in the production environment.

[0146] Optionally, in another embodiment of the present application, an implementation manner of the generation unit of the target test case includes:

[0147] A first parsing unit, configured to parse the production log every preset time to obtain first parsing information.

[0148] A first generation unit, configured to generate a first test case according to the first parsing information.

[0149] A first desensitization unit, configured to desensitize the first test case to obtain the target test case.

[0150] For the specific working process of the units disclosed in the above embodiments of the present application, reference can be made to the corresponding method embodiment content, as Figure 2 shown, which will not be elaborated here.

[0151] Optionally, in another embodiment of the present application, an implementation manner of the generation unit of the target test case includes:

[0152] A third acquisition unit, configured to acquire a snapshot of the business data of a transaction when a transaction occurs in the production system.

[0153] A second parsing unit, configured to parse the snapshot of the business data of the transaction to obtain second parsing information.

[0154] A second generation unit, configured to generate a second test case according to the second parsing information.

[0155] A second desensitization unit, configured to desensitize the second test case to obtain a target test case.

[0156] For the specific working processes of the units disclosed in the foregoing embodiments of the present application, reference may be made to the corresponding method embodiment content, as Figure 3 shown, which will not be elaborated herein.

[0157] Optionally, in another embodiment of the present application, an implementation manner of a test device for a civil aviation information system further includes:

[0158] A storage unit, configured to store the target test case in a desensitized test case library.

[0159] For the specific working processes of the units disclosed in the foregoing embodiments of the present application, reference may be made to the corresponding method embodiment content, which will not be elaborated herein.

[0160] An execution unit 502, configured to set preconditions for executing the target test case in the system under test and call relevant services of the system under test.

[0161] A first search unit 503, configured to, if the system under test sends a request to an external system, search for a target request message in the desensitized test case library.

[0162] Wherein, the target request message is a request message generated by the production system in the target test case.

[0163] A first judgment unit 504, configured to judge whether the message sent by the system under test to the external system is consistent with the target request message.

[0164] A recording unit 505, configured to, if the first judgment unit 504 determines that the message sent by the system under test to the external system is inconsistent with the target request message, indicate that there is a defect in the system under test and record this error.

[0165] A second search unit 506, configured to, if the first judgment unit 504 determines that the message sent by the system under test to the external system is consistent with the target request message, find a corresponding response message in the target test case.

[0166] A simulation response unit 507, configured to use the response message to simulate the external system to respond to the system under test.

[0167] A second acquisition unit 508, configured to obtain the execution result of the current test after the system under test executes a response message.

[0168] A second determination unit 509, configured to determine whether the execution result of the current test is consistent with the expected result in the target test case.

[0169] A determination unit 510, configured to determine that the target test case passes the test if the second determination unit 509 determines that the execution result of the current test is consistent with the expected result in the target test case.

[0170] The determination unit 510 is further configured to determine that the target test case fails the test if the second determination unit 509 determines that the execution result of the current test is inconsistent with the expected result in the target test case.

[0171] For the specific working process of the units disclosed in the above embodiments of the present application, reference may be made to the corresponding method embodiment content, as Figure 1 shown, which will not be elaborated here.

[0172] As can be seen from the above solution, the present application provides a test device for a civil aviation information system: a first acquisition unit 501 acquires a target test case; wherein, the target test case is a test case obtained by desensitizing a test case constructed by parsing production logs or business data snapshots in a production environment; an execution unit 502 sets preconditions for executing the target test case in the system under test and calls relevant services of the system under test; if the system under test sends a request to an external system, a first search unit 503 searches for a target request message in a desensitized test case library; wherein, the target request message is a request message generated by a production system in the target test case; a first judgment unit 504 judges whether the message sent by the system under test to the external system is consistent with the target request message; if the first judgment unit 504 judges that the message sent by the system under test to the external system is inconsistent with the target request message, it indicates that the system under test has a defect, and a recording unit 505 records this error; if the first judgment unit 504 judges that the message sent by the system under test to the external system is consistent with the target request message, a second search unit 506 finds a corresponding response message in the target test case; then, a simulation response unit 507 uses the response message to simulate the external system to respond to the system under test; after that, a second acquisition unit 508 obtains the execution result of this test after the system under test executes the response message; a second judgment unit 509 judges whether the execution result of this test is consistent with the expected result in the target test case; if the second judgment unit 509 judges that the execution result of this test is consistent with the expected result in the target test case, a determination unit 510 determines that the target test case passes the test; if the second judgment unit 509 judges that the execution result of this test is inconsistent with the expected result in the target test case, the determination unit 510 determines that the target test case fails the test. Thus, while ensuring the credibility and integrity of verification, it effectively improves the security during the system test process, does not affect the performance and logic of the production system, and can also simulate the external system receiving the request of the system under test and sending a simulated return to the system under test, which is beneficial to fully verifying the correctness of the relevant functions of the system under test before the official joint debugging with the external system.

[0173] The functions described above in this article can be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: Field Programmable Gate Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Product (ASSP), System on Chip (SOC), Complex Programmable Logic Device (CPLD), and so on.

[0174] Another embodiment of the present application provides an electronic device, such as Figure 6 shown, including:

[0175] One or more processors 601.

[0176] A storage device 602 on which one or more programs are stored.

[0177] When the one or more programs are executed by the one or more processors 601, the one or more processors 601 are caused to implement the test method of the civil aviation information system according to any one of the above embodiments.

[0178] Another embodiment of the present application provides a computer storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, implements the test method of the civil aviation information system according to any one of the above embodiments.

[0179] In the context of the present 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. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, 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 disk, 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.

[0180] It should be noted that the above-mentioned computer-readable medium in this application can be a computer-readable signal medium, 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 electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this application, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. And in this application, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and this computer-readable signal medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0181] The above-mentioned computer-readable medium can be included in the above-mentioned electronic device; it can also exist separately and not be assembled into the electronic device.

[0182] Another embodiment of this application provides a computer program product, which is used to execute the test method of the civil aviation information system in any one of the above when the computer program product is executed.

[0183] Specifically, according to the embodiments of this application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments of this application include a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and this computer program contains program code for executing the method shown in the flowchart. In such an embodiment, this computer program can be downloaded and installed from the network through a communication device, or installed from a storage device, or installed from a ROM. When this computer program is executed by a processing device, it executes the above-mentioned functions defined in the method of the embodiments of this application.

[0184] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. On the contrary, the specific features and acts described above are merely example forms for implementing the claims.

[0185] Although a number of specific implementation details are included in the foregoing discussion, these should not be construed as limiting the scope of the present application. Certain features described in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, the various features described in the context of a single embodiment may also be implemented separately or in any suitable sub-combination in multiple embodiments.

[0186] The foregoing description is only a preferred embodiment of the present application and an explanation of the technical principles applied. Those skilled in the art should understand that the scope of the application involved in the present application is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above application concept. For example, the technical solutions formed by mutually replacing the above features with (but not limited to) technical features having similar functions in the present application.

Claims

1. A testing method for a civil aviation information system, characterized in that Including: Obtain a target test case; wherein, the target test case is a test case obtained by desensitizing a test case constructed by parsing production logs or business data snapshots in a production environment; Set preconditions for executing the target test case in the system under test, and call relevant services of the system under test; If the system under test sends a request to an external system, search for a target request message in the desensitized test case library; wherein, the target request message is a request message generated by the production system in the target test case; Determine whether the message sent by the system under test to the external system is consistent with the target request message; If it is determined that the message sent by the system under test to the external system is inconsistent with the target request message, it indicates that there is a defect in the system under test, and record this error; If it is determined that the message sent by the system under test to the external system is consistent with the target request message, find the corresponding response message in the target test case; Use the response message to simulate the external system to reply to the system under test; After the system under test executes the response message, obtain the execution result of this test; Determine whether the execution result of this test is consistent with the expected result in the target test case; If it is determined that the execution result of this test is consistent with the expected result in the target test case, determine that the target test case passes the test; If it is determined that the execution result of this test is inconsistent with the expected result in the target test case, determine that the target test case fails the test.

2. The test method according to claim 1, characterized in that, The method for generating the target test case includes: Parse production logs at preset intervals to obtain first parsing information; Generate a first test case according to the first parsing information; Desensitize the first test case to obtain a target test case.

3. The test method according to claim 1, wherein The method for generating the target test case includes: When a transaction occurs in the production system, obtain a business data snapshot of the transaction; Parse the business data snapshot of the transaction to obtain second parsing information; Generate a second test case according to the second parsing information; Desensitize the second test case to obtain a target test case.

4. The test method according to claim 2 or 3, characterized in that After obtaining the target test case, it further includes: Store the target test case in the desensitized test case library.

5. A test device for a civil aviation information system, characterized in that, Including: A first acquisition unit for obtaining a target test case; wherein, the target test case is a test case obtained by desensitizing a test case constructed by parsing production logs or business data snapshots in a production environment; An execution unit for setting preconditions for executing the target test case in the system under test and calling relevant services of the system under test; A first search unit for searching for a target request message in the desensitized test case library if the system under test sends a request to an external system; wherein, the target request message is a request message generated by the production system in the target test case; A first judgment unit for judging whether the message sent by the system under test to the external system is consistent with the target request message; A recording unit, configured to record this error if the first determination unit determines that the message of the request sent by the system under test to the external system is inconsistent with the target request message, indicating that the system under test has a defect. A second search unit, configured to find the corresponding response message in the target test case if the first determination unit determines that the message of the request sent by the system under test to the external system is consistent with the target request message. A simulated response unit, configured to simulate the external system to respond to the system under test by using the response message. A second acquisition unit, configured to obtain the execution result of this test after the system under test executes the response message. A second determination unit, configured to determine whether the execution result of this test is consistent with the expected result in the target test case. A determination unit, configured to determine that the target test case passes the test if the second determination unit determines that the execution result of this test is consistent with the expected result in the target test case. The determination unit is further configured to determine that the target test case fails the test if the second determination unit determines that the execution result of this test is inconsistent with the expected result in the target test case.

6. The test device according to claim 5, characterized in that The generation unit of the target test case includes: A first parsing unit, configured to parse the production log at preset time intervals to obtain first parsing information. A first generation unit, configured to generate a first test case according to the first parsing information. A first desensitization unit, configured to desensitize the first test case to obtain the target test case.

7. The testing device according to claim 5, characterized in that, The generation unit of the target test case includes: A third acquisition unit, configured to obtain a snapshot of the business data of the transaction when a transaction occurs in the production system. A second parsing unit, configured to parse the snapshot of the business data of the transaction to obtain second parsing information. A second generation unit, configured to generate a second test case according to the second parsing information. A second desensitization unit, configured to desensitize the second test case to obtain the target test case.

8. The testing device according to claim 6 or 7, characterized in that, It further includes: A storage unit, configured to store the target test case in a desensitized test case library.

9. An electronic device, characterized in that, It includes: One or more processors; A storage device, on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the test method of the civil aviation information system according to any one of claims 1 to 4.

10. A computer storage medium, characterized in that, On which a computer program is stored, wherein when the computer program is executed by a processor, the test method of the civil aviation information system according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Test case checking method and system based on log monitoring

    CN114564405A

  • Data desensitising method, server, terminal, and computer-readable storage medium

    WO2019114766A1