CN111737133A - Test method and device, computer equipment and computer readable storage medium - Google Patents

Test method and device, computer equipment and computer readable storage medium Download PDF

Info

Publication number
CN111737133A
CN111737133A CN202010584783.8A CN202010584783A CN111737133A CN 111737133 A CN111737133 A CN 111737133A CN 202010584783 A CN202010584783 A CN 202010584783A CN 111737133 A CN111737133 A CN 111737133A
Authority
CN
China
Prior art keywords
message
tested
format
key value
software system
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
Application number
CN202010584783.8A
Other languages
Chinese (zh)
Inventor
罗丹
段于胜
谢朝杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202010584783.8A priority Critical patent/CN111737133A/en
Publication of CN111737133A publication Critical patent/CN111737133A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

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 invention discloses a test method and a test device, computer equipment and a computer readable storage medium, wherein the test method comprises the following steps: the first system sends the acquired original request message with the previous time to a software system to be tested; the second system receives a first intermediate message obtained after the original request message is analyzed by the software system to be tested; the second system extracts the message key value of the first intermediate message according to a message key value extraction method corresponding to a pre-configured message format; the second system returns the original response message matched from the history message record table to the software system to be tested according to the message key value of the first intermediate message; and the first system receives a second intermediate message obtained after the original response message is analyzed by the software system to be tested. The invention utilizes the virtual system to carry out automatic test, thereby improving the test efficiency. The second system matches the original response message according to the message key value, simplifies the testing process after the software system to be tested is modified, and improves the testing efficiency.

Description

Test method and device, computer equipment and computer readable storage medium
Technical Field
The present invention relates to the field of software testing technologies, and in particular, to a testing method and apparatus, a computer device, and a computer-readable storage medium.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
The software system is often related to compatibility modification of platform downward movement in the modification process, and is not related to functionality modification. In order to ensure that the software system functions normally, the tester needs to cover all the functional scenarios supported by the software system. For a software system, particularly a middle platform system on a complete transaction link, on one hand, more systems involved on the transaction link are difficult to coordinate, and the test flow is more complex; on the other hand, the time for manufacturing the test cases suitable for different scenes is long, so that the test efficiency is not high.
Therefore, the existing software system has the problems of complex test flow and low test efficiency in the transformation process.
Disclosure of Invention
The embodiment of the invention provides a testing method, which is used for simplifying the testing process of a software system in the transformation process and improving the testing efficiency and comprises the following steps:
the first system sends an original request message with the previous time acquired from the historical message record table to a software system to be tested;
the second system receives a first intermediate message obtained after the original request message is analyzed by the software system to be tested;
the second system extracts the message key value of the first intermediate message according to a message key value extraction method corresponding to a pre-configured message format;
the second system returns the original response message matched from the history message record table to the software system to be tested according to the message key value of the first intermediate message;
the first system receives a second intermediate message obtained after the original response message is analyzed by the software system to be tested;
the first system and the second system are both virtual systems.
The embodiment of the present invention further provides a testing apparatus, which is used to simplify the testing process of a software system in the modification process and improve the testing efficiency, and the testing apparatus includes:
a first system and a second system; the first system and the second system are both virtual systems;
the first system is used for sending an original request message with the prior time acquired from the historical message record table to the software system to be tested;
the second system is used for receiving a first intermediate message obtained after the original request message is analyzed by the software system to be tested;
the second system is also used for extracting the message key value of the first intermediate message according to a message key value extraction method corresponding to a pre-configured message format;
the second system is also used for returning the original response message matched from the historical message record table to the software system to be tested according to the message key value of the first intermediate message;
the first system is also used for receiving a second intermediate message obtained after the original response message is analyzed by the software system to be tested.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the test method when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, and the computer readable storage medium stores a computer program for executing the test method.
In the embodiment of the invention, when the external system or the external equipment does not have or cannot obtain the original request message or the original response message in time, the original request message and the original response message are processed by utilizing the virtual first system and the virtual second system, so that the automatic test can be directly carried out by separating from the external system or the external equipment, and the test efficiency is improved. In addition, the second system extracts the message key value of the first middle message based on a preconfigured message key value extraction method, and matches the original response message from the historical message record table according to the message key value, so that the test flow of the software system to be tested after transformation can be simplified, the test efficiency is improved, the end-to-end automatic test of the first system and the software system to be tested is realized, and the end-to-end automatic test of the software system to be tested and the second system is realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
FIG. 1 is a flow chart of an implementation of a testing method according to an embodiment of the present invention;
FIG. 2 is a flowchart of another implementation of a testing method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating an implementation of a message key value extraction method corresponding to a preconfigured message format in a testing method according to an embodiment of the present invention;
FIG. 4 is a flow chart of a partial implementation of another testing method provided by the embodiment of the present invention;
FIG. 5 is a flow chart of a partial implementation of yet another testing method provided by an embodiment of the present invention;
FIG. 6 is a functional block diagram of a testing apparatus according to an embodiment of the present invention;
FIG. 7 is a block diagram of another embodiment of a testing apparatus;
FIG. 8 is a block diagram of a portion of a testing apparatus according to an embodiment of the present invention;
FIG. 9 is a functional block diagram of a portion of another testing apparatus according to an embodiment of the present invention;
FIG. 10 is a functional block diagram of a testing apparatus according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
Fig. 1 shows an implementation flow of a testing method provided by an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and detailed descriptions are as follows:
as shown in fig. 1, a method of testing, comprising:
101, a first system 601 sends an original request message with the previous time acquired from a history message record table to a software system to be tested;
102, a second system 602 receives a first intermediate message obtained by analyzing an original request message by a software system to be tested;
step 103, the second system 602 extracts the message key value of the first intermediate message according to the message key value extraction method corresponding to the preconfigured message format;
step 104, the second system 602 returns the original response message matched from the history message record table to the software system to be tested according to the message key value of the first intermediate message;
105, the first system 601 receives a second intermediate message obtained by analyzing the original response message by the software system to be tested;
the first system 601 and the second system 602 are virtual systems.
In the embodiment of the invention, the first system and the second system are respectively in communication connection with the software system to be tested. Specifically, for example, the first system and the second system are respectively in communication connection with the software system to be tested in a TCP manner.
When testing a software system to be tested, the first system 601 first obtains an original request message with a previous time from the history message record table according to a time sequence. The original request message in the history message record table is the original request message sent by the real service system corresponding to the first system 601 to the software system to be tested before the modification.
After the first system 601 obtains the original record message with the previous time from the history message record table, the first system 601 sends the original request message with the previous time to the software system to be tested, and after the software system to be tested receives the original request message sent by the first system 601, the original request message sent by the first system 601 is further analyzed to obtain a first intermediate message.
The software system to be tested sends the first intermediate message obtained by analyzing the original request message to the second system 602. And the second system 602, after receiving the first intermediate message sent by the software system to be tested, identifies and analyzes the message format of the first intermediate message, and further extracts the message key value of the first intermediate message based on a message key value extraction method corresponding to the preconfigured message format. The message key value refers to a key value msgkey matched with the message.
After the second system 602 extracts the message key value of the first intermediate message, the second system 602 performs matching in the history message record table based on the message key value of the first intermediate message, and returns the matched original response message to the software system to be tested. The value of the message key value of the first intermediate message is the same as the value of the message key value of the original response message, so that the original response message can be matched based on the message key value of the first intermediate message.
In order to improve the message matching efficiency and further improve the testing efficiency, on the basis of the above method steps, the testing method further includes:
and extracting the message key values corresponding to the messages in the history message record table according to a message key value extraction method corresponding to the preconfigured message format.
That is, when the second system 602 matches the original reply message in the history message record table according to the message key value of the first intermediate message, all the message key values corresponding to the messages in the history message record table may be extracted in advance, and the correspondence between the messages in the history message record table and the message key values may be determined. Thus, when the original response message in the history message record table is matched according to the message key value of the first intermediate message, the second system 602 can directly match the original response message corresponding to the message key value of the first intermediate message based on the corresponding relationship between the message key value and the message, so that the message matching efficiency can be improved, and the test efficiency can be further improved. The original response message in the history message record table is the original response message returned to the software system to be tested before the modification by the real service system corresponding to the second system 602 in the previous time.
After the original response message is matched, the second system 602 returns the matched original response message to the software system to be tested, the software system to be tested receives the original response message returned by the second system 602, analyzes the original response message to obtain a second intermediate message, and then the software system to be tested returns the second intermediate message obtained by analyzing the original response message to the first system 601. It can be understood that the values of the message key values of the end-to-end messages in the same transaction flow are consistent, that is, the values of the message key values of the original request message and the second intermediate message are consistent, and the values of the message key values of the intermediate message and the original reply message are the same. Thus, the automatic test of the first system 601 and the software system to be tested and the automatic test of the second system 602 and the software system to be tested are realized.
In the embodiment of the present invention, when the external system or the external device does not have or cannot obtain the original request message or the original response message in time, the virtual first system 601 and the virtual second system 602 are used to process the original request message and the original response message, so that the external system or the external device can be directly separated from the system for automatic testing, thereby improving the testing efficiency. In addition, the second system 602 extracts the message key value of the first intermediate message based on a preconfigured message key value extraction method, and matches the original response message from the history message record table according to the message key value, so that the test flow of the software system to be tested after transformation can be simplified, the test efficiency can be improved, the end-to-end automatic test of the first system 601 and the software system to be tested can be realized, and the end-to-end automatic test of the software system to be tested and the second system 602 can be realized.
In an embodiment of the present invention, the first system 601 includes one or more upstream systems. To further improve testing efficiency, multiple upstream systems are processed in parallel when the first system 601 includes multiple upstream systems.
In an embodiment of the present invention, the second system 602 includes one or more downstream systems. To further improve testing efficiency, when the second system 602 includes multiple downstream systems, the multiple downstream systems process in parallel.
Fig. 2 shows another implementation flow of the testing method provided by the embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the details are as follows:
in an embodiment of the present invention, in order to further improve the testing efficiency, as shown in fig. 2, on the basis of the above method steps, the testing method further includes:
step 201, obtaining a history message record table in a preset time period from an end-to-end message flow database.
When obtaining the history message record table, the history message record table can be obtained from an end-to-end message flow database. Specifically, the historical message record table in the preset time period can be obtained from the end-to-end message flow database. For example, a history message record table within one week from the current time, or a history message record table within one day from the current time may be obtained from the peer message flow database.
In the embodiment of the invention, the historical message record table in the preset time period is obtained from the end-to-end message flow database, so that the test efficiency can be further improved.
Fig. 3 shows an implementation flow of a message key value extraction method corresponding to a pre-configured message format in the testing method provided in the embodiment of the present invention, and for convenience of description, only a part related to the embodiment of the present invention is shown, and the following details are described below:
in an embodiment of the present invention, in order to further improve the testing efficiency, as shown in fig. 3, a method for extracting a message key value corresponding to a preconfigured message format includes:
step 301, determining a message key value of a fixed-length format message according to a field identification value in the fixed-length format message; the identification field value uniquely identifies different messages with fixed length formats; and/or
Step 302, extracting a message key value of the 8583 format message according to a field domain of the 8583 format message; and/or
And 303, extracting a message key value of the json format message or the xml format message according to the domain or the label of the preset position of the json format message or the xml format message.
When extracting the message key value corresponding to the message, the message key value may be extracted based on the message format, and specifically, the following three conditions may be included:
(1) when the format message is a fixed-length format message:
the transaction request party can ensure the uniqueness of the serial number of the request party in a period of time, so when the format message is a fixed-length format message, the serial number of the request party can be extracted according to the designated position of the fixed-length format message to be used as the message key value of the fixed-length format message. It can be further understood that the fixed-length format message may further include other identification field values besides the request party serial number, where the identification field value can uniquely identify different transactions (i.e., the fixed-length format message corresponding to the transactions) within a period of time, so that the identification field value may also be used as a message key value of the fixed-length format message, or after the identification field value is processed in some form (e.g., by combining the identification field value with the transaction time, or by combining the identification field value with the transaction party ID, etc.), the identification field value may be used as a message key value of the fixed-length format message.
(2) When the format message is 8583 format message:
the 8583 format message can be processed and extracted according to MTI domain, 2 domain, 3 domain, 7 domain, 11 domain, 32 domain, 33 domain and the like to extract the message key value of the 8583 format message.
(3) json format message or xml format message:
when the format message is a json format message or an xml format message, the message key value may be extracted from the domain or the label of the predetermined position of the json format message or the xml format message.
It can be understood by those skilled in the art that when the format message is a message of another format, the message key values of the message of another format can be extracted based on a corresponding method, and it is only necessary to ensure that the values of the message key values of the message of the same end-to-end format in the same transaction flow are consistent.
In the embodiment of the invention, the message key value of the fixed-length format message is determined according to the identification field value in the fixed-length format message, the message key value of the 8583 format message is extracted according to the field domain of the 8583 format message, the message key value of the json format message or the xml format message is extracted according to the domain or the label of the preset position of the json format message or the xml format message, and the message key values of the messages with different formats are extracted based on different extraction methods, so that the test efficiency can be further improved.
Fig. 4 shows a partial implementation flow of another testing method provided by the embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the detailed description is as follows:
in an embodiment of the present invention, to facilitate the test analysis, as shown in fig. 4, on the basis of the above method steps, the test method further includes:
step 401, the first system 601 records a timestamp of the original request message sent to the software system to be tested; and/or
Step 402, the first system 601 records a timestamp for receiving a second middle message returned by the software system to be tested; and/or
Step 403, the second system 602 records a timestamp for receiving the first middle message sent by the software system to be tested; and/or
In step 404, the second system 602 records a timestamp of the original response message returned to the software system to be tested.
In the embodiment of the present invention, to facilitate the test analysis, the first system 601 and the second system 602 may record the time stamps of the message transmission and reception. It is understood that there is no specific order of execution between step 401 and step 404, and step 401 to step 404 may be executed after step 105 is executed. The following are preferred:
after the first system 601 sends the original request message to the software system to be tested after the step 101 is executed, step 401 is executed, that is, the timestamp sent by the original request message to the software system to be tested is recorded in time.
After the second system 602 receives the first middle message returned by the software system to be tested after the step 102 is executed, step 403 is executed, that is, the second system 602 records the timestamp of receiving the first middle message sent by the software system to be tested in time.
After the second system 602 returns the original response message to the software system to be tested after the step 104 is executed, step 404 is executed, that is, the second system 602 records the timestamp of the original response message returned to the software system to be tested in time.
After the first system 601 receives the second middle message returned by the software system to be tested in step 105, step 402 is executed, that is, the first system 601 timely records the timestamp of receiving the second middle message returned by the software system to be tested.
In the embodiment of the present invention, the first system 601 records a timestamp of an original request message sent to a software system to be tested, the first system 601 records a timestamp of receiving a second intermediate message returned by the software system to be tested, the second system 602 records a timestamp of receiving a first intermediate message sent by the software system to be tested, and the second system 602 records a timestamp of returning an original response message to the software system to be tested, so as to facilitate test analysis based on the timestamp.
Fig. 5 illustrates a partial implementation flow of another testing method provided by an embodiment of the present invention, and for convenience of description, only the relevant portions of the embodiment of the present invention are illustrated, and the following detailed description is provided:
in an embodiment of the present invention, in order to further improve the testing efficiency, as shown in fig. 5, on the basis of the above method steps, the testing method further includes:
step 501, configuring a message format of the first system 601 and a message key value extraction method corresponding to the message format according to a received first configuration instruction; and/or
Step 502, configuring the message format of the second system 602 and the message key value extraction method corresponding to the message format according to the received second configuration instruction.
When the message format and the message key value extraction method corresponding to the message format are configured, the message format and the message key value extraction method corresponding to the message format can be configured based on the received configuration instruction. For example, after receiving a first configuration instruction sent by a configuration user, configuring a message format of the first system 601 and a message key value extraction method corresponding to the message format based on the first configuration instruction; after receiving a second configuration instruction sent by a configuration user, the message format of the second system 602 and the message key value extraction method corresponding to the message format are configured based on the second configuration instruction.
In the embodiment of the present invention, the message format of the first system 601 and the message key value extraction method corresponding to the message format are configured according to the received first configuration instruction, and the message format of the second system 602 and the message key value extraction method corresponding to the message format are configured according to the received second configuration instruction, so that the test efficiency can be further improved.
Embodiments of the present invention further provide a testing apparatus, as described in the following embodiments. Because the principle of solving the problems of the devices is similar to that of the testing method, the implementation of the devices can be referred to the implementation of the method, and repeated details are not repeated.
Fig. 6 shows functional modules of a testing apparatus provided in an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the details are as follows:
referring to fig. 6, each module included in the testing apparatus is used to execute each step in the embodiment corresponding to fig. 1, and specific reference is made to fig. 1 and the related description in the embodiment corresponding to fig. 1, which are not repeated herein. In the embodiment of the present invention, the testing apparatus includes a first system 601 and a second system 602. The first system 601 and the second system 602 are both virtual systems.
The first system 601 is configured to send an original request packet with a previous time obtained from the history packet record table to a software system to be tested.
The second system 602 is configured to receive a first intermediate message obtained by analyzing the original request message by the software system to be tested;
the second system 602 is further configured to extract a message key value of the first intermediate message according to a message key value extraction method corresponding to a preconfigured message format;
the second system 602 is further configured to return the original response message matched from the history message record table to the software system to be tested according to the message key value of the first intermediate message;
the first system 601 is further configured to receive a second intermediate message obtained by analyzing the original response message by the software system to be tested.
In the embodiment of the present invention, when the external system or the external device does not have or cannot obtain the original request message or the original response message in time, the virtual first system 601 and the virtual second system 602 are used to process the original request message and the original response message, so that the external system or the external device can be directly separated from the system for automatic testing, thereby improving the testing efficiency. In addition, the second system 602 extracts the message key value of the first intermediate message based on a preconfigured message key value extraction method, and matches the original response message from the history message record table according to the message key value, so that the test flow of the software system to be tested after transformation can be simplified, the test efficiency can be improved, the end-to-end automatic test of the first system 601 and the software system to be tested can be realized, and the end-to-end automatic test of the software system to be tested and the second system 602 can be realized.
In an embodiment of the present invention, the first system 601 includes one or more upstream systems. To further improve testing efficiency, multiple upstream systems are processed in parallel when the first system 601 includes multiple upstream systems.
In an embodiment of the present invention, the second system 602 includes one or more downstream systems. To further improve testing efficiency, when the second system 602 includes multiple downstream systems, the multiple downstream systems process in parallel.
Fig. 7 shows another functional module of the testing apparatus provided in the embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the details are as follows:
in an embodiment of the present invention, in order to further improve the testing efficiency, referring to fig. 7, each module included in the testing apparatus is used to execute each step in the embodiment corresponding to fig. 2, and specifically, please refer to fig. 2 and the related description in the embodiment corresponding to fig. 2, which is not described herein again. In the embodiment of the present invention, on the basis of the above module structure, the testing apparatus further includes an obtaining module 701.
An obtaining module 701, configured to obtain a history packet record table in a preset time period from an end-to-end packet flow database.
In the embodiment of the present invention, the obtaining module 701 obtains the history packet record table in the preset time period from the end-to-end packet flow database, so as to further improve the testing efficiency.
Fig. 8 shows a schematic diagram of a part of functional modules in a testing apparatus provided in an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, which are detailed as follows:
in an embodiment of the present invention, in order to further improve the testing efficiency, referring to fig. 8, each module included in the testing apparatus is configured to execute each step in the embodiment corresponding to fig. 3, and specifically, please refer to fig. 3 and the related description in the embodiment corresponding to fig. 3, which is not described herein again. In the embodiment of the present invention, on the basis of the above module structure, the testing apparatus further includes a first extraction module 801, a second extraction module 802, and a third extraction module 803.
The first extraction module 801 is configured to determine a message key value of a fixed-length format message according to a field identification value in the fixed-length format message. And/or
The second extraction module 802 is configured to extract a message key value of the 8583 format message according to a field domain of the 8583 format message. And/or
The third extracting module 803 is configured to extract a message key value of the json format message or the xml format message from a domain or a label of a predetermined position of the json format message or the xml format message.
In the embodiment of the present invention, the first extraction module 801 determines the message key value of the fixed-length format message according to the field value identified in the fixed-length format message, the second extraction module 802 extracts the message key value of the 8583 format message according to the field of the 8583 format message, the third extraction module 803 extracts the message key value of the json format message or the xml format message according to the field or the label of the predetermined position of the json format message or the xml format message, and the message key values of the messages with different formats are extracted based on different extraction methods, so that the test efficiency can be further improved.
Fig. 9 shows a part of functional modules of another testing apparatus provided in an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the details are as follows:
in an embodiment of the present invention, for convenience of test analysis, referring to fig. 9, modules included in the test apparatus are used for executing steps in the embodiment corresponding to fig. 4, and specific reference is made to fig. 4 and related descriptions in the embodiment corresponding to fig. 4, which are not repeated herein. In the embodiment of the present invention, on the basis of the above module structure, the testing apparatus further includes a first recording module 901, a second recording module 902, a third recording module 903, and a fourth recording module 904.
A first recording module 901, configured to record a timestamp that the original request packet is sent to the software system to be tested
The second recording module 902 is configured to record a timestamp of receiving a second middle packet returned by the software system to be tested. And/or
The third recording module 903 is configured to record a timestamp of receiving the first middle packet sent by the software system to be tested. And/or
And a fourth recording module 904, configured to record a timestamp that the original response packet is returned to the software system to be tested.
In the embodiment of the present invention, the first recording module 901 records a timestamp of an original request message sent to a software system to be tested, the second recording module 902 records a timestamp of receiving a second middle message returned by the software system to be tested, the third recording module 903 records a timestamp of receiving a first middle message sent by the software system to be tested, and the fourth recording module 904 records a timestamp of an original response message returned to the software system to be tested, which is convenient for performing test analysis based on the timestamp.
Fig. 10 shows a part of functional modules of another testing apparatus provided in an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the detailed description is as follows:
in an embodiment of the present invention, in order to further improve the testing efficiency, referring to fig. 10, each module included in the testing apparatus is used to execute each step in the embodiment corresponding to fig. 5, and specific reference is made to fig. 5 and the related description in the embodiment corresponding to fig. 5, which are not repeated herein. In the embodiment of the present invention, on the basis of the above module structure, the testing apparatus further includes a first configuration module 1001 and a second configuration module 1002.
The first configuration module 1001 is configured to configure a message format of the first system 601 and a message key value extraction method corresponding to the message format according to the received first configuration instruction. And/or
The second configuration module 1002 is configured to configure a message format of the second system 602 and a message key value extraction method corresponding to the message format according to the received second configuration instruction.
In the embodiment of the present invention, the first configuration module 1001 configures the message format of the first system 601 and the message key value extraction method corresponding to the message format according to the received first configuration instruction, and the second configuration module 1002 configures the message format of the second system 602 and the message key value extraction method corresponding to the message format according to the received second configuration instruction, which can further improve the test efficiency.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the test method when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, and the computer readable storage medium stores a computer program for executing the test method.
In summary, in the embodiment of the present invention, when the external system or the external device does not have or cannot obtain the original request message or the original response message in time, the virtual first system 601 and the virtual second system 602 are used to process the original request message and the original response message, so that the external system or the external device can be directly separated from the external system to perform an automated test, thereby improving the test efficiency. In addition, the second system 602 extracts the message key value of the first intermediate message based on a preconfigured message key value extraction method, and matches the original response message from the history message record table according to the message key value, so that the test flow of the software system to be tested after transformation can be simplified, the test efficiency can be improved, the end-to-end automatic test of the first system 601 and the software system to be tested can be realized, and the end-to-end automatic test of the software system to be tested and the second system 602 can be realized.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method of testing, comprising:
the first system sends an original request message with the previous time acquired from the historical message record table to a software system to be tested;
the second system receives a first intermediate message obtained after the original request message is analyzed by the software system to be tested;
the second system extracts the message key value of the first intermediate message according to a message key value extraction method corresponding to a pre-configured message format;
the second system returns the original response message matched from the history message record table to the software system to be tested according to the message key value of the first intermediate message;
the first system receives a second intermediate message obtained after the original response message is analyzed by the software system to be tested;
the first system and the second system are both virtual systems.
2. The test method of claim 1, further comprising:
and acquiring a historical message record table in a preset time period from an end-to-end message flow database.
3. The test method of claim 1, wherein the first system includes one or more upstream systems, and wherein the plurality of upstream systems are processed in parallel when the first system includes the plurality of upstream systems.
4. The test method of claim 1, wherein the second system includes one or more downstream systems, and wherein the plurality of downstream systems are processed in parallel when the second system includes the plurality of downstream systems.
5. The testing method of claim 1, wherein the message key value extraction method corresponding to the preconfigured message format comprises:
determining a message key value of the fixed-length format message according to the identification field value in the fixed-length format message; the identification field value uniquely identifies different messages with fixed length formats; and/or
Extracting a message key value of the 8583 format message according to a field domain of the 8583 format message; and/or
And extracting message key values of the json format message or the xml format message according to the domain or the label of the preset position of the json format message or the xml format message.
6. The test method of claim 1, further comprising:
the first system records a timestamp of an original request message sent to a software system to be tested; and/or
The first system records a timestamp for receiving a second intermediate message returned by the software system to be tested; and/or
The second system records a timestamp for receiving the first middle message sent by the software system to be tested; and/or
And the second system records the time stamp of the original response message returned to the software system to be tested.
7. The test method of claim 1, further comprising:
configuring a message format of a first system and a message key value extraction method corresponding to the message format according to a received first configuration instruction; and/or
And configuring the message format of the second system and a message key value extraction method corresponding to the message format according to the received second configuration instruction.
8. A test apparatus, comprising:
a first system and a second system; the first system and the second system are both virtual systems;
the first system is used for sending an original request message with the prior time acquired from the historical message record table to the software system to be tested;
the second system is used for receiving a first intermediate message obtained after the original request message is analyzed by the software system to be tested;
the second system is also used for extracting the message key value of the first intermediate message according to a message key value extraction method corresponding to a pre-configured message format;
the second system is also used for returning the original response message matched from the historical message record table to the software system to be tested according to the message key value of the first intermediate message;
the first system is also used for receiving a second intermediate message obtained after the original response message is analyzed by the software system to be tested.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the test method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the test method according to any one of claims 1 to 7.
CN202010584783.8A 2020-06-24 2020-06-24 Test method and device, computer equipment and computer readable storage medium Pending CN111737133A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010584783.8A CN111737133A (en) 2020-06-24 2020-06-24 Test method and device, computer equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010584783.8A CN111737133A (en) 2020-06-24 2020-06-24 Test method and device, computer equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111737133A true CN111737133A (en) 2020-10-02

Family

ID=72650793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010584783.8A Pending CN111737133A (en) 2020-06-24 2020-06-24 Test method and device, computer equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111737133A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113312264A (en) * 2021-06-08 2021-08-27 中国农业银行股份有限公司 Business system test method, device, equipment, medium and product

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106487603A (en) * 2015-08-26 2017-03-08 阿里巴巴集团控股有限公司 A kind of response test method and device
CN107179995A (en) * 2017-03-09 2017-09-19 北京融信易安信息技术有限公司 A kind of performance test methods of application program of computer network
CN111124898A (en) * 2019-12-10 2020-05-08 平安国际智慧城市科技股份有限公司 Question-answering system testing method and device, computer equipment and storage medium
CN111177222A (en) * 2019-12-26 2020-05-19 腾讯云计算(北京)有限责任公司 Model testing method and device, computing equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106487603A (en) * 2015-08-26 2017-03-08 阿里巴巴集团控股有限公司 A kind of response test method and device
CN107179995A (en) * 2017-03-09 2017-09-19 北京融信易安信息技术有限公司 A kind of performance test methods of application program of computer network
CN111124898A (en) * 2019-12-10 2020-05-08 平安国际智慧城市科技股份有限公司 Question-answering system testing method and device, computer equipment and storage medium
CN111177222A (en) * 2019-12-26 2020-05-19 腾讯云计算(北京)有限责任公司 Model testing method and device, computing equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113312264A (en) * 2021-06-08 2021-08-27 中国农业银行股份有限公司 Business system test method, device, equipment, medium and product

Similar Documents

Publication Publication Date Title
CN107302476B (en) Automatic testing method and system for testing asynchronous interactive system
CN111061696B (en) Method and device for analyzing transaction message log
CN109582655B (en) Method and device for positioning system log and computer readable storage medium
CN109802842B (en) Application topology generation method and related equipment
CN113110995A (en) System migration test method and device
CN114328566A (en) Relationship graph updating method, device, medium, equipment and generating method
CN108304322B (en) Pressure testing method and terminal equipment
CN115811484A (en) Network detection method, device and storage medium
CN111737133A (en) Test method and device, computer equipment and computer readable storage medium
CN111427796A (en) System testing method and device and electronic equipment
CN116737482A (en) Method and device for collecting chip test data in real time and electronic equipment
CN101409655A (en) Message-driven automation test system and implementing method
CN111209266B (en) Audit method and device based on Redis database and electronic equipment
CN114500348B (en) CDN gateway testing method and system
CN111352821A (en) Service testing method, device, electronic equipment and computer readable storage medium
CN110597728A (en) Method, device and system for constructing test data
CN111782291B (en) Method and device for starting test page
CN112202632A (en) Message extraction method and device, electronic equipment and computer readable storage medium
CN107040603A (en) For determining the method and apparatus that application program App enlivens scene
CN110611600B (en) Network state information acquisition method and system
CN112131611A (en) Data correctness verification method, device, equipment, system and storage medium
CN112230897A (en) Monitoring method and device for bank branch interface reconstruction
CN105988917A (en) Method and device for obtaining abnormal information
CN106469086B (en) Event processing method and device
CN113342644B (en) Automatic test script generation method and device based on grammar analysis technology

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