End-to-end test method and device, electronic equipment and storage medium
By using an end-to-end testing approach, the test environment is automatically updated and proxy addresses are generated, solving the problem of repetitive testing personnel input in existing technologies, realizing test automation and intelligence, and improving testing efficiency and accuracy.
Patent Information
- Application Number
- CN202411251969.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-11-22
AI Technical Summary
In existing technologies, delivery projects for R&D service sides require manual QA testing, especially for front-end and back-end modification projects, which leads to repetitive input from testers and low efficiency.
This paper provides an end-to-end testing method that obtains the server-side business to be tested, uses an end-to-end identification strategy to determine whether it is suitable for client-side testing, automatically updates the test environment and generates proxy addresses, and simulates real user behavior and network conditions for testing.
It has achieved automated and intelligent testing, reduced the manpower required on the server side, ensured the continuous synchronization of the testing environment and the accuracy of data, improved the adaptability and flexibility of testing, provided in-depth insights into business performance, and enabled the timely discovery and fix of potential problems.
Smart Images

Figure CN119003370A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, specifically to the field of testing technology, and in particular to an end-to-end testing method, device, electronic device and storage medium. Background Art
[0002] Currently, for the delivery projects of the production and research service end, projects that are not self-tested generally require manual QA (Quality Assurance) testing, especially many of which involve changes to the front-end and back-end. When testing, the commonly used testing method is: since the delivery modes of each end are independent of each other, the testers on both ends conduct single module tests respectively, and then for projects involving joint debugging, both parties conduct joint debugging tests after the single module tests are completed. This method requires repeated input of personnel. Summary of the invention
[0003] The present disclosure provides an end-to-end testing method, device, electronic device and storage medium.
[0004] According to one aspect of the present disclosure, an end-to-end testing method is provided, the method comprising:
[0005] Get the service to be tested on the server side;
[0006] Determining whether the service to be tested satisfies the end-to-end test mode according to the end-to-end identification strategy;
[0007] If the service to be tested satisfies the end-to-end test mode, when the test case in the service to be tested changes, the test environment is updated and a proxy address corresponding to the updated test environment is generated;
[0008] The service to be tested is tested according to the proxy address to obtain a test result.
[0009] According to another aspect of the present disclosure, there is provided an end-to-end testing device, comprising:
[0010] The acquisition module is used to obtain the service to be tested on the server side;
[0011] A judgment module, used to judge whether the service to be tested meets the end-to-end test mode according to the end-to-end identification strategy;
[0012] An updating module, configured to update the test environment and generate a proxy address corresponding to the updated test environment when the test case in the service to be tested changes if the service to be tested satisfies the end-to-end test mode;
[0013] The testing module is used to test the service to be tested according to the proxy address to obtain a test result.
[0014] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any method in any of the above technical solutions.
[0018] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any one of the methods described in the above technical solutions.
[0019] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program implements any one of the methods described in the above technical solutions when executed by a processor.
[0020] The present disclosure provides an end-to-end test method, device, equipment and storage medium. The present disclosure obtains the service to be tested on the server first, and then uses the end-to-end identification strategy to evaluate the service to be tested, and intelligently determines whether it is suitable to place the test of the server on the client. When the service to be tested adapts to the end-to-end test mode, the system can respond to the change of the test case, automatically update the test environment and generate a proxy address, which not only ensures the continuous synchronization of the test environment and the accuracy of the test data, but also enhances the adaptability and flexibility of the test. Finally, the proxy address is used for testing to simulate real user behavior and network conditions to obtain key test results, which helps to gain in-depth insight into business performance and timely discover and fix potential problems. It can be seen that this test method determines whether the service to be tested on the server meets the judgment of the end-to-end test mode. If it does, the test on the server is placed on the client for execution. This process can release the manpower of the server, thereby saving manpower investment, realizing test automation and intelligence, and improving the overall test throughput.
[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0023] Figure 1is a schematic diagram of the steps of the end-to-end testing method in an embodiment of the present disclosure;
[0024] Figure 2 It is a schematic diagram of the overall process of the end-to-end testing method in the embodiment of the present disclosure;
[0025] Figure 3 A principle block diagram of an end-to-end test device in an embodiment of the present disclosure;
[0026] Figure 4 It is a block diagram of an electronic device used to implement the end-to-end testing method of an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure 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 disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0028] In order to solve the above technical problems, the present disclosure provides an end-to-end testing method. Figure 1 As shown, Figure 1 : is a schematic diagram of the steps of an end-to-end testing method in an embodiment of the present disclosure, the method comprising:
[0029] Step S101, obtaining the service to be tested on the server side.
[0030] Specifically, obtaining the service to be tested on the server side means that during the software testing process, the test team obtains the service modules or functions to be tested from the server side through automated tools or manual methods. The server side usually refers to the backend part of the software architecture, which is responsible for processing tasks such as business logic, database operations, and data management. In this process, the test team first identifies and determines the scope of business functions that need to be tested on the server side, and then extracts the relevant business logic code, configuration files, and dependent resources from the server side to ensure that the test environment can accurately reflect the business behavior of the production environment. This step is the premise of end-to-end testing, which ensures the accuracy and effectiveness of the test and lays the foundation for subsequent automated testing and performance evaluation. It can be seen that by obtaining the service to be tested on the server side, the accuracy and comprehensiveness of the test can be ensured, so that the test team can focus resources and energy on in-depth verification of key functions in a targeted manner.
[0031] Step S102: determining whether the service to be tested satisfies the end-to-end test mode according to the end-to-end identification strategy.
[0032] Specifically, after obtaining the service to be tested on the server side, it is necessary to determine whether the service to be tested meets the end-to-end test mode. Among them, judging whether the service to be tested meets the end-to-end test mode according to the end-to-end identification strategy means that in the software testing process, specific strategies and standards are used to evaluate whether a specific business process or function is suitable for end-to-end testing. End-to-end testing is a testing method that covers the complete business process from the user interface to the back-end service, which ensures that every link of the entire application from the beginning to the end can work together and meet business needs. In this process, the testing team first defines the standards and conditions for end-to-end testing, such as the complexity of the business, the number of external systems it depends on, and the importance of the business to users. Then, they apply these standards to the service to be tested, and determine whether the business process meets the requirements of end-to-end testing through automated tools or manual analysis. If the business meets the conditions, it will be included in the scope of end-to-end testing, which usually involves designing and executing a series of test cases to verify the correctness and performance of the entire business process. This process helps to ensure the comprehensiveness and effectiveness of the test, while optimizing the use of test resources and improving the quality of software delivery.
[0033] In this way, through end-to-end judgment, business processes suitable for comprehensive testing can be accurately screened out to ensure that key business scenarios are fully verified, thereby improving the overall quality of the software and user experience.
[0034] Step S103: If the service to be tested satisfies the end-to-end test mode, when the test case in the service to be tested changes, the test environment is updated and a proxy address corresponding to the updated test environment is generated.
[0035] Specifically, when the business to be tested meets the requirements of the end-to-end test mode, it means that the business process will run from the user interface all the way to the backend service. In this case, any changes to the test case may affect the configuration of the test environment, so the test environment needs to be updated accordingly. This process involves automated tools monitoring changes in test cases, and once changes are detected, the tool automatically triggers the update process of the test environment. In this way, the test team can use the latest test environment and proxy address to perform tests, ensuring the accuracy and effectiveness of the tests. This process improves the flexibility and responsiveness of the test, ensures that the test environment is always synchronized with the test requirements, and makes the test results more reliable.
[0036] Step S104: testing the service to be tested according to the proxy address to obtain a test result.
[0037] Specifically, in software testing, testing the service to be tested according to the proxy address to obtain test results refers to using a proxy server to simulate the actual service endpoint so that test cases can be executed in an isolated and controlled environment. The proxy address is the network identifier of the proxy server, which allows the test traffic to be routed through an intermediary so that requests and responses can be monitored, recorded, and modified. In the implementation process, the test team first configures the proxy server and sets the necessary rules to simulate different test scenarios, such as network delays, service failures, or data anomalies. Then, the test case is designed to send requests through this proxy address, and the proxy server processes these requests according to the preset rules and returns the corresponding simulated responses. During the test, all traffic passing through the proxy server will be recorded for subsequent analysis and verification. In this way, the test team can collect detailed test results about the service to be tested, including performance data, functional correctness, exception handling capabilities, etc., so as to ensure that the software can meet the predetermined quality and performance standards before actual deployment.
[0038] The present disclosure provides an end-to-end test method, device, equipment and storage medium. The present disclosure obtains the service to be tested on the server first, and then uses the end-to-end identification strategy to evaluate the service to be tested, and intelligently determines whether it is suitable to place the test of the server on the client. When the service to be tested adapts to the end-to-end test mode, the system can respond to the change of the test case, automatically update the test environment and generate a proxy address, which not only ensures the continuous synchronization of the test environment and the accuracy of the test data, but also enhances the adaptability and flexibility of the test. Finally, the proxy address is used for testing to simulate real user behavior and network conditions to obtain key test results, which helps to gain in-depth insight into business performance and timely discover and fix potential problems. It can be seen that this test method determines whether the service to be tested on the server meets the judgment of the end-to-end test mode. If it does, the test on the server is placed on the client for execution. This process can release the manpower of the server, thereby saving manpower investment, realizing test automation and intelligence, and improving the overall test throughput.
[0039] In some optional embodiments, while judging whether the business to be tested meets the end-to-end test mode according to the end-to-end identification strategy, the server-side test environment can be built, that is, when the R&D personnel submit the test through the test pipeline, the environment construction strategy can be executed asynchronously, and the specific environment construction process is as follows: First, obtain the test order information from the data center test table, wherein the test order information includes code information, test R&D personnel, QA, etc. Then, according to the test order title keyword matching, the test order product line direction, QA, test code module, and non-autonomous test, it is determined whether the environment needs to be built. Traverse the code module information in the test order to determine which topology module environments need to be built, which environment modules to use, and which sub-module codes need to be updated for each topology module. Next, format the data, request the interface for building the environment, and write the environment-related information and code information into the environment information table. Finally, poll the environment status. After the status is complete, call the corresponding business automation test case to perform an environmental self-check. If the self-check fails, re-execute the above steps.
[0040] In some optional embodiments, when the test cases in the business to be tested change, the built environment needs to be updated, and the method used to update the environment is: when the pipeline senses the test code branch change, query the test submission table according to the code branch information to obtain the test submission identifier, and query the environment information table according to the test submission identifier to obtain the environment identifier. Since multiple environments may be built, it is necessary to traverse the built environment. Then, request the environment query interface to obtain the template and environment instance identifier used by the environment to be updated. Traverse the code module information in the test submission form, query the data center identification code submission table according to the module name and branch name, and obtain the latest unique identifier of each module. Then, format the data, request to update the environment interface, obtain the corresponding module compilation output, update the unique identifier and compilation output of each module in the environment table, and send a message notification.
[0041] In some optional embodiments, judging whether the service to be tested satisfies the end-to-end test mode according to the end-to-end identification strategy includes:
[0042] If the service to be tested belongs to the service in the specified requirement document, then determining whether the specified requirement document contains the test service related to the client;
[0043] If the specified requirement document contains a test service related to the client, determine whether the test service related to the client and the service to be tested on the server belong to the same sub-service;
[0044] If the test service related to the client and the service to be tested on the server belong to the same sub-service, the end-to-end test mode is met.
[0045] Specifically, the end-to-end identification strategy is used to determine whether a specific business to be tested is suitable for end-to-end testing. In the process of making the judgment, the first step is to check whether the business to be tested is listed in the specified requirements document, which is a document that describes the user requirements and functions of the software system in detail. If the business is indeed specified in the document, the next step is to verify whether these requirements involve the client - that is, the interface or application part that the user interacts directly with. Once it is confirmed that the requirements document contains client-related test businesses, the strategy will further evaluate whether these client-related test businesses belong to the same sub-business as the business to be tested on the server side. This means that it will check whether the business processes on the client and server sides are closely connected to form a coherent and complete business operation. If these conditions are met, that is, the business processes on the client and server sides are consistent, then the business to be tested is considered to be in line with the end-to-end testing mode. The implementation of this strategy usually relies on a combination of automated tools and manual analysis to ensure the accuracy and comprehensiveness of the test, thereby improving the efficiency and quality of software testing.
[0046] In this way, by first confirming whether the business is included in the specified requirements document, then further analyzing whether these requirements contain client-related test business, and finally verifying whether the client and server businesses constitute the same sub-business, this coherent evaluation process helps to accurately identify those business scenarios that need to be fully verified from the front end to the back end. This approach not only improves the clarity of test goals, but also ensures that the test covers the entire user interaction process, thereby more effectively discovering potential integration problems, optimizing resource allocation, and improving the quality of software delivery.
[0047] In some optional embodiments, testing the service to be tested according to the proxy address to obtain a test result includes:
[0048] Perform data simulation tasks on the service to be tested according to the proxy address to obtain simulated response data;
[0049] Collect test data associated with the business to be tested offline on a regular basis, and locate the problem based on the test data collected offline to obtain the problem location result;
[0050] The coverage is calculated based on the simulated response data and problem location results to obtain the test results.
[0051] Specifically, the proxy address acts as an intermediary server to intercept and process requests and responses sent from the client to the server. First, the test system uses the proxy address to perform data simulation (mock) tasks to generate simulated response data, which simulates the results that the real server may return in the production environment. Next, the system regularly collects test data related to the business to be tested offline, which may include log files, user behavior records, etc., and then uses this data to perform problem location analysis to identify problems or defects that may occur during the test. Finally, combined with the simulated response data and problem location results, the test system calculates the test coverage, which involves evaluating the coverage of the test case for the code, function or business process. The coverage calculation results provide a comprehensive view of the test results, helping the test team understand the comprehensiveness and effectiveness of the test, thereby ensuring software quality. This process not only improves the accuracy and efficiency of the test, but also allows the test to be carried out without affecting the actual production environment through simulation and offline analysis, providing a strong guarantee for the stable release of the software.
[0052] In this way, by performing data simulation tasks through proxy addresses, the test team is able to generate accurate simulated response data, which helps to test without relying on actual backend services, thereby speeding up testing and reducing testing costs. At the same time, the test data collected offline regularly provides a rich source of information for problem location, allowing the test team to more accurately identify and solve potential problems. In addition, combining the simulated response data and problem location results for coverage calculation not only ensures the comprehensiveness of the test, but also provides a quantitative evaluation of the test results, allowing the test team to objectively measure the test effect, optimize the test strategy, and ensure that the software meets the expected quality standards before release. It can be seen that by simulating real service responses and regularly collecting relevant test data, the flexibility and accuracy of the test are significantly improved.
[0053] In some optional embodiments, before performing a data simulation task on the service to be tested according to the proxy address to obtain simulated response data, the method further includes:
[0054] Create a data mock service and associate the mock service with the test environment.
[0055] Specifically, the step of creating a data simulation service and associating the simulation service with the test environment means that before actually performing the data simulation task, the test team first needs to establish a dedicated service, namely the data simulation service, to generate and provide simulated data responses. This service acts as an intermediary to simulate the behavior of the external system or server in order to reproduce the real interaction scenario in the test environment. After the creation is completed, the data simulation service will be configured and associated with the test environment, which means that the test environment has been set up to receive and process requests through this simulation service when executing the test, instead of directly interacting with the actual production service. The benefit of this is that the data and responses during the test process can be controlled and customized, making the test more flexible and controllable, while avoiding potential impact on the production environment. Once the simulation service is successfully associated with the test environment, the test team can use this setting to perform data simulation tasks, generate simulated response data, and then carry out subsequent testing activities such as functional verification, performance evaluation, and problem diagnosis. This process is a key component of implementing automated testing and continuous integration, which helps to improve the efficiency and quality of software testing.
[0056] In this way, by providing a highly controllable and configurable simulation environment, it not only enables the test team to generate customized simulation response data to meet specific test requirements, but also ensures the independence and consistency of the test environment, allowing for more flexible and extensive test scenario design without affecting the actual production service. In addition, this approach also improves the accuracy and reliability of testing, because it allows the test team to identify and fix problems in an isolated environment, while speeding up the test iteration, laying a solid foundation for high-quality software delivery.
[0057] In some optional embodiments, the method further comprises:
[0058] Construct abnormal environment test according to abnormal construction strategy and calculate coverage to obtain abnormal coverage;
[0059] Determine the test results based on the exception coverage.
[0060] Specifically, the method involves adopting an abnormal construction strategy to create and execute abnormal environment testing during software testing. Abnormal environment testing is a specific type of testing that aims to simulate various abnormal situations that a system may encounter, such as system failures, network delays, data errors, etc., by deliberately introducing errors or atypical usage scenarios. Through this kind of testing, the performance and stability of the system under abnormal conditions can be evaluated. In the implementation process, the testing team first defines the abnormal construction strategy to clarify which types of abnormalities need to be tested, and then builds corresponding test cases and environments to simulate these abnormal situations. After the test is executed, the coverage of the test case for potential abnormal scenarios is measured by coverage calculation, that is, the abnormal coverage. This indicator shows the range of abnormal situations that the test case can touch. Finally, the validity of the test results is evaluated based on the abnormal coverage to ensure that the software can handle various abnormal inputs or conditions correctly, thereby improving the robustness and reliability of the software.
[0061] In this way, by intentionally introducing various abnormal situations, such as input errors, system failures, or network anomalies, the performance of the software under atypical operating conditions is fully evaluated. By calculating the abnormal coverage, a quantitative indicator is provided to the test team to measure the comprehensiveness of the test. Determining the test results based on the abnormal coverage helps to identify potential weaknesses and risk points in the software, so as to make necessary optimizations and repairs before the product is released. It can be seen that the depth and breadth of software testing can be significantly improved by adopting the abnormal construction strategy to construct abnormal environment tests and calculate the abnormal coverage.
[0062] In some optional embodiments, constructing an abnormal environment test according to an abnormal construction strategy and performing coverage calculation to obtain abnormal coverage includes:
[0063] Constructing abnormal input parameters for pre-recorded test traffic to obtain abnormal data;
[0064] Testing abnormal data to obtain abnormal test results;
[0065] The coverage is calculated based on the abnormal test results to obtain the abnormal coverage.
[0066] Specifically, the abnormal construction strategy is a software testing method that involves deliberately designing abnormal or non-standard conditions to test the responsiveness of an application. The implementation process of this method includes several key steps: First, by analyzing pre-recorded test traffic, the test team constructs abnormal input parameters that simulate incorrect or unexpected user input to generate abnormal data. Then, this abnormal data is used to execute tests to verify the performance of the application in the face of these abnormal situations, generating abnormal test results. Finally, based on these test results, the test team calculates the abnormal coverage, that is, the percentage of abnormal scenarios covered by the test cases. The abnormal coverage provides a quantitative measure that shows the comprehensiveness of the test's ability to handle potential errors. With this method, problems that the application may encounter under abnormal conditions can be effectively identified and fixed, thereby enhancing its robustness and reliability.
[0067] In this way, by carefully designing abnormal input parameters and constructing abnormal data, this method ensures that the test can cover various edge cases and erroneous inputs that the application may encounter. Testing these abnormal data can not only verify the system's error handling mechanism, but also ensure the stability and reliability of the software when facing atypical operations. Finally, by calculating the coverage of abnormal test results, the test team can obtain a quantitative indicator to evaluate the comprehensiveness of the test, thereby identifying and fixing potential problems before the software is released, reducing the failure rate in the production environment, improving user satisfaction, and enhancing the overall quality of the software.
[0068] In some optional embodiments, the method further comprises:
[0069] Screening the test cases of the tested services to obtain screened test cases;
[0070] Generate automated test cases based on the screened test cases.
[0071] Specifically, the test team first evaluates and screens the completed test cases. This step involves reviewing the effectiveness, relevance, and coverage of each test case to determine whether they still meet the current test requirements and business goals. The purpose of the screening process is to streamline the test suite, remove redundant or outdated test cases, and ensure the efficiency and pertinence of the test suite. The screened test cases are those that are identified as effective and necessary, and they constitute the core part of the test suite. Next, based on these screened test cases, the test team will use automation tools and technologies to generate automated test cases. Automated test cases are to convert manual test scripts into a format that can be executed by the automated test framework. Doing so can increase the speed and frequency of test execution, reduce duplication of work, and allow the test team to perform regression testing more frequently to ensure the quality of software in the continuous development process. The entire process aims to improve the efficiency and quality of testing through automation while ensuring that testing activities are aligned with business needs.
[0072] In this way, the test cases of the tested business are first screened, and by eliminating no longer applicable or redundant test cases, the test suite is optimized to cover key business scenarios more accurately. Subsequently, the screened test cases are converted into automated test scripts, which not only improves the speed and frequency of test execution, but also makes the test process more stable and repeatable.
[0073] In some optional embodiments, see Figure 2 , Figure 2 This is a schematic diagram of the overall process of the end-to-end testing method in the embodiment of the present disclosure. The flowchart describes a testing process, covering the complete cycle from pre-test preparation, test execution, to post-test evaluation and feedback. The working principle is as follows:
[0074] Before testing: First, through the "end-to-end pre-setting" and "environment application" steps, the system automatically builds and updates the test environment and generates the corresponding proxy address. Then, the "test identification" and "manual confirmation" links ensure that the test requirements are accurately understood and confirmed.
[0075] Testing (automatic): During the automated testing phase, "replay request construction" and "abnormal testing" are used to verify the behavior of the application under various conditions. At the same time, "test traffic recording" and "real-time coverage collection" provide data support for test evaluation.
[0076] Testing (manual): During the manual testing phase, the mock tool is used to generate simulated data, and the tester executes specific test cases, which may involve the use of the location tool to assist in problem diagnosis.
[0077] After the test: After the test is completed, the "exit evaluation" is carried out, including steps such as "abnormal test coverage" and "case test case backfilling" to evaluate the completeness of the test and the quality of the software. Finally, the "test report" is generated to summarize the test results and the problems found.
[0078] The entire process combines automated and manual testing to ensure that the software product is fully verified before release, thereby improving the quality and reliability of the software. Each step in the flowchart records and updates the test status and results through database operations (such as insert, update, select), ensuring the traceability and measurability of the test process.
[0079] The following describes an apparatus embodiment of the present application, which can be used to execute the end-to-end test method in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the above-mentioned embodiment of the end-to-end test method of the present application.
[0080] The present disclosure also provides an end-to-end testing device 300, such as Figure 3 As shown, including:
[0081] The acquisition module 301 is used to acquire the service to be tested on the server side;
[0082] A judgment module 302 is used to judge whether the service to be tested meets the end-to-end test mode according to the end-to-end identification strategy;
[0083] An updating module 303 is used to update the test environment and generate a proxy address corresponding to the updated test environment when the test case in the service to be tested changes if the service to be tested satisfies the end-to-end test mode;
[0084] The testing module 304 is used to test the service to be tested according to the proxy address to obtain a test result.
[0085] In some optional embodiments, the determination module 302 determines whether the service to be tested satisfies the end-to-end test mode according to the end-to-end identification strategy, including:
[0086] If the service to be tested belongs to the service in the specified requirement document, then determining whether the specified requirement document contains the test service related to the client;
[0087] If the specified requirement document contains a test service related to the client, determine whether the test service related to the client and the service to be tested on the server belong to the same sub-service;
[0088] If the test service related to the client and the service to be tested on the server belong to the same sub-service, the end-to-end test mode is met.
[0089] In some optional embodiments, the testing module 304 tests the service to be tested according to the proxy address to obtain a test result, including:
[0090] Perform data simulation tasks on the service to be tested according to the proxy address to obtain simulated response data;
[0091] Collect test data associated with the business to be tested offline on a regular basis, and locate the problem based on the test data collected offline to obtain the problem location result;
[0092] The coverage is calculated based on the simulated response data and problem location results to obtain the test results.
[0093] In some optional embodiments, the test module 304 is further configured to create a data simulation service and associate the simulation service with the test environment before executing the data simulation task on the service to be tested according to the proxy address to obtain the simulated response data.
[0094] In some optional embodiments, the test module 304 is further used to construct an abnormal environment test according to the abnormal construction strategy and perform coverage calculation to obtain an abnormal coverage rate;
[0095] Determine the test results based on the exception coverage.
[0096] In some optional embodiments, the test module 304 constructs an abnormal environment test according to the abnormal construction strategy and performs coverage calculation to obtain abnormal coverage, including:
[0097] Constructing abnormal input parameters for pre-recorded test traffic to obtain abnormal data;
[0098] Testing abnormal data to obtain abnormal test results;
[0099] The coverage is calculated based on the abnormal test results to obtain the abnormal coverage.
[0100] In some optional embodiments, the testing module 304 screens the test cases of the tested services to obtain screened test cases;
[0101] Generate automated test cases based on the screened test cases.
[0102] In the technical solution disclosed herein, 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.
[0103] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0104] Figure 4 A schematic block diagram of an example electronic device 400 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0105] like Figure 4 As shown, the electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0106] A number of components in the device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0107] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 401 performs the various methods and processes described above, such as an end-to-end test method. For example, in some embodiments, the end-to-end test method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 400 via ROM 402 and / or communication unit 409. When the computer program is loaded into RAM 403 and executed by the computing unit 401, one or more steps of the applet distribution described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to perform the end-to-end test method in any other appropriate manner (e.g., by means of firmware).
[0108] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0109] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0110] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 foregoing.
[0111] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0112] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0113] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0114] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0115] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. An end-to-end testing method, the method include: Get the service to be tested on the server side; Determining whether the service to be tested meets the end-to-end test mode according to the end-to-end identification strategy; If the service to be tested satisfies the end-to-end test mode, when a test case in the service to be tested changes, the test environment is updated and a proxy address corresponding to the updated test environment is generated; The service to be tested is tested according to the proxy address to obtain a test result.
2. The method according to claim 1, in, The determining, according to the end-to-end identification strategy, whether the service to be tested satisfies the end-to-end test mode includes: If the service to be tested belongs to the service in the specified requirement document, determining whether the specified requirement document contains a test service related to the client; If the specified requirement document contains a test service related to the client, determining whether the test service related to the client and the service to be tested on the server belong to the same sub-service; If the test service related to the client and the service to be tested on the server belong to the same sub-service, the end-to-end test mode is satisfied.
3. The method according to claim 1, in, The testing the service to be tested according to the proxy address to obtain a test result includes: Performing a data simulation task on the service to be tested according to the proxy address to obtain simulated response data; Regularly collecting test data associated with the service to be tested offline, and locating the problem based on the test data collected offline to obtain a problem locating result; Coverage calculation is performed based on the simulated response data and the problem location result to obtain a test result.
4. The method according to claim 3, in, Before executing the data simulation task for the service to be tested according to the proxy address to obtain simulated response data, the method further includes: Create a data mock service and associate the mock service with the test environment.
5. The method according to any one of claims 1 to 4, in, The method further comprises: Construct abnormal environment test according to abnormal construction strategy and calculate coverage to obtain abnormal coverage; A test result is determined according to the abnormal coverage.
6. The method according to claim 5, in, The abnormal environment test is constructed according to the abnormal construction strategy and the coverage is calculated to obtain the abnormal coverage, including: Constructing abnormal input parameters for pre-recorded test traffic to obtain abnormal data; Testing the abnormal data to obtain an abnormal test result; The coverage rate is calculated according to the abnormal test result to obtain the abnormal coverage rate.
7. The method according to claim 5, in, The method further comprises: Screening the test cases of the tested services to obtain screened test cases; Generate automated test cases based on the screened test cases.
8. An end-to-end test device, include: The acquisition module is used to obtain the service to be tested on the server side; A judgment module, used to judge whether the service to be tested meets the end-to-end test mode according to the end-to-end identification strategy; An updating module, configured to update the test environment and generate a proxy address corresponding to the updated test environment if the service to be tested satisfies the end-to-end test mode and when a test case in the service to be tested changes; The testing module is used to test the service to be tested according to the proxy address to obtain a test result.
9. The device according to claim 8, in, The judging module judges whether the service to be tested satisfies the end-to-end test mode according to the end-to-end identification strategy, including: If the service to be tested belongs to the service in the specified requirement document, determining whether the specified requirement document contains a test service related to the client; If the specified requirement document contains a test service related to the client, determining whether the test service related to the client and the service to be tested on the server belong to the same sub-service; If the test service related to the client and the service to be tested on the server belong to the same sub-service, the end-to-end test mode is satisfied.
10. The device according to claim 8, in, The testing module tests the service to be tested according to the proxy address to obtain a test result, including: Performing a data simulation task on the service to be tested according to the proxy address to obtain simulated response data; Regularly collecting test data associated with the service to be tested offline, and locating the problem based on the test data collected offline to obtain a problem locating result; Coverage calculation is performed based on the simulated response data and the problem location result to obtain a test result.
11. The device according to claim 10, in, The test module is further used to create a data simulation service and associate the simulation service with a test environment before executing a data simulation task on the service to be tested according to the proxy address and obtaining simulated response data.
12. The device according to any one of claims 8 to 11, in, The test module is also used to construct an abnormal environment test according to the abnormal construction strategy and perform coverage calculation to obtain the abnormal coverage; A test result is determined according to the abnormal coverage.
13. The device according to claim 12, in, The test module constructs an abnormal environment test according to the abnormal construction strategy and performs coverage calculation to obtain the abnormal coverage, including: Constructing abnormal input parameters for pre-recorded test traffic to obtain abnormal data; Testing the abnormal data to obtain an abnormal test result; The coverage rate is calculated according to the abnormal test result to obtain the abnormal coverage rate.
14. The device according to claim 12, in, The testing module screens the test cases of the tested services to obtain screened test cases; Generate automated test cases based on the screened test cases.
15. An electronic device, include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.
16. A non-transitory computer-readable storage medium storing computer instructions, in, The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.
17. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.
