Application testing methods, apparatus, equipment and storage media

By obtaining and processing application test requests in the gateway and using the bastion machine identifier to perform application verification in the intranet environment, the cumbersome verification process in the existing technology is solved, and a more intuitive and efficient test process is achieved. User experience impact.

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

Patent Information

Application Number
CN202110420958.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-19
Publication Date
2025-01-10
Estimated Expiration
2041-04-19

AI Technical Summary

Technical Problem

In the prior art, the application verification process is cumbersome and complex, and requires loading and testing on multiple servers one by one, resulting in complex verification process and may affect user experience, increasing the rollback time and troubleshooting difficulty.

Method used

By obtaining the application test request sent by the terminal device in the gateway, using the bastion machine identifier to send a service processing request to the corresponding server, and pushing the test results to the terminal device, establishing the routing relationship between the application, gateway and server to be verified, simplifying the test process And concentrate the verification process in the intranet environment.

Benefits of technology

It reduces the complexity and cumbersomeness of the application testing process, makes verification more intuitive, avoids poor user experience and related complaints, and improves the testing efficiency and accuracy before the application is released.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113765735B_ABST
    Figure CN113765735B_ABST
Patent Text Reader

Abstract

The present application provides an application testing method, apparatus, device and storage medium. The gateway obtains an application testing request sent by a terminal device. The application testing request includes: a bastion host identifier and a business processing request of an application to be verified. Then, based on the bastion host identifier, the gateway sends a business processing request to a server corresponding to the bastion host identifier. The server can provide the services required by the application to be verified, and feedback the business processing result corresponding to the business processing request to the gateway. Therefore, the gateway can determine the test result for the application to be verified based on the business processing result, and push the test result to the terminal device. In this technical solution, the gateway sends the business processing request of the application to be verified in the application testing request to the server for processing, and forwards the test result to the terminal device to show it to the tester, which reduces the cumbersome and complicated procedures in the application testing process and makes the application verification more intuitive.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to an application testing method, device, equipment and storage medium. Background Art

[0002] In the field of Internet technology, as Internet users have higher requirements for the functions of product applications, applications need to be iteratively developed to meet these requirements. Before each application is released online, testers need to conduct rigorous testing on the application.

[0003] In the prior art, conventional application verification schemes are mainly implemented by simulating interface calls. Specifically, the tester loads the application to be verified onto a server for application testing, uses the client to call the application test results on the server through the simulation interface, checks the messages in the application test results, and determines whether there are any abnormalities in the application.

[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art: after the application is loaded on one server and tested, it is necessary to load the application on other servers and test them in sequence. Only after all servers have been tested can the testers obtain the test results of all servers through the client, and then judge whether the application has an abnormality based on the messages in the test results. Therefore, such a verification process is cumbersome and complex. Summary of the invention

[0005] The embodiments of the present application provide an application testing method, apparatus, device and storage medium to solve the problem that the verification process for applications in the prior art is cumbersome and highly complex.

[0006] In a first aspect, an embodiment of the present application provides an application testing method, which is applied to a gateway, including:

[0007] Obtain an application test request sent by a terminal device, wherein the application test request includes: a bastion host identifier and a business processing request of an application to be verified;

[0008] According to the bastion host identifier, the business processing request is sent to the server corresponding to the bastion host identifier, and the business processing result corresponding to the business processing request returned by the server is received, and the server can provide the service required by the application to be verified;

[0009] Determining a test result for the application to be verified according to the business processing result;

[0010] Push the test result to the terminal device.

[0011] In a possible design of the first aspect, after sending the service processing request to a server corresponding to the bastion host identifier according to the bastion host identifier, the method further includes:

[0012] Establishing a first association relationship between the application to be verified and the gateway, and a second association relationship between the gateway and the server;

[0013] Binding the first association relationship and the second association relationship to obtain a routing relationship among the application to be verified, the gateway, and the server;

[0014] The routing relationship is saved.

[0015] In this possible design, before pushing the test result to the terminal device, the method further includes:

[0016] Processing the business processing result to determine the application to be verified corresponding to the business processing result;

[0017] The terminal device where the application to be verified is located is determined according to the routing relationship.

[0018] In a second aspect, an embodiment of the present application provides an application testing method, which is applied to a terminal device, including:

[0019] Obtaining a bastion test request triggered by an external device, wherein the bastion test request includes: a bastion host identifier;

[0020] Generate an application test request for the application to be verified according to the bastion host identifier and the preset bastion access information, the application test request including: the identifier of the application to be verified;

[0021] The application test request is sent to a gateway.

[0022] In a possible design of the second aspect, before obtaining the externally triggered fortress test request, the method further includes:

[0023] Sending a registration request to the server corresponding to the bastion host identifier, the registration request is used to request registration of the service required by the application to be verified, and the registration request includes: the identifier of the application to be verified;

[0024] Generate bastion access information according to the bastion host identifier and the identifier of the application to be verified, where the bastion access information is used to indicate an access relationship between the application to be verified and the server corresponding to the bastion host identifier;

[0025] The fortress access information is stored.

[0026] In a third aspect, an embodiment of the present application provides an application testing method, which is applied to a server, including:

[0027] Receiving a service processing request sent by a gateway, the service processing request including: an identification of an application to be verified;

[0028] Initiate the service required by the application to be verified according to the business processing request and the preset service registration information;

[0029] Processing the business processing request using the service to obtain a business processing result corresponding to the business processing request;

[0030] Sending the service processing result to the gateway.

[0031] In a possible design of the third aspect, before the receiving gateway sends a service processing request, the method further includes:

[0032] Receiving a registration request sent by a terminal device, the registration request is used to request registration of a service required by the application to be verified, the registration request including: an identifier of the application to be verified;

[0033] Generate service registration information according to the registration request;

[0034] Add the bastion host identifier of the server to the service registration information.

[0035] In a fourth aspect, an embodiment of the present application provides an application testing device, which is applied to a gateway and includes: a receiving module, a sending module, and a processing module;

[0036] The receiving module is used to obtain an application test request sent by a terminal device, wherein the application test request includes: a bastion host identifier and a business processing request of an application to be verified;

[0037] The sending module is used to send the service processing request to the server corresponding to the bastion host identifier according to the bastion host identifier;

[0038] The receiving module is further used to receive the business processing result corresponding to the business processing request returned by the server, and the server can provide the service required by the application to be verified;

[0039] The processing module is used to determine the test result for the application to be verified according to the business processing result;

[0040] The sending module is further used to push the test result to the terminal device.

[0041] In a possible design of the fourth aspect, the processing module is further used to:

[0042] Establishing a first association relationship between the application to be verified and the gateway, and a second association relationship between the gateway and the server;

[0043] Binding the first association relationship and the second association relationship to obtain a routing relationship among the application to be verified, the gateway, and the server;

[0044] The routing relationship is saved.

[0045] In this possible design, the processing module is further used for:

[0046] Processing the business processing result to determine the application to be verified corresponding to the business processing result;

[0047] The terminal device where the application to be verified is located is determined according to the routing relationship.

[0048] In a fifth aspect, an embodiment of the present application provides an application testing device, applied to a terminal device, comprising: an acquisition module, a processing module and a sending module;

[0049] The acquisition module is used to acquire a bastion test request triggered by the outside world, wherein the bastion test request includes: a bastion host identifier;

[0050] The processing module is used to generate a business processing request of the application to be verified according to the bastion host identifier and preset bastion access information, wherein the business processing request includes: the identifier of the application to be verified;

[0051] The sending module is further used to send the service processing request to the gateway.

[0052] In a possible design of the fifth aspect, the sending module is further used to send a registration request to the server corresponding to the bastion host identifier, the registration request is used to request registration of the service required by the application to be verified, and the registration request includes: the identifier of the application to be verified;

[0053] The processing module is further used for:

[0054] Generate bastion access information according to the bastion host identifier and the identifier of the application to be verified, where the bastion access information is used to indicate an access relationship between the application to be verified and the server corresponding to the bastion host identifier;

[0055] The fortress access information is stored.

[0056] In a sixth aspect, an embodiment of the present application provides an application testing device, applied to a server, comprising: a receiving module, a processing module and a sending module;

[0057] The receiving module is used to receive a service processing request sent by the gateway, wherein the service processing request includes: an identifier of the application to be verified;

[0058] The processing module is used to start the service required by the application to be verified according to the business processing request and the preset service registration information, and use the service to process the business processing request to obtain the business processing result corresponding to the business processing request;

[0059] The sending module is also used to send the service processing result to the gateway.

[0060] In a possible design of the sixth aspect, the receiving module is further used to receive a registration request sent by a terminal device, where the registration request is used to request registration of a service required by the application to be verified, and the registration request includes: an identifier of the application to be verified;

[0061] The processing module is further used for:

[0062] Generate service registration information according to the registration request;

[0063] Add the bastion host identifier of the server to the service registration information.

[0064] In a seventh aspect, an embodiment of the present application provides an electronic device, including: at least one processor and a memory;

[0065] The memory stores computer-executable instructions;

[0066] The at least one processor executes the computer-executable instructions stored in the memory, so that the electronic device executes the application testing method as described in the first aspect and various possible designs; or, the electronic device executes the application testing method as described in the second aspect and various possible designs; or, the electronic device executes the application testing method as described in the third aspect and various possible designs.

[0067] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored, so that when the computer execution instructions are executed by a processor, they are used to implement the application testing method as described in the first aspect and various possible designs; or, when the computer execution instructions are executed by a processor, they are used to implement the application testing method as described in the second aspect and various possible designs; or, when the computer execution instructions are executed by a processor, they are used to implement the application testing method as described in the third aspect and various possible designs.

[0068] In the ninth aspect, the application embodiment provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the application testing method as described in the first aspect and various possible designs; or, when executed by a processor, the computer program is used to implement the application testing method as described in the second aspect and various possible designs; or, when the computer execution instructions are executed by a processor, is used to implement the application testing method as described in the third aspect and various possible designs.

[0069] The application testing method, apparatus, equipment and storage medium provided in the embodiments of the present application, the gateway obtains the application testing request sent by the terminal device, the application testing request includes: the bastion host identifier and the business processing request of the application to be verified, and then sends the business processing request to the server corresponding to the bastion host identifier according to the bastion host identifier, the server can provide the services required by the application to be verified, and feedback the business processing result corresponding to the business processing request to the gateway, so that the gateway can determine the test result for the application to be verified according to the business processing result, and push the test result to the terminal device. In this technical solution, the gateway sends the business processing request of the application to be verified in the application testing request to the server for processing, and forwards the test result to the terminal device to show it to the tester, which reduces the cumbersome and complicated procedures in the application testing process, making the application verification more intuitive, and the entire application testing process is in the intranet environment, which will not affect the user experience, avoiding user complaints caused by poor user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0071] Figure 1 A schematic diagram of an application scenario for an application test provided in an embodiment of the present application;

[0072] Figure 2 A flowchart of the first embodiment of the application testing method provided in the embodiment of the present application;

[0073] Figure 3 A flow chart of the second embodiment of the application testing method provided in the embodiment of the present application;

[0074] Figure 4 A schematic diagram of the structure of the first embodiment of the application testing device provided in the embodiment of the present application;

[0075] Figure 5 A schematic diagram of the structure of the second embodiment of the application testing device provided in the embodiment of the present application;

[0076] Figure 6A schematic diagram of the structure of the third embodiment of the application testing device provided in the embodiment of the present application;

[0077] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0078] The above drawings show clear embodiments of the present disclosure, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0079] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0080] Before introducing the embodiments of the present application, the background technology of the present application is first explained:

[0081] As product applications play an increasingly important role on the Internet, Internet users have higher requirements for application functionality. Therefore, applications require developers to iterate to meet these requirements. Before each application is released online, testers need to conduct strict verification of the application.

[0082] At present, the conventional application release verification scheme is: the tester first releases the application to a server, and then calls the test results of the server through the simulation interface to view the abnormal application log in the returned message. However, under normal circumstances, the application verification results of a server are not reliable. Therefore, after a server verifies the application, it is necessary to release the application to all servers one by one. Only when all servers confirm that the verification has passed can the tester correctly go through the regression test process through the client. When encountering abnormal situations during the regression test, in order to avoid affecting user use, the application function will be downgraded or rolled back.

[0083] In the current implementation of conventional application release verification solutions, the application needs to be released to all servers, and after verification, testers can obtain possible exceptions in the application through the client, which makes the verification complex and the release workload high. In addition, the risk of online application release is high, new code and old code cannot coexist in full, and the test verification is not intuitive and clear. After the application is fully released, if an abnormality occurs in the application, the application rollback time is long, which makes troubleshooting more difficult and easily causes front-end user perception, resulting in poor user experience and complaints about the application.

[0084] Based on the above problems existing in the prior art, Figure 1 The following is a schematic diagram of an application scenario of an application test provided in an embodiment of the present application, which is used to solve the above technical problems. Figure 1 As shown, the application scenario diagram includes: a terminal device 11, a gateway 12, and a server cluster 13.

[0085] Among them, the server cluster 13 may include multiple bastion hosts, for example, bastion hosts 131, bastion hosts 132, bastion hosts 133, bastion hosts 134 and bastion hosts 135. For example, the terminal device 11 identifies the specified bastion host 131 in the server cluster 13 according to the bastion host identifier in the application test request, so that the bastion host 131 performs the application verification service. Optionally, the bastion host specified by the user for performing application verification can also be a server that is not pulled into the cluster, which may only be able to perform application verification in an intranet environment.

[0086] Optionally, the terminal device 11 can be a mobile phone, computer or other device. When the terminal device 11 is used in an external network environment, it needs to be implemented through a virtual private network (VPN); the gateway 12 can be a transport layer gateway based on the standard framework of Java Web applications (Java Server Faces, JSF), that is, a remote procedure call (RPC) framework, which provides information interaction functions between the terminal device 11 and the bastion host 131.

[0087] In one possible implementation, the terminal device 11 obtains the test request triggered by the tester (click "Application Test"), and sends the test request to the gateway 12. The gateway 12 determines the bastion host 131 corresponding to the test in the server 13 based on the information in the test request. The bastion host 131 verifies whether the function of the application can work normally according to the test request, and sends the verification result to the gateway 12. The gateway 12 then forwards the verification result to the terminal device 11. The tester determines whether the application has any non-compliance with the expected requirements based on the verification result displayed by the terminal device 11.

[0088] In response to the above technical problems, the inventor's technical conception process is as follows: the inventor found that a bastion host can be selected as the server to perform a bastion test on the application. Since the bastion test is performed between the intranet, it will not affect the external network users. In the specific implementation, a gateway can be built as a bridge between the server and the terminal device to enable the server to accurately send the test to the corresponding terminal device after the application test is completed, thereby completing the test before the application is released.

[0089] Below Figure 1 The application scenario schematic diagram shown in the figure describes the technical solution of the present application in detail through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0090] Figure 2 The flowchart of the first embodiment of the application test method provided in the present application is as follows. Figure 2 As shown, the following steps may be included:

[0091] Step 201: The terminal device obtains a bastion test request triggered by the outside world.

[0092] The bastion test request includes: a bastion host identifier.

[0093] In this solution, a specific server is selected as a bastion host in the server cluster in advance, and the application is pre-loaded on the bastion host. Application testing using the bastion host usually needs to be performed in an intranet environment.

[0094] In this step, when the tester needs to test an application, he needs to send a test instruction on the terminal device, that is, the tester can send the test instruction by clicking the "application test" and other related buttons on the terminal device. For the terminal device, the instruction issued by the tester is the fortress test request, and the terminal device receives the fortress test request.

[0095] The bastion host identifier is used to indicate which bastion host is used for the application test request.

[0096] Before this step, the terminal device needs to perform the following operations:

[0097] The first step is to send a registration request to the server corresponding to the bastion host ID.

[0098] The registration request is used to request the registration of services required by the application to be verified, and the registration request includes: an identifier of the application to be verified.

[0099] Specifically, before the terminal device implements the interactive process of the application test with the server, it needs to establish an access relationship with the server to obtain the interactive permission. That is, firstly, according to the bastion host ID, the terminal device sends the registration information to the server corresponding to the bastion host ID.

[0100] The second step is to generate bastion access information based on the bastion host ID and the ID of the application to be verified.

[0101] The identifier of the application to be verified is used to indicate the application to be verified. The bastion host identifier and the identifier of the application to be verified are combined to generate bastion access information.

[0102] Among them, the bastion access information is used to indicate the access relationship between the application to be verified and the server corresponding to the bastion host identifier.

[0103] Step 3: Store fortress access information.

[0104] After storing the bastion access information in the registration request center, after obtaining the bastion test request, the terminal device can find the bastion access information in the registration request center and determine the bastion host identifier in order to generate an application test request.

[0105] Step 202: The terminal device generates an application test request for the application to be verified according to the bastion host identifier and preset bastion access information.

[0106] The application test request includes: an identifier of the application to be verified.

[0107] Optionally, the terminal device generates an application test request based on the bastion host identifier in the received bastion test request and pre-set bastion access information, and the application test request may exist in the JSF context.

[0108] Step 203: The terminal device sends an application test request to the gateway.

[0109] Furthermore, the gateway obtains the application test request sent by the terminal device.

[0110] In this step, after receiving the bastion test request triggered by the tester, the terminal device sends an application test request to the gateway. The application test request is intended to request the gateway to find the server corresponding to the application, and then the server performs corresponding functional tests on the application.

[0111] Optionally, the gateway parses the received application test request to obtain the bastion host identifier and the business processing request of the application to be verified, wherein the business processing request of the application to be verified indicates a request to the bastion host to test specific business functions of the application.

[0112] Step 204: The gateway determines the server corresponding to the bastion host identifier based on the bastion host identifier.

[0113] Among them, the server can provide the services required by the application to be verified.

[0114] In this step, after the gateway parses the application test request, it parses out the bastion host identifier in the application test request, and based on the identifier of the bastion host, it searches out a server among multiple servers for processing the application test request. At the same time, after the gateway parses the application test request, it can obtain the business processing request of the application to be verified, and the business processing request is used to command the server to process the application to be verified.

[0115] Step 205: The gateway sends a service processing request to the server.

[0116] In this step, the gateway sends a service processing request to the server corresponding to the bastion host identifier, and the server receives the service processing request.

[0117] Before this step, the server needs to perform the following operations:

[0118] The first step is to receive the registration request sent by the terminal device.

[0119] The registration request is used to request the registration of services required by the application to be verified, and the registration request includes: an identifier of the application to be verified.

[0120] Optionally, when the server is testing the application to be verified, it needs to provide corresponding services to the application to be verified to meet the requirements of testing various functions in the application to be verified.

[0121] Step 2: Generate service registration information based on the registration request.

[0122] Step 3: Add the server's bastion host ID to the service registration information.

[0123] Optionally, for each server, there is a corresponding identifier, which refers to the uniqueness of the server, and the identifier is added to the service registration information.

[0124] Step 206: The server starts the service required by the application to be verified according to the business processing request and the preset service registration information.

[0125] In this step, the server starts the test service for the application to be verified according to the business processing request sent by the gateway and the above-preset service registration information.

[0126] In a possible implementation, the application to be verified may be a code of an application, and the functions that can be implemented by the code or the problems existing in the code may be tested by using the service.

[0127] Step 207: The server processes the business processing request using the service to obtain a business processing result corresponding to the business processing request.

[0128] Optionally, the server performs a functional test on the application to be verified using services required by the application to be verified, and obtains a business processing result of the application to be verified.

[0129] Step 208: The server sends the service processing result to the gateway.

[0130] Optionally, when the server obtains the business processing result of the application to be verified, it needs to respond to the gateway that the business processing request issued by the gateway has been completed, and send the business processing result to the gateway.

[0131] In a possible implementation, in order to avoid errors in the transmission of business processing results, it is necessary to utilize the callback mechanism in the current JSF context to execute. The implementation process of this step is given in the following embodiment.

[0132] Step 209: The gateway determines the test result for the application to be verified according to the service processing result.

[0133] Optionally, the gateway analyzes the business processing result to determine whether there is any abnormality in the application to be verified, that is, the test result of the application to be verified.

[0134] In a possible implementation, the service processing result may be a test result of the application to be verified.

[0135] Step 210: The gateway pushes the test result to the terminal device.

[0136] Optionally, the gateway sends the business processing results processed by the server to the terminal device, which more clearly displays whether the application to be verified has defects or abnormalities, so as to prompt the tester to process the application.

[0137] If there is no abnormality in the test results in the terminal device, the application to be verified can be directly released to the external network as a product for users to use.

[0138] The application testing method provided by the embodiment of the present application is that the terminal device obtains the bastion test request triggered by the outside world, generates the application test request of the application to be verified according to the bastion host identifier and the preset bastion access information, and sends the application test request to the gateway. The gateway sends the business processing request to the server corresponding to the bastion host identifier according to the bastion host identifier. The server receives the business processing request sent by the gateway, starts the service required by the application to be verified according to the business processing request and the preset service registration information, and uses the service to process the business processing request to obtain the business processing result corresponding to the business processing request, and then sends the business processing result to the gateway. Finally, the gateway determines the test result for the application to be verified according to the business processing result, and pushes the test result to the terminal device. In this technical solution, the gateway processes the application test request, and the server tests the application to be verified, and forwards the test result to the terminal device through the gateway to show it to the tester, which reduces the cumbersome and complicated procedures in the application testing process, makes the application verification more intuitive, and the entire application testing process is in the intranet environment, which will not affect the user experience, and avoids user complaints caused by poor user experience.

[0139] exist Figure 2 On the basis of Figure 3 The flowchart of the second embodiment of the application test method provided in the embodiment of the present application is as follows. Figure 3 As shown, after the above step 205, the application testing method may include the following steps:

[0140] Step 301: Establish a first association relationship between the application to be verified and the gateway, and a second association relationship between the gateway and the server.

[0141] In this solution, based on the callback mechanism in the current JSF context, the above application test request can be forwarded to the server after parsing. After the server processes it, the terminal device can accurately receive the test result corresponding to the application test request.

[0142] In this step, the application test request initiated by the terminal device includes the identification of the application to be verified, that is, a first association relationship between the application to be verified and the gateway is established, indicating the uniqueness of the information transmission path between the gateway and the terminal device, and a second association relationship between the gateway and the server is established, indicating the uniqueness of the information transmission path between the gateway and the server.

[0143] Step 302: Bind the first association relationship and the second association relationship to obtain a routing relationship among the application to be verified, the gateway, and the server.

[0144] In this step, the first association relationship between the application to be verified and the gateway is bound to the second association relationship between the gateway and the server, which means that after the terminal device sends an application test request, the server tests the application and accurately transmits the business processing results to the gateway and then sends them to the terminal device.

[0145] Optionally, the routing relationship actually represents the information transmission connection relationship between the terminal device and the gateway and the server, and can be regarded as an identity document (ID).

[0146] Step 303: Save the routing relationship.

[0147] In this step, the routing relationship is saved to callback so that after completing the application test, the server can send the business processing result to the gateway according to the routing relationship, and the gateway sends it to the initiator of the application test request, that is, the terminal device, according to the routing relationship.

[0148] Optionally, before the gateway pushes the test result to the terminal device, the service processing result is processed to determine the application to be verified corresponding to the service processing result.

[0149] Specifically, after receiving the business processing result sent by the server, the gateway parses the business processing result to find the application to be verified corresponding to the application test.

[0150] Furthermore, according to the routing relationship, the terminal device where the application to be verified is located is determined.

[0151] The application testing method provided in the embodiment of the present application establishes a first association relationship between the application to be verified and the gateway, and a second association relationship between the gateway and the server, and binds the first association relationship and the second association relationship to obtain the routing relationship between the application to be verified, the gateway and the server, and finally saves the routing relationship. The technical solution establishes the routing relationship between the application to be verified, the gateway and the server, so that the server can accurately exchange information with the terminal device after obtaining the business processing result. It provides a basis for the terminal device to obtain the test result of the application to be verified.

[0152] Based on the above application test method embodiment, Figure 4 This is a schematic diagram of the structure of the first embodiment of the application test device provided in the present application. Figure 4 As shown, the application testing device can be integrated on the gateway, including: a receiving module 41, a sending module 42, and a processing module 43;

[0153] The receiving module 41 is used to obtain an application test request sent by a terminal device, where the application test request includes: a bastion host identifier and a business processing request of the application to be verified;

[0154] The sending module 42 is used to send a service processing request to a server corresponding to the bastion host identifier according to the bastion host identifier;

[0155] The receiving module 41 is further used to receive the business processing result corresponding to the business processing request returned by the server, and the server can provide the service required by the application to be verified;

[0156] The processing module 43 is used to determine the test result for the application to be verified according to the business processing result;

[0157] The sending module 42 is also used to push the test results to the terminal device.

[0158] In a possible design of the embodiment of the present application, the processing module 43 is further used to:

[0159] Establishing a first association relationship between the application to be verified and the gateway, and a second association relationship between the gateway and the server;

[0160] Binding the first association relationship and the second association relationship to obtain a routing relationship among the application to be verified, the gateway, and the server;

[0161] Save the routing relationship.

[0162] In this possible design, the processing module 43 is further used for:

[0163] Process the business processing results and determine the application to be verified corresponding to the business processing results;

[0164] According to the routing relationship, determine the terminal device where the application to be verified is located.

[0165] The application testing device provided in the embodiment of the present application can be used to execute the technical solution of the gateway in the above embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0166] Figure 5 This is a schematic diagram of the structure of the second embodiment of the application test device provided in the embodiment of the present application. Figure 5 As shown, the application testing device can be integrated in a terminal device, and includes: an acquisition module 51, a processing module 52 and a sending module 53;

[0167] The acquisition module 51 is used to obtain a bastion test request triggered by the outside world, and the bastion test request includes: a bastion host identifier;

[0168] The processing module 52 is used to generate a business processing request of the application to be verified according to the bastion host identifier and the preset bastion access information, and the business processing request includes: the identifier of the application to be verified;

[0169] The sending module 53 is further used to send the service processing request to the gateway.

[0170] In a possible design of the embodiment of the present application, the sending module 53 is further used to send a registration request to the server corresponding to the bastion host identifier, the registration request is used to request registration of the service required by the application to be verified, and the registration request includes: the identifier of the application to be verified;

[0171] The processing module 52 is further configured to:

[0172] Generate bastion access information according to the bastion host identifier and the identifier of the application to be verified, where the bastion access information is used to indicate the access relationship between the application to be verified and the server corresponding to the bastion host identifier;

[0173] Stores bastion access information.

[0174] The application testing device provided in the embodiment of the present application can be used to execute the technical solution of the terminal device in the above embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0175] Figure 6 This is a schematic diagram of the structure of the third embodiment of the application test device provided in the embodiment of the present application. Figure 6 As shown, the application testing device can be integrated on a server, and includes: a receiving module 61, a processing module 62 and a sending module 63;

[0176] The receiving module 61 is used to receive a service processing request sent by the gateway, where the service processing request includes: an identifier of the application to be verified;

[0177] The processing module 62 is used to start the service required by the application to be verified according to the business processing request and the preset service registration information, and use the service to process the business processing request to obtain the business processing result corresponding to the business processing request;

[0178] The sending module 63 is also used to send the service processing result to the gateway.

[0179] In a possible design of the embodiment of the present application, the receiving module 61 is further used to receive a registration request sent by the terminal device, the registration request is used to request registration of the service required by the application to be verified, and the registration request includes: an identifier of the application to be verified;

[0180] The processing module 62 is further configured to:

[0181] Generate service registration information according to the registration request;

[0182] Add the server's bastion host ID to the service registration information.

[0183] The application testing device provided in the embodiment of the present application can be used to execute the technical solution of the server in the above embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0184] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0185] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7 As shown, the terminal device may include: at least one processor 70 , a memory 71 , and computer program instructions stored in the memory 71 and executable on the processor 70 .

[0186] The electronic device may correspond to a terminal device, a gateway, or a server.

[0187] Optionally, the electronic device may further include: a transceiver 72 and a display 73 .

[0188] The processor 70 executes the computer execution instructions stored in the memory, so that the processor 70 executes the scheme in the above embodiment. The processor 70 can be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0189] The memory 71 and the transceiver 72 are connected to the processor 70 via a system bus and communicate with each other. The memory 71 is used to store computer program instructions.

[0190] The transceiver 72 is used to communicate with other computers, and the transceiver 72 constitutes a communication interface.

[0191] Optionally, in hardware implementation, when the electronic device is a gateway, the above Figure 4The receiving module 41 and the sending module 42 in the embodiment shown correspond to the transceiver 72 in this embodiment. Figure 4 The processing module 43 in the illustrated embodiment corresponds to the processor 70 in this embodiment.

[0192] When the electronic device is a terminal device, the above Figure 5 The sending module 53 in the embodiment shown corresponds to the transceiver 72 in this embodiment. Figure 5 The acquisition module 51 and the processing module 52 in the illustrated embodiment correspond to the processor 70 in this embodiment.

[0193] When the electronic device is a server, the above Figure 6 The receiving module 61 and the sending module 63 in the embodiment shown correspond to the transceiver 72 in this embodiment. Figure 6 The processing module 62 in the illustrated embodiment corresponds to the processor 70 in this embodiment.

[0194] The display 73 may be a user interface for displaying the application test results. The user interface may include graphics, text, icons, videos, and any combination thereof.

[0195] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries).

[0196] The electronic device provided in the embodiment of the present application can be used to execute the technical solution of the application test method in the above embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0197] An embodiment of the present application also provides a chip for running instructions, which is used to execute the technical solution of the application test method in the above embodiment.

[0198] An embodiment of the present application further provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the technical solution of the application test method in the above embodiment.

[0199] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0200] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An application testing method, characterized in that: Applied to gateways, including: Obtain an application test request sent by a terminal device; the application test request is an application test request of the application to be verified generated by the terminal device according to the bastion host identifier and preset bastion access information after receiving the bastion test request triggered by the tester; the application test request includes: the bastion host identifier, the business processing request of the application to be verified and the identifier of the application to be verified; the application test request is used to instruct the gateway to find the server corresponding to the application to be verified; the bastion access information is generated by the terminal device according to the bastion host identifier and the identifier of the application to be verified; the bastion access information is used to indicate the access relationship between the application to be verified and the server corresponding to the bastion host identifier; Parse the application test request to obtain a bastion host identifier and a business processing request of the application to be verified; the business processing request is used to instruct the bastion host to test the specific business functions of the application to be verified; According to the bastion host identifier, the business processing request is sent to the server corresponding to the bastion host identifier, and the business processing result corresponding to the business processing request returned by the server is received, and the server can provide the service required by the application to be verified; Determining a test result for the application to be verified according to the business processing result; Push the test result to the terminal device.

2. The method according to claim 1, characterized in that After sending the service processing request to the server corresponding to the bastion host identifier according to the bastion host identifier, the method further includes: Establishing a first association relationship between the application to be verified and the gateway, and a second association relationship between the gateway and the server; Binding the first association relationship and the second association relationship to obtain a routing relationship among the application to be verified, the gateway, and the server; The routing relationship is saved.

3. The method according to claim 2, characterized in that Before pushing the test result to the terminal device, the method further includes: Processing the business processing result to determine the application to be verified corresponding to the business processing result; The terminal device where the application to be verified is located is determined according to the routing relationship.

4. An application testing method, characterized in that: Applied to terminal equipment, including: Obtaining a bastion test request triggered by an external device, wherein the bastion test request includes: a bastion host identifier; Generate an application test request for the application to be verified according to the bastion host identifier and the preset bastion access information, wherein the application test request includes: the identifier of the application to be verified; the application test request is used to instruct the gateway to find the server corresponding to the application to be verified; the bastion access information is generated by the terminal device according to the bastion host identifier and the identifier of the application to be verified; the bastion access information is used to indicate the access relationship between the application to be verified and the server corresponding to the bastion host identifier; The application test request is sent to the gateway so that the gateway parses the application test request to obtain the bastion host identifier and the business processing request of the application to be verified, so that the server processes the business processing request to obtain the business processing result, and the server can provide the services required by the application to be verified; the business processing request is used to instruct the bastion host to perform specific business function tests on the application to be verified.

5. The method according to claim 4, characterized in that Before obtaining the fortress test request triggered by the outside world, it also includes: Sending a registration request to the server corresponding to the bastion host identifier, the registration request is used to request registration of the service required by the application to be verified, and the registration request includes: the identifier of the application to be verified; Generate bastion access information according to the bastion host identifier and the identifier of the application to be verified, where the bastion access information is used to indicate an access relationship between the application to be verified and the server corresponding to the bastion host identifier; The fortress access information is stored.

6. An application testing method, characterized in that: Applicable to servers, including: Receive a service processing request sent by the gateway, the service processing request including: an identifier of the application to be verified; the service processing request is used to instruct the bastion host to perform a specific service function test on the application to be verified; Initiate the service required by the application to be verified according to the business processing request and the preset service registration information; Processing the business processing request using the service to obtain a business processing result corresponding to the business processing request; Sending the service processing result to the gateway; Before accepting the business processing request sent by the gateway, the gateway obtains the application test request sent by the terminal device; the application test request is generated by the terminal device after receiving the bastion test request triggered by the tester, based on the bastion machine identifier and preset bastion access information, and is an application test request for the application to be verified; the application test request is used to instruct the gateway to find the server corresponding to the application to be verified; the bastion access information is generated by the terminal device based on the bastion machine identifier and the identifier of the application to be verified; the bastion access information is used to indicate the access relationship between the application to be verified and the server corresponding to the bastion machine identifier.

7. The method according to claim 6, characterized in that Before the receiving gateway sends the service processing request, the method further includes: Receiving a registration request sent by a terminal device, the registration request is used to request registration of a service required by the application to be verified, the registration request including: an identifier of the application to be verified; Generate service registration information according to the registration request; Add the bastion host identifier of the server to the service registration information.

8. An application testing device, characterized in that: Applied to the gateway, including: a receiving module, a sending module, a processing module, and a parsing module; The receiving module is used to obtain an application test request sent by a terminal device; the application test request is an application test request of the application to be verified generated by the terminal device according to the bastion host identifier and preset bastion access information after receiving the bastion test request triggered by the tester; the application test request includes: the bastion host identifier, the business processing request of the application to be verified and the identifier of the application to be verified; the application test request is used to instruct the gateway to find the server corresponding to the application to be verified; the bastion access information is generated by the terminal device according to the bastion host identifier and the identifier of the application to be verified; the bastion access information is used to indicate the access relationship between the application to be verified and the server corresponding to the bastion host identifier; The parsing module parses the application test request to obtain a bastion host identifier and a business processing request of the application to be verified; the business processing request is used to instruct the bastion host to test a specific business function of the application to be verified; The sending module is used to send the service processing request to the server corresponding to the bastion host identifier according to the bastion host identifier; The receiving module is further used to receive the business processing result corresponding to the business processing request returned by the server, and the server can provide the service required by the application to be verified; The processing module is used to determine the test result for the application to be verified according to the business processing result; The sending module is further used to push the test result to the terminal device.

9. An application testing device, characterized in that: Applied to terminal equipment, including: an acquisition module, a processing module and a sending module; The acquisition module is used to acquire a bastion test request triggered by the outside world, wherein the bastion test request includes: a bastion host identifier; The processing module is used to generate a business processing request for the application to be verified according to the bastion host identifier and the preset bastion access information, wherein the business processing request includes: the identifier of the application to be verified; the application test request is used to instruct the gateway to find the server corresponding to the application to be verified; the bastion access information is generated by the terminal device according to the bastion host identifier and the identifier of the application to be verified; the bastion access information is used to indicate the access relationship between the application to be verified and the server corresponding to the bastion host identifier; The sending module is also used to send the business processing request to the gateway, so that the gateway parses the application test request to obtain the bastion host identifier and the business processing request of the application to be verified; enables the server to process the business processing request to obtain a business processing result, and the server can provide the services required by the application to be verified; the business processing request is used to instruct the bastion host to perform specific business function tests on the application to be verified.

10. An application testing device, characterized in that: Applied to the server, including: a receiving module, a processing module and a sending module; The receiving module is used to receive a service processing request sent by the gateway, wherein the service processing request includes: an identifier of the application to be verified; the service processing request is used to instruct the bastion host to perform a specific service function test on the application to be verified; The processing module is used to start the service required by the application to be verified according to the business processing request and the preset service registration information, and use the service to process the business processing request to obtain the business processing result corresponding to the business processing request; The sending module is further used to send the service processing result to the gateway; Before the receiving module accepts the business processing request sent by the gateway, the gateway obtains the application test request sent by the terminal device; the application test request is generated by the terminal device after receiving the bastion test request triggered by the tester, based on the bastion host identifier and preset bastion access information, and is an application test request for the application to be verified; the application test request is used to instruct the gateway to find the server corresponding to the application to be verified; the bastion access information is generated by the terminal device based on the bastion host identifier and the identifier of the application to be verified; the bastion access information is used to indicate the access relationship between the application to be verified and the server corresponding to the bastion host identifier.

11. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the application testing method according to any one of claims 1 to 3 above; Or, causing the electronic device to execute the application testing method as described in claim 4 or 5 above; Alternatively, the electronic device is enabled to execute the application testing method as described in claim 6 or 7 above.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the application testing method according to any one of claims 1 to 3 above; Alternatively, the computer executable instruction is used to implement the application testing method as described in claim 4 or 5 above when executed by a processor; Alternatively, the computer executable instructions are used to implement the application testing method as described in claim 6 or 7 above when executed by a processor.

13. A computer program product, comprising a computer program, characterized in that The computer program is used to implement the application testing method according to any one of claims 1 to 3 when executed by a processor; Alternatively, the computer program is used to implement the application testing method as described in claim 4 or 5 above when executed by a processor; Alternatively, the computer program is used to implement the application testing method as described in claim 6 or 7 when executed by a processor.

Citation Information

Patent Citations

  • Method, device, and system for software test

    CN105260299A