Test method and device

Through information from the pre -developed environment, the downstream path recognition and marking, and forwarded to the downstream test environment, solved the problem of unstable testing environment, realized the efficient and stable test environment, and improved the test efficiency and quality.

CN119357070APending Publication Date: 2025-01-24BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310879020.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-17
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

In full-link testing, the existing test environment test is unstable and is greatly affected by upstream data errors or newly deployed upstream services, resulting in low testing efficiency and low quality.

Method used

By identifying and marking the downstream paths of messages from the pre-release environment, and forwarding the marked messages to the downstream test environment for testing, the testing of the test environment based on the stable upstream pre-release environment is realized.

Benefits of technology

The privatization of the test makes the unstable factors affect the current test environment, eliminates the impact of external factors, improves the stability of the test environment, thereby improving the test efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357070A_ABST
    Figure CN119357070A_ABST
Patent Text Reader

Abstract

The invention discloses a testing method and device, and relates to the technical field of software system testing. A specific embodiment of the method comprises the following steps: identifying a downstream path of a received message from a pre-sending environment, and marking the identified message needing to access a downstream test environment; and forwarding the message with the marking mark to a downstream test environment, so that the downstream test environment performs a test according to the received message. According to the embodiment, the test of the test environment based on the stable upstream pre-expansion environment is realized, and the test is privatized, so that the unstable factor is only the current test environment, the influence of other external factors on the current test environment is completely eradicated, the stability of the test environment is ensured, and the test efficiency and the test quality are further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software system testing, and in particular to a testing method and device. Background Art

[0002] In the process of software development, in order to improve the testing efficiency, reliability and compatibility of the project, it is usually necessary to build three sets of environments for the project (test environment, pre-release environment and online environment), and different environments have different responsibilities. Testers perform tests according to test cases in the test environment. After the test environment passes the test, they enter the pre-release environment for pre-release testing. When the pre-release environment passes the test, regression testing of the online environment is performed.

[0003] In the process of implementing the present invention, the inventors found that the prior art has the following problems:

[0004] In full-link testing, the existing test environment has very unstable influencing factors. Each link node often changes. If the upstream data is wrong or there is a newly deployed upstream service, it will directly affect the downstream test, which leads to the instability of the overall test environment, resulting in low test efficiency and low test quality. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a testing method and device, which mark messages from a pre-release environment that need to be connected to a downstream test environment, and then forward the marked messages to the downstream test environment to test the downstream test environment, thereby realizing testing of the test environment based on a stable upstream pre-release environment, privatizing the test so that the only unstable factor is the current test environment, eliminating the influence of other external factors on the current test environment, ensuring the stability of the test environment, and thereby improving the test efficiency and test quality.

[0006] To achieve the above object, according to a first aspect of an embodiment of the present invention, a testing method is provided, comprising:

[0007] Identify the downstream path of the messages received from the pre-release environment, and mark the identified messages that need to be connected to the downstream test environment;

[0008] The message with the marking mark is forwarded to the downstream test environment so that the downstream test environment performs a test according to the received message.

[0009] Optionally, identifying a downstream path of a message received from a pre-launch environment includes: acquiring a subject of the message from the pre-launch environment, parsing the subject, and determining a downstream path of the message according to a result of the parsing.

[0010] Optionally, forwarding a message with a tagged mark to a downstream test environment includes: copying the message with the tagged mark to obtain a copied message; determining a test topic corresponding to the copied message according to a subscription rule of the message topic of the downstream test environment, and changing the topic of the copied message to the test topic; and sending the copied message to the downstream test environment.

[0011] Optionally, the message with the marked message is forwarded to the downstream test environment by setting up a message separator in the pre-release environment; the message separator has a switch, and when the downstream test environment passes the test, the downstream pre-release environment is tested by turning off the switch of the message separator.

[0012] Optionally, the method further includes: when the downstream test environment is composed of multiple sub-test environments and the sub-test environments have a superior-subordinate relationship, configuring the marking mark in each of the sub-test environments so that each of the sub-test environments sends a message with the marking mark.

[0013] Optionally, the method further includes: monitoring whether the pre-launch environment is in an abnormal state, and if the pre-launch environment is in an abnormal state, restoring the pre-launch environment to a normal state through a rollback mechanism.

[0014] According to a second aspect of an embodiment of the present invention, a testing method is provided, comprising: in response to receiving a message with a marking mark from a pre-release environment, accessing a database according to the marking mark and a data access request in the message with the marking mark, and obtaining response data corresponding to the data access request, wherein the message with the marking mark is obtained according to any method described in the first aspect of the embodiment of the present invention; and testing the test environment of each module to be tested is performed in combination with the database according to the response data and the message with the marking mark.

[0015] According to a third aspect of an embodiment of the present invention, there is provided a testing device, including:

[0016] The identification and marking module is used to identify the downstream path of the messages received from the pre-release environment and mark the identified messages that need to be connected to the downstream test environment;

[0017] The forwarding test module is used to forward the message with the marking mark to the downstream test environment so that the downstream test environment performs a test according to the received message.

[0018] According to a fourth aspect of an embodiment of the present invention, there is provided a testing electronic device, including:

[0019] one or more processors;

[0020] a storage device for storing one or more programs,

[0021] When the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the first aspect of the embodiment of the present invention.

[0022] According to a fifth aspect of an embodiment of the present invention, there is provided a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method provided in the first aspect of the embodiment of the present invention is implemented.

[0023] An embodiment of the invention has the following advantages or beneficial effects: by identifying the downstream path of the message received from the pre-release environment, the identified message that needs to be connected to the downstream test environment is marked; the marked message is forwarded to the downstream test environment so that the downstream test environment can perform tests according to the received message. The technical solution realizes testing the test environment based on the stable upstream pre-release environment, privatizes the test, and makes the unstable factor only the current test environment, eliminates the influence of other external factors on the current test environment, ensures the stability of the test environment, and thus improves the test efficiency and test quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0025] Figure 1 is a schematic diagram of the main process of the testing method according to an embodiment of the present invention;

[0026] Figure 2 is a detailed flow chart of the testing method of an embodiment of the present invention;

[0027] Figure 3 is a schematic diagram of a database access process of a downstream test environment of an embodiment of the present invention;

[0028] Figure 4 Schematic diagram of the whole process principle of the testing method of the embodiment of the present invention;

[0029] Figure 5 is a schematic diagram of main modules of a testing device according to an embodiment of the present invention;

[0030] Figure 6 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0031] Figure 7 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0032] It should be noted that in the technical solution of the present disclosure, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0033] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0034] In the full-link test, the existing test environment test has very unstable influencing factors. Each link node often changes. If the upstream data is wrong or there is a newly deployed upstream service, it will directly affect the downstream test, which leads to the instability of the overall test environment, resulting in low test efficiency and low test quality, which cannot meet the actual application requirements well.

[0035] In order to solve the above-mentioned problems existing in the prior art, the present invention proposes a testing method, which marks the messages from the pre-release environment and need to access the downstream test environment, and then forwards the marked messages to the downstream test environment to test the downstream test environment, thereby realizing the testing of the test environment based on the stable upstream pre-release environment, privatizing the test, so that the only unstable factor is the current test environment, eliminating the influence of other external factors on the current test environment, ensuring the stability of the test environment, and thus improving the test efficiency and test quality.

[0036] Figure 1 is a schematic diagram of the main process of the testing method according to an embodiment of the present invention, such as Figure 1 As shown, the testing method of the embodiment of the present invention includes the following steps S101 to S102.

[0037] Step S101: Identify the downstream path of the message received from the pre-release environment, and mark the identified message that needs to be accessed to the downstream test environment.

[0038] Specifically, in the context of increasingly complex Internet software systems and increasing iteration frequency, the existing full-link testing methods based on the test environment cannot well guarantee the quality of the online software projects. To this end, the embodiments of the present invention open up the message transmission channel between the pre-release environment and the downstream test environment, and test the downstream test environment through the stable and reliable messages of the pre-release environment, avoiding other external unstable factors, so that testers only need to focus on the testing process of the downstream test environment itself. The embodiment of the present invention uses the message from the stable and reliable pre-release environment as the upstream data of the downstream test environment. The upstream and downstream here can be understood as including multiple functional modules in a software system, and the execution logic of each functional module has a dependency relationship. Functional module B depends on functional module A, then the dependent functional module A is the upstream of functional module B, and correspondingly, functional module B is the downstream of functional module A; it can be understood that for the software system of the microservice architecture, there is also a dependency relationship between each service. Similar to the above, when service F depends on service E, the dependent service E is the upstream of service F, and correspondingly, service F is the downstream of service E; of course, the upstream and downstream are not limited to a one-to-one form, and multiple upstreams may correspond to one downstream, or one upstream may correspond to multiple downstreams. As long as there is a dependency relationship between modules or services, it is upstream and downstream.

[0039] In the full-link test scenario of an embodiment of the present invention, the downstream path is identified based on the content of the message from the pre-launch environment. The message of the pre-launch environment may be directly transmitted to the downstream pre-launch environment for testing within the pre-launch environment, or may be transmitted to the downstream test environment for testing within the test environment. Messages identified to the downstream pre-launch environment can be directly transmitted. Messages identified as needing to access the downstream test environment are marked with a preset test marking tag.

[0040] According to an embodiment of the present invention, the downstream path of a message received from a pre-launch environment is identified, including: obtaining a subject of the message from the pre-launch environment, parsing the subject, and determining the downstream path of the message according to a result of the parsing.

[0041] Specifically, in order to improve the efficiency of message identification, the topic naming rules of the message can be set according to the downstream path corresponding to the content of the message, and the message of the pre-release environment can be named according to the topic naming rules. When receiving a message from the pre-release environment, the topic of the message is obtained, and the topic is parsed to determine the downstream path corresponding to the topic, thereby obtaining the downstream path of the message.

[0042] Step S102: forward the message with the marking mark to the downstream test environment, so that the downstream test environment performs a test according to the received message.

[0043] Specifically, after identifying that the message from the pre-release environment needs to be tested in the downstream test environment and marked, the channel from the pre-release environment to the downstream test environment is opened, and the marked message is forwarded to the downstream test environment, so that when the downstream test environment tests according to the specific marked message, if an exception occurs, the stable factors can be eliminated according to the source of the message, making it easier to find the abnormal point.

[0044] According to one embodiment of the present invention, forwarding a message with a marking mark to a downstream test environment includes: copying the message with the marking mark to obtain a copied message; determining the test topic corresponding to the copied message according to the subscription rule of the message topic of the downstream test environment, and changing the topic of the copied message to the test topic; and sending the copied message to the downstream test environment.

[0045] Specifically, the message with the marking mark that needs to be forwarded to the downstream test environment is copied. Considering that the messages of the test environment and the pre-release environment are isolated, they are usually isolated by naming the message topic to ensure that the test environment subscribes to and consumes the messages of the test environment, and the pre-release environment subscribes to and consumes the messages of the pre-release environment. For example, the suffix of the topic can be used to distinguish: topic_pre indicates that the pre-release environment can consume the message, and topic_test indicates that the test environment can consume the message. For the copied message, because the message comes from the pre-release environment, the message topic of the copied message is the topic with the pre-release environment identifier. In order to facilitate the downstream test environment to consume the copied message, it is necessary to determine the test topic that meets the subscription rules of the message topic of the downstream test environment according to the subscription rules of the message topic of the downstream test environment, and then change the topic of the copied message to the test topic. For example, the subscription rule of the message topic of the downstream test environment is a topic with the suffix test field, which means that the test topic is determined to be the topic topic_test, so it is necessary to change the topic of the copied message to a topic with the suffix test field. Finally, the copied message with the updated topic is sent to the downstream test environment so that the downstream test environment can consume the copied message.

[0046] Figure 2It is a detailed flowchart of the test method of an embodiment of the present invention. The downstream path of the message with the subject of topic_pre received from the pre-launch environment is identified. If it is identified that the message does not need to access the downstream test environment, no processing is performed; if it is identified that the message needs to access the downstream test environment, the message is marked. The downstream path is determined according to the marking identifier in the message. If there is no marking identifier, the message enters the downstream pre-launch environment for pre-launch testing. If there is a marking identifier, the message separator copies the message with the marking mark to obtain a copied message; according to the subscription rules of the message topic of the downstream test environment, the subject of the copied message is changed to topic_test; the copied message with the subject of topic_test is forwarded to the downstream test environment.

[0047] Through the above-mentioned separate copying and forwarding of the messages of the stable pre-launch environment, the upstream is a stable pre-launch environment when the downstream test environment is tested, and the unstable factors are limited to its own downstream test environment, which ensures the stability of the test environment, thereby improving the test efficiency and test quality. Table 1 is a comparison table of the test performance of the upstream test environment and the upstream pre-launch environment on the downstream test environment in an embodiment of the present invention. It can be seen from Table 1 that the testing of the downstream test environment based on the messages of the upstream stable pre-launch environment improves the stability of the test environment and the test quality of the test environment, and avoids the problem of long full-link test cycle. In addition, the test based on the high-quality test environment also avoids the problem of test data pollution during the pre-launch environment test.

[0048] Table 1

[0049]

[0050] According to another embodiment of the present invention, the message with the marked message is forwarded to the downstream test environment by a message separator set in the pre-release environment; the message separator has a switch, and when the downstream test environment passes the test, the downstream pre-release environment is tested by closing the switch of the message separator.

[0051] Specifically, the embodiment of the present invention constructs a message separator in the pre-release environment. When a message that needs to access the downstream test environment is identified, the message separator is turned on and the marking mark is configured on the message separator. When the message that needs to access the downstream test environment passes through the message separator, the message separator will directly attach the marking mark to the message to obtain a message with the marking mark, and then forward the message with the marking mark to the downstream test. When the downstream test environment performs a test based on the received message and the test passes, it means that the conditions of the downstream pre-release environment are met, and the switch of the message separator is turned off. In this way, no more messages will enter the downstream test environment, and the transition from the test environment to the pre-release environment is realized, so that the modules that have passed the test of the test environment can continue to be tested in the pre-release environment.

[0052] According to another embodiment of the present invention, the method further includes: when the downstream test environment is composed of multiple sub-test environments and each of the sub-test environments has a superior-subordinate relationship, configuring the marking mark in each of the sub-test environments so that each of the sub-test environments sends a message with the marking mark.

[0053] Specifically, the testing method of the embodiment of the present invention can be used not only for the full-link test of each module in a functional unit, but also for the full-link test of the joint debugging between subsystems in the project. For the test of the test environment for joint debugging between subsystems, whether it is joint debugging with the upper-level subsystem or joint debugging with the lower-level subsystem, the upper and lower subsystems of the joint debugging are considered to be in the downstream test environment to be tested. The upper and lower subsystems here can be an upper-level subsystem and a lower-level subsystem, or multiple upper-level subsystems and a lower-level subsystem, or an upper-level subsystem and multiple lower-level subsystems. The upper and lower sub-test environments to which these upper and lower subsystems belong can be used as a downstream test environment as a whole, that is, the downstream test environment is a set. When marking the message from the upstream stable pre-release environment and needing to access the downstream test environment, the marking mark is configured in each sub-test environment of the downstream test environment, so as to ensure that each sub-test environment from the upper level to the lower level can send a message with a marking mark.

[0054] According to another embodiment of the present invention, the method further includes: monitoring whether the pre-launch environment is in an abnormal state, and if the pre-launch environment is in an abnormal state, restoring the pre-launch environment to a normal state through a rollback mechanism.

[0055] Specifically, based on the stability of the pre-launch environment, the embodiments of the present invention copy and forward the messages of the pre-launch environment to the downstream test environment for testing to improve the stability of the test environment. Therefore, the stability of the pre-launch environment is a prerequisite for the embodiments of the present invention. In order to ensure the stability of the pre-launch environment, the state of the pre-launch environment during the test process is monitored. If an abnormality is found, the rollback mechanism is activated to restore the pre-launch environment in the current abnormal state to the most recent version of the normal state of the pre-launch environment to prevent the impact on the downstream test environment. After troubleshooting the abnormal pre-launch environment and updating the test pass status to the normal state, it is redeployed to the current normal state pre-launch environment, thereby improving the stability of the pre-launch environment and also ensuring the stability of the test environment.

[0056] Based on the above-mentioned testing method, the present invention also provides a testing method for a downstream testing environment, including: in response to receiving a message with a marking mark from a pre-sent environment, accessing a database according to the marking mark and a data access request in the message with the marking mark, and obtaining response data corresponding to the data access request, wherein the message with the marking mark is obtained according to any one of the above-mentioned testing methods; based on the response data and the message with the marking mark, combined with the database, testing the test environment for each module to be tested.

[0057] Specifically, the downstream test environment receives a message with a marking mark from the upstream pre-launch environment. Considering that the data of the pre-launch environment and the test environment are isolated, that is, the data access request of the pre-launch environment cannot access the database of the test environment. If there is a data access request in the message received by the downstream test environment, that is, the message from the pre-launch environment needs to access the database of the test environment to obtain the required data, since this data access request comes from the pre-launch environment, in order to ensure data security, the database of the test environment needs to determine whether the message containing the data access request from the pre-launch environment has a marking mark. Only with the marking mark is access to the database of the test environment allowed. Furthermore, the downstream test environment uses test cases to test each module to be tested based on the response data obtained by the data access request, the message from the upstream pre-launch environment with a marking mark, and the database of the test environment.

[0058] Figure 3 It is a schematic diagram of the database access process of the downstream test environment of an embodiment of the present invention. When the downstream test environment receives a data access request from the pre-release environment, it first determines whether the message containing the data access request has a marking mark. If there is a marking mark, access to the database of the test environment is allowed. If there is no test mark, access to the database of the test environment is not allowed, and only the database of the pre-release environment can be accessed.

[0059] Figure 4 It is a schematic diagram of the whole process principle of the test method of the embodiment of the present invention. The message separator can be deployed in the pre-release environment, or between the pre-release environment and the test environment, so as to separate, copy and forward the message; the test of the test environment is based on data isolation and message isolation, and the test environment test of each module in the system, that is, the message of the test environment, the data of the database and the message of the pre-release environment, the data of the database, and the message of the online environment, the data of the database are isolated; the pre-release environment test is based on message isolation, and the pre-release environment test of each module in the system, that is, the message of the pre-release environment is isolated from the message of the test environment; the online environment test is a regression verification test of each module in the system, and abnormal problems are discovered in time by using monitoring and alarm. It should be noted that the pre-release environment and the online environment share a set of databases, so when testing the pre-release environment, it is necessary to formulate corresponding security mechanisms according to the business. Monitor the messages of each module in the pre-release environment, identify the messages of each module to be tested in the downstream test environment, and mark these messages by the message separator, and forward them to the corresponding modules to be tested in the downstream test environment, so that these modules to be tested can test the test environment in the test environment. The modules that have passed the test environment are deployed to the staging environment for staging testing. Finally, the modules that have passed the staging environment test are deployed to the online environment for regression testing to complete the full process testing.

[0060] The testing method provided by the embodiment of the present invention converts an unstable upstream testing environment into a stable pre-launch environment through message separation copy forwarding technology, thereby avoiding the impact of the unstable upstream testing environment, improving the testing efficiency, and ensuring the testing quality of the testing environment, thereby reducing testing problems that may occur in subsequent pre-launch environments, avoiding data pollution in the pre-launch environment, and ensuring the delivery cycle and quality of the project.

[0061] Figure 5 Schematic diagram of the main modules of the testing device according to an embodiment of the present invention. Figure 5 As shown, the testing device 500 mainly includes an identification and marking module 501 and a forwarding test module 502 .

[0062] The identification and marking module is used to identify the downstream path of the messages received from the pre-release environment and mark the identified messages that need to be connected to the downstream test environment;

[0063] The forwarding test module is used to forward the message with the marking mark to the downstream test environment so that the downstream test environment performs a test according to the received message.

[0064] According to an embodiment of the present invention, the identification and marking module 501 is further used to: obtain the subject of the message from the pre-send environment, parse the subject, and determine the downstream path of the message according to the parsed result.

[0065] According to another embodiment of the present invention, the forwarding test module 502 is also used to: copy the message with the marked mark to obtain a copied message; determine the test topic corresponding to the copied message according to the subscription rule of the message topic of the downstream test environment, and change the topic of the copied message to the test topic; and send the copied message to the downstream test environment.

[0066] According to another embodiment of the present invention, the message with the marked message is forwarded to the downstream test environment by a message separator set in the pre-release environment; the message separator has a switch, and when the downstream test environment passes the test, the downstream pre-release environment is tested by closing the switch of the message separator.

[0067] According to another embodiment of the present invention, the testing device 500 also includes a marking configuration module (not shown in the figure), which is used to: when the downstream testing environment is composed of multiple sub-testing environments and each of the sub-testing environments has a superior-subordinate relationship, configure the marking in each of the sub-testing environments so that each of the sub-testing environments sends a message with the marking.

[0068] According to another embodiment of the present invention, the testing device 500 also includes a rollback module (not shown in the figure), which is used to: monitor whether the pre-launch environment is in an abnormal state, and if the pre-launch environment is in an abnormal state, restore the pre-launch environment to a normal state through a rollback mechanism.

[0069] Figure 6 is an exemplary system architecture diagram to which embodiments of the present invention can be applied.

[0070] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, 603, network 604 and server 605. Network 604 is used to provide a medium for communication links between terminal devices 601, 602, 603 and server 605. Network 604 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0071] Users can use terminal devices 601, 602, 603 to interact with server 605 through network 604 to receive or send messages, etc. Various communication client applications, such as test applications, etc., can be installed on terminal devices 601, 602, 603 (only as an example).

[0072] The terminal devices 601 , 602 , and 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.

[0073] The server 605 may be a server that provides various services, such as a background management server (only an example) that provides support for the test performed by the user using the terminal devices 601, 602, and 603. The background management server may identify the downstream path of the message received from the pre-release environment, mark the identified message that needs to be accessed to the downstream test environment, forward the marked message to the downstream test environment, so that the downstream test environment performs testing and other processing according to the received message, and feeds back the processing result (such as the test result, etc. - only an example) to the terminal device.

[0074] It should be noted that the testing method provided in the embodiment of the present invention is generally executed by the server 605 , and accordingly, the testing device is generally disposed in the server 605 .

[0075] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0076] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of a terminal device or a server suitable for implementing an embodiment of the present invention. Figure 7 The terminal device or server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0077] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0078] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.

[0079] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.

[0080] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may 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 the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination thereof.

[0081] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0082] The units involved in the embodiments of the present invention may be implemented in software or hardware. The units described may also be provided in a processor, for example, may be described as: a processor comprising: a marking identification module and a forwarding test module. The names of these modules do not, in some cases, constitute limitations on the modules themselves, for example, the forwarding test module may also be described as "a module for forwarding messages with marking marks to a downstream test environment so that the downstream test environment performs tests based on the received messages".

[0083] On the other hand, the present invention also provides a computer-readable medium, which may be included in the device described in the embodiment; or may exist independently without being assembled into the device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by the device, the device includes: identifying the downstream path of the message received from the pre-release environment, marking the identified message that needs to access the downstream test environment; forwarding the marked message to the downstream test environment, so that the downstream test environment performs a test according to the received message.

[0084] The technical solution according to the embodiment of the present invention has the following advantages or beneficial effects: by identifying the downstream path of the message received from the pre-release environment, the identified message that needs to be connected to the downstream test environment is marked; the message with the mark is forwarded to the downstream test environment so that the downstream test environment performs the test according to the received message. The technical solution realizes the testing of the test environment based on the stable upstream pre-release environment, privatizes the test, so that the only unstable factor is the current test environment, eliminates the influence of other external factors on the current test environment, ensures the stability of the test environment, and thus improves the test efficiency and test quality.

[0085] The specific implementation methods described herein do not constitute limitations on the scope of protection of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention shall be included in the scope of protection of the present invention.

Claims

1. A testing method, characterized in that: include: Identify the downstream path of the messages received from the pre-release environment, and mark the identified messages that need to be connected to the downstream test environment; The message with the marking mark is forwarded to the downstream test environment so that the downstream test environment performs a test according to the received message.

2. The method according to claim 1, characterized in that Identify the downstream path of the message received from the pre-release environment, including: The subject of the message from the pre-send environment is obtained, the subject is parsed, and the downstream path of the message is determined according to the parsed result.

3. The method according to claim 1, characterized in that Forwarding messages with tagged tags to downstream test environments, including: Copying the message with the marking mark to obtain a copied message; Determine the test topic corresponding to the copied message according to the subscription rule of the message topic of the downstream test environment, and change the topic of the copied message to the test topic; The copy message is sent to the downstream test environment.

4. The method according to claim 1, characterized in that The message with the marking mark is forwarded to the downstream test environment by a message separator set in the pre-release environment; the message separator has a switch, and when the downstream test environment passes the test, the downstream pre-release environment is tested by closing the switch of the message separator.

5. The method according to claim 1, characterized in that The method further comprises: In the case that the downstream test environment is composed of a plurality of sub-test environments and the sub-test environments have a superior-subordinate relationship, the marking mark is configured in each of the sub-test environments so that each of the sub-test environments sends a message with the marking mark.

6. The method according to claim 1, characterized in that The method further comprises: Monitor whether the pre-launch environment is in an abnormal state, and if the pre-launch environment is in an abnormal state, restore the pre-launch environment to a normal state through a rollback mechanism.

7. A testing method, characterized in that: include: In response to receiving a message with a marking mark from a pre-release environment, accessing a database according to the marking mark and a data access request in the message with the marking mark to obtain response data corresponding to the data access request, wherein the message with the marking mark is obtained according to any one of the methods according to claims 1 to 6; According to the response data and the message with the marking mark, in combination with the database, a test environment test is performed on each module to be tested.

8. A testing device, characterized in that: include: The identification and marking module is used to identify the downstream path of the messages received from the pre-release environment and mark the identified messages that need to be connected to the downstream test environment; The forwarding test module is used to forward the message with the marking mark to the downstream test environment so that the downstream test environment performs a test according to the received message.

9. A mobile electronic device terminal, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.