Software online testing method and device and computer readable storage medium
By adding a second node outside the system to deploy the new version of the program and filtering and diverting test requests, the problem of business requests not being able to respond in a timely manner due to abnormalities in the new version of the program was solved, ensuring system performance and user experience.
Patent Information
- Application Number
- CN202510763383.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-10-03
AI Technical Summary
In existing technologies, when software is updated, business requests caused by anomalies in the new version of the program cannot be responded to in a timely manner or may become stuck, requiring a long rollback and affecting system performance.
A new version of the program is deployed on a new node outside the system. Online business requests are screened and some test requests are diverted to the second node for processing to detect operational risks of the new version of the program.
When the new version of the program malfunctions, the system can still process all business requests through the old version of the program, avoiding request congestion and stalls, improving testing efficiency and reducing user impact.
Smart Images

Figure CN120743751A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of software testing, and in particular to an online software testing method, device, and computer-readable storage medium. Background Art
[0002] In related technologies, canary releases can be used to determine if there are any issues with the new version of a software update. The canary method involves using a small trial to identify potential issues in advance and avoid the risks of a full release.
[0003] However, the related art typically involves updating the program on some nodes running the old version to the new version. This approach takes a long time to roll back the new version to the old version if an anomaly is detected in the new version. This can result in service requests not being responded to promptly or experiencing lags and requiring extended wait times. Summary of the Invention
[0004] To overcome the problems existing in the related art, the present disclosure provides a software online testing method, apparatus, device and computer-readable storage medium, which can solve the above problems.
[0005] According to a first aspect of an embodiment of the present disclosure, a method for online testing of software is provided, which is applied to a software testing system, wherein an old version of a target software is deployed on a first node managed by the system, and the method comprises: creating a second node different from the first node, and deploying a new version of the target software on the second node; screening some test requests from all online business requests for the target software, and diverting them to the second node to be processed by the new version of the program; and detecting the operation risk of the new version of the program based on how the new version of the program handles the test requests.
[0006] According to a second aspect of an embodiment of the present disclosure, there is provided an online testing device for software, which is applied to a software testing system, wherein an old version of a target software is deployed on a first node managed by the system, and the device comprises: a deployment unit, configured to create a second node different from the first node, and deploy a new version of the target software on the second node; a diversion unit, configured to filter some test requests from all online business requests for the target software, and divert them to the second node to be processed by the new version of the program; and a detection unit, configured to detect the operation risk of the new version of the program based on the processing of the test request by the new version of the program.
[0007] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor and a memory; the memory is used to store a computer program; and the processor is used to execute the online testing method of software as described in the first aspect by calling the computer program.
[0008] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the online testing method for software as described in the first aspect is implemented.
[0009] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the method as described in the first aspect is implemented.
[0010] The technical solutions provided by the embodiments of the present disclosure may have the following beneficial effects:
[0011] The present disclosure can include a second node deployed with a new version of the program, separate from the first node deployed with the old version. All online service requests for the target software can be processed by the old version of the program on the first node. In the present disclosure, some test requests can be filtered out from these total online service requests and diverted to the second node for testing the new version of the program.
[0012] Because software testing systems can dynamically adjust the number of nodes based on the volume of business requests, the related art involves updating the old version of the program in the first node to the new version. This inevitably increases the business pressure on the entire system when the new version encounters an exception and needs to be rolled back. However, the disclosed solution adds a second node in addition to the first node and deploys the new version. This allows the old version of the program in the first node to continue processing all online business requests even when the new version encounters an exception and needs to be rolled back. Therefore, the second node can be directly taken offline, effectively avoiding abnormal situations such as request congestion and application lag, thus saving users from long waits.
[0013] For example, the system determines that 10 nodes are needed to process business requests based on the traffic of the current business request. In the related art, if a new version of the program is to be tested, 9 of the 10 nodes are old version programs and 1 is the new version program to be tested. In the case of needing to roll back the new version, the node corresponding to the new version program needs to be rolled back to the old version program, which takes a long time. During the rollback process, only 9 nodes are left to process business requests, which may cause jams, and some business requests may need to wait for a long time before being responded to. Based on the method disclosed in the present invention, these 10 nodes are all deployed with the old version program, and the newly added 11th node is deployed with the new version program to be tested. If the test process finds that the new version program has an abnormality, the business request can be processed only by the 10 nodes of the old version program, and the traffic allocated to the 11th node can be closed, thereby avoiding problems such as business request congestion and jams caused by the long rollback time.
[0014] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] 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.
[0016] Figure 1 It is a schematic flow chart of a method for online testing of software according to an exemplary embodiment of the present disclosure.
[0017] Figure 2 It is a schematic flow chart of a method for online testing of software according to an exemplary embodiment of the present disclosure.
[0018] Figure 3 It is a schematic diagram of a method for generating a user portrait according to an exemplary embodiment of the present disclosure.
[0019] Figure 4 The figure is a block diagram of an online testing device for software according to an exemplary embodiment of the present disclosure.
[0020] Figure 5 The figure is a schematic block diagram of an online testing device for software according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0021] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0022] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0023] It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining."
[0024] In order to solve the above technical problems, the present disclosure proposes an online testing method for software.
[0025] Figure 1 This is a schematic flow chart of an online software testing method according to an embodiment of the present disclosure, which can be executed by a software testing system. An old version of the target software is deployed on a first node managed by the software testing system.
[0026] like Figure 1 As shown, the online testing method of the software includes:
[0027] In step S101, a second node different from the first node is newly created, and a new version of the target software is deployed on the second node;
[0028] In step S102, some test requests are filtered from all online business requests for the target software, and are diverted to the second node to be processed by the new version program;
[0029] In step S103, the operation risk of the new version of the program is detected based on the processing of the test request by the new version of the program.
[0030] In some embodiments, an old version of the target software is deployed on the first node managed by the software testing system.
[0031] The system can manage at least one first node, on which an old version of the program is deployed. The system can dispatch an online service request for the target software to the first node, so that the old version of the program on the first node responds to the online service request.
[0032] In some embodiments, the number of first nodes can be adjusted dynamically.
[0033] The system can determine the number of first nodes based on the traffic of current online business requests, and the traffic of online business requests matches the number of first nodes to avoid waste of resources due to too many first nodes, and avoid too few first nodes to process online business requests.
[0034] In some embodiments, the new version of the program updates at least one function in the old version of the program.
[0035] The new version of the program may update at least one target function in the old version of the program, and the update may include adjustment, addition, and deletion.
[0036] In some embodiments, a second node different from the first node is newly created, and a new version of the target software is deployed on the second node.
[0037] When a new version of the target software needs to be tested, a second node can be newly created based on the first node where the old version of the program is deployed, and the new version of the program can be deployed on the second node.
[0038] Deploying the new version of the program on the newly built second node can ensure that the resources of the first node where the old version of the program is deployed are sufficient to handle all online business requests, thereby ensuring that when an exception occurs in the new version of the program and the second node cannot complete the corresponding processing task, all online business requests can be responded to by relying solely on the old version of the program deployed on the first node.
[0039] In some embodiments, some test requests are filtered from all online business requests for the target software and are diverted to the second node to be processed by the new version program.
[0040] When users use the target software, they generate online service requests. These online service requests are processed by nodes managed by the system. These online service requests include requests to invoke target functions updated in the new version of the software. These service requests are test requests used to test the target functions. Some of these test requests can be diverted to a second node, where the new version of the software deployed on the second node processes these test requests using the updated target functions.
[0041] Determining the test request before diverting it can avoid the situation where some online business requests cannot trigger the target functions that need to be tested in the new version of the program after random diversion, thereby resulting in low testing efficiency.
[0042] By diverting some test requests to the second node and using only some test requests for testing, it can be ensured that the other part of the test requests can be processed by the old version of the program, thereby avoiding the abnormal processing of a large number of test requests due to abnormalities in the new version of the program, and ensuring that some users' requests can be processed normally.
[0043] In some embodiments, the target software may respond to an online service request and perform processing based on the generated online service request.
[0044] It should be noted that a user-initiated online service request for the target software can be a request to use the target software. Once the online service request is determined to be processed by any node, the user can access the target software deployed on that node and trigger a request for the target software's functions.
[0045] For example, a user needs to use target software to conduct business and generates an online business request. This online business request is processed by node A, and the user is diverted to node A. Node A has the target software deployed on it, and the user can trigger different software functions for the target software on node A.
[0046] Therefore, an online service request may correspond to a user's access request. After the user's access request is diverted, the user may use the target software on the assigned node and trigger the software function on the node.
[0047] The software testing system can distribute the user's access traffic, and after the user accesses the target software on the node, he can generate a business request for any function in the target software.
[0048] In some embodiments, the operational risk of the new version of the program is detected based on how the new version of the program handles the test request.
[0049] After the test request is diverted to the second node, it is processed by the new version of the program. The test request may trigger the target function updated by the new version of the program, or it may not trigger the target function but trigger the original function. Therefore, the processing of the test request by the new version of the program can include the response of the target function and the response of the remaining functions after the target function is updated.
[0050] The processing status can include various indicators, such as response time, processing results, processing success rate, etc. Based on the processing status, the operation risk of the new version of the program can be determined.
[0051] Operational risks may include functional failure to respond, privacy issues, slow response speed, etc.
[0052] The online software testing method proposed in the present disclosure is different from the canary release method in the related art. A second node is newly created in addition to the first node that has been maintained by the system for deploying the new version of the program. In addition, by screening online business requests, test requests with a high probability of triggering the target function to be tested in the new version of the program are screened out, and some of the screened test requests are diverted to the second node to determine the operation risk of the new version of the program based on how the new version of the program on the second node handles the test requests.
[0053] Creating a new second node to deploy the new version of the program, rather than updating part of the old version of the program deployed in the original first node to the new version of the program, can ensure the overall system's processing performance for online business requests. When the new version of the program is abnormal and cannot process the online business requests, the first node alone can also process all online business requests; screening test requests and then diverting them, compared to random diversion, can make the test requests diverted to the second node more likely to trigger the target function, thereby improving testing efficiency; diverting part of the screened test requests can reduce the impact on users when the new version of the program is abnormal and cannot process the test requests, and ensure that some test requests can be processed normally based on the old version of the program.
[0054] Figure 2 It is a schematic flow chart of an online testing method for software according to an embodiment of the present disclosure.
[0055] like Figure 2 As shown, in some embodiments, the method further includes:
[0056] In step S201, when it is determined that the new version program is abnormal, the portion of test requests is stopped from being diverted to the second node, so that the old version program of the first node processes all online service requests for the target software.
[0057] If it is determined that the new version of the program is abnormal, the traffic switch of the second node can be turned off to stop diverting some test requests to the second node, and all online business requests (including test requests) are diverted to the first node to be processed by the old version of the program deployed in the first node.
[0058] In related technologies, after determining that a new version of a program is abnormal, it is necessary to roll it back to the old version before continuing to process the business. During this process, test requests assigned to the new version of the program must wait for a period of time until the rollback is complete before they can continue to be processed; or test requests assigned to the new version of the program must be reallocated to other old versions of the program. However, due to the dynamic number of nodes, the node where the new version of the program is deployed cannot be used after the rollback, which will inevitably increase the pressure on the remaining nodes, and may cause lag and congestion.
[0059] In this embodiment, the new version of the program is deployed on the second node. Therefore, when it is determined that the new version of the program is abnormal, the diversion to the second node can be stopped to avoid business processing by the second node. In this process, the test request that has not been diverted to the second node will be diverted to the first node again, and the test request that is already waiting for processing at the second node will be switched from the second node to the first node. Since the old version of the program deployed on the first node is sufficient to support all online business requests, directly deactivating the second node can achieve rapid switching without rolling back the new version of the program on the second node to the old version of the program, and then processing business requests based on the rolled-back old version of the program. The switching speed is fast and has little impact on the user experience.
[0060] In some embodiments, in step S202, if it is determined that the new version of the program is abnormal, a prompt is issued to the technician.
[0061] A reminder can be sent to the technicians via email or alarm sound to ensure that the technicians can respond quickly, notifying the technicians that there is an abnormality in the new version of the program and it has been disabled.
[0062] In some embodiments, the detection of the operational risk of the new version of the program based on the processing of the test request by the new version of the program includes: determining an abnormality indicator generated by the second node processing the test request, and determining that the new version of the program is abnormal when the abnormality indicator is greater than a threshold; and / or determining a system log of the processing of the test request by the second node, and determining that the new version of the program is abnormal when an abnormality indicator appears in the system log.
[0063] For a new version of a program, thresholds for abnormal indicators can be determined and defined. For example, abnormal indicators can include but are not limited to interface response time, response success rate, error rate, etc.
[0064] After determining the thresholds for abnormal indicators, the system can deploy distributed monitoring probes to collect data on the processing of online business requests by the new version of the program, thereby obtaining various operational data for the target software. If any or at least one abnormal indicator is greater than the threshold, the new version of the program is considered abnormal.
[0065] For example, an abnormality indicator could be the number of errors reported during processing. When the cumulative number of errors exceeds a threshold (e.g., 10), the new version of the program is considered abnormal. An abnormality indicator could be response time. When the number of times the response time exceeds a certain duration (e.g., 3 seconds) exceeds a threshold (e.g., 10), the new version of the program is considered abnormal.
[0066] In addition to using anomaly indicators to determine whether a new version of the program is abnormal, system logs can also be used or combined with other methods. After determining the system logs generated by the second node processing the test request, predefined anomaly indicators in the system logs can be identified. If an anomaly indicator is identified in the system logs, or the number or frequency of identified anomaly indicators exceeds a threshold, the new version of the program can be determined to be abnormal.
[0067] In some embodiments, screening the test request includes: determining a target user whose corresponding user description information belongs to at least one preset information dimension; screening a target online service request initiated by the target user from all online service requests, and determining the test request based on the target online service request.
[0068] After a user initiates an online service request, the system can determine the corresponding user profile based on the request. This user profile can include at least one information dimension, such as geographic location, device type, access frequency, commonly used functions, and preferences. Users with different information dimensions have different usage habits for the target software. Therefore, based on the information dimensions in the user profile, the target user who is more likely to trigger the target function to be tested in the target software can be identified.
[0069] Based on the target functionality of the new version of the program to be tested, target users corresponding to at least one preset information dimension can be determined. The at least one preset information dimension can be a different type of information dimension, such as geographic location and device type, or multiple information dimensions of the same type, such as multiple geographic locations.
[0070] For example, if the target function to be tested in the target software is a newly added remote control window lift function, the target users of this target function can be set to be users whose geographical location is Hangzhou or Shanghai, whose device type is Android, and who do not like to use the air conditioner in the car.
[0071] It should be noted that the target users may include users with a relatively high probability of triggering the target function (for example, users who do not like to use the air conditioning function in the car), or users in a specific test range (for example, users in Hangzhou, Shanghai, and Android models).
[0072] After determining the target users of the new version of the program, target online business requests whose user descriptions match the target users can be screened from all online business requests based on the user descriptions, and these target online business requests can be used as test requests.
[0073] In some embodiments, the information dimension in the user description information may be determined based on the user's online service requests in the old version of the program and the user device.
[0074] The system can conduct targeted collection based on the online user's device and various user behavior data to obtain information dimensions.
[0075] For example, the user uses a specific functional module, the geographical location of the user's device, the device model, the type of vehicle the user corresponds to, user information, etc. Each type of data can correspond to an information dimension, such as geographical location, device model, etc.
[0076] Technicians can add new data types that need to be collected based on the testing requirements of the new version of the program, and determine new information dimensions based on the newly added data types.
[0077] In some embodiments, user profiles can be constructed through big data technology and machine learning algorithms.
[0078] Figure 3 This is a schematic diagram of a method for generating a user portrait according to an embodiment of the present disclosure.
[0079] like Figure 3 As shown in the figure, based on the collected user description information, valuable information can be extracted from logs and tracking data to build a detailed user profile for each user. For example, web server logs, mobile application tracking event tracking, user interaction records, etc.
[0080] By extracting user behavioral characteristics and using natural language processing, image recognition and other technologies to parse unstructured data, useful features are extracted, and then machine learning algorithms such as cluster analysis and decision trees are used to build user portraits.
[0081] In some embodiments, test requests may be filtered out based on the similarity between the user profile and the target user.
[0082] Based on the target functions to be tested in the new version of the program, technicians can identify target users. Using an algorithm, they can compare the similarity between the target users and various user profiles, selecting users with similarity above a certain threshold as testers for the new version of the program. Online service requests from these users are then identified as test requests.
[0083] In some embodiments, the method further includes: when the target function of the new version program is triggered normally, increasing the number of the preset information dimensions.
[0084] By gradually increasing the number of preset information dimensions, a wider range of users can participate in the testing of the new version of the program, thereby verifying the reliability of the new version of the program in various scenarios.
[0085] For example, when a new version of the program is just being tested, the preset information dimension may only include users of a certain car model. The users of this car model are diverted to the second node and the business requests are processed by the new version of the program. When all the business requests that trigger the target function perform normally within a certain period of time (for example, within 30 minutes), it indicates that the target function is normal for this car model. In this case, the number of preset information dimensions can be increased, and two other car models can be added to the preset information dimensions, so that the test requests of the other two car models are also processed by the new version of the program. And so on, until users of all car models are gradually added to test the new version of the program.
[0086] This approach not only controls the risk of releasing a new version of the program, avoiding excessive impact when an exception occurs, but also enables gradual testing so that all users can gradually participate in the trial of the new version of the program.
[0087] In some embodiments, determining the test request based on the target online service request includes: using a portion of the target online service request with a preset proportion as the test request.
[0088] For example, the preset ratio may be set to 10%.
[0089] For the same batch of online service requests, the test requests in the online service requests can be first screened out, and then a preset proportion of the test requests can be diverted to the second node for testing. The preset proportion of the test requests can be rounded up.
[0090] By setting a preset ratio, you can randomly select a portion of the test requests for trial use of the new version of the program while ensuring that the test request has a high probability of triggering the target function, and ensure that the other portion can process business requests normally based on the old version of the program.
[0091] In some embodiments, the method further includes: increasing the preset ratio when the triggering frequency of the target function of the new version of the program is lower than a frequency threshold; and / or reducing the preset ratio when the number of abnormal triggering times of the target function of the new version of the program is less than a quantity threshold.
[0092] Technicians identify target users based on the target functionality of the new version of the program. While users who meet these criteria and are diverted to the second node have a higher probability of triggering the target functionality, this does not guarantee that the target functionality will be triggered. Therefore, if the target functionality is triggered infrequently, valid test data cannot be obtained, and operational risk cannot be determined based on the processing situation, dynamic adjustments can be made to the test requests diverted to the second node.
[0093] For example, when the triggering frequency of the target function of the new version of the program is lower than the frequency threshold, the preset ratio can be increased.
[0094] Specifically, based on user data collected by the system, it is discovered that users in Location A frequently operate their car windows. Therefore, the user with information dimension Location A is set as the target user, and a preset ratio is set to 10%. However, during processing, the second node discovers that the triggering frequency of the target function (e.g., remote control window lift) is low, making it difficult to determine the operational risk of the new version of the program based on the current data. In this case, the preset ratio can be increased (e.g., to 30%) to increase the probability of triggering the target function and obtain sufficient data to detect the operational risk of the new version of the program.
[0095] For example, when the number of times the target function of the new version of the program is triggered abnormally is less than a threshold value, the preset ratio is reduced.
[0096] Specifically, after the test request is diverted to the second node, it is found that a large number of target functions are triggered, but based on the log, it is found that the target function has probabilistic errors. It is temporarily impossible to determine whether the error is due to accidental factors, and the number of errors has not reached the threshold for determining that the new version of the program is abnormal. In this case, the preset ratio can be appropriately reduced (for example, a reduction of 5%). By reducing the number (and / or scope) of users participating in the test, the adverse effects of the error on users can be reduced, and the processing process of the new version of the program for business requests that trigger the target function can continue to be accumulated, so as to facilitate finding the exact cause of the error through the log.
[0097] In some embodiments, the preset ratio can be reduced to zero.
[0098] When the preset ratio is reduced to 0, it is equivalent to stopping the test request from being diverted to the second node.
[0099] In some embodiments, the processing status of the test request by the new version program obtained by the software testing system can be displayed on the screen in real time.
[0100] The system can uniformly output the acquired service performance data, service logs (system logs) and data collected by probes to the screen for visual display of these data. The intuitive dashboard interface can help technicians understand the second node's processing of business requests in real time.
[0101] In some embodiments, the system can keep the data and processing involved confidential.
[0102] Based on considerations of the security and privacy of user data, information involving user identity can be anonymized to prevent the leakage of sensitive data; in data transmission, SSL (Secure Sockets Layer) or TLS (Transport Layer Security) protocols can be used to ensure the security of data during transmission; the system can conduct internal audits regularly to ensure compliance with the latest privacy protection standards.
[0103] Corresponding to the embodiment of the online software testing method of the present disclosure, the present disclosure also provides an embodiment of a corresponding online software testing device.
[0104] See Figure 4 , Figure 4 FIG. 1 is a block diagram of an online testing device for software in one embodiment of the present disclosure. Figure 4 As shown, the apparatus is applied to a software testing system, where an old version of a target software program is deployed on a first node managed by the system, and includes:
[0105] The deployment unit 410 is configured to create a second node different from the first node and deploy the new version of the target software on the second node;
[0106] The diversion unit 420 is configured to filter some test requests from all online service requests for the target software and divert them to the second node to be processed by the new version program;
[0107] The detection unit 430 is configured to detect the running risk of the new version program based on the processing of the test request by the new version program.
[0108] In some embodiments, the apparatus further comprises a stopping unit configured to:
[0109] When it is determined that the new version program is abnormal, the portion of the test requests is stopped from being diverted to the second node, so that the old version program of the first node processes all online service requests for the target software.
[0110] In some embodiments, the detection unit 430 is specifically configured to:
[0111] Determine the abnormal index generated by the second node processing the test request, and if the abnormal index is greater than a threshold, determine that the new version of the program is abnormal; and / or determine the system log of the second node processing the test request, and if an abnormal identifier appears in the system log, determine that the new version of the program is abnormal.
[0112] In some embodiments, the diversion unit 420 is specifically configured to: determine that the corresponding user description information belongs to a target user of at least one preset information dimension; filter the target online service request initiated by the target user from all the online service requests, and determine the test request based on the target online service request.
[0113] In some embodiments, the apparatus further includes an adding unit configured to: increase the number of the preset information dimensions when the target function of the new version of the program is triggered normally.
[0114] In some embodiments, the diversion unit 420 is specifically configured to use a preset proportion of the target online service requests as the test requests.
[0115] In some embodiments, the device also includes an adjustment unit configured to: increase the preset ratio when the triggering frequency of the target function of the new version of the program is lower than a frequency threshold; and / or reduce the preset ratio when the number of triggering exceptions of the target function of the new version of the program is less than a quantity threshold.
[0116] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0117] An embodiment of the present disclosure further provides an electronic device, comprising: a processor and a memory; the memory is used to store a computer program; and the processor is used to execute the online testing method of software as described in any of the above embodiments by calling the computer program.
[0118] An embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the online testing method for software as described in any of the above embodiments is implemented.
[0119] An embodiment of the present disclosure further provides a computer program product, including a computer program, which implements the method described in any of the above embodiments when executed by a processor.
[0120] Figure 5 1 is a schematic block diagram of an online testing apparatus 500 for software according to an embodiment of the present disclosure. For example, apparatus 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0121] Reference Figure 5 , the apparatus 500 may include one or more of the following components: a processing component 502 , a memory 504 , a power component 506 , a multimedia component 508 , an audio component 510 , an input / output (I / O) interface 512 , a sensor component 514 , and a communication component 516 .
[0122] The processing component 502 generally controls the overall operation of the device 500, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the above-described online software testing method. In addition, the processing component 502 may include one or more modules to facilitate interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.
[0123] The memory 504 is configured to store various types of data to support operations on the device 500. Examples of such data include instructions for any application or method operating on the device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 504 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.
[0124] The power supply component 506 provides power to the various components of the device 500. The power supply component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 500.
[0125] The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the device 500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
[0126] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC), which is configured to receive external audio signals when the device 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 504 or transmitted via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.
[0127] The I / O interface 512 provides an interface between the processing component 502 and peripheral interface modules, such as a keyboard, a click wheel, buttons, etc. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.
[0128] The sensor assembly 514 includes one or more sensors for providing various aspects of the status assessment of the device 500. For example, the sensor assembly 514 can detect the open / closed state of the device 500, the relative positioning of components, such as the display and keypad of the device 500. The sensor assembly 514 can also detect changes in the position of the device 500 or a component of the device 500, the presence or absence of user contact with the device 500, the orientation or acceleration / deceleration of the device 500, and temperature changes of the device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 514 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0129] The communication component 516 is configured to facilitate wired or wireless communication between the apparatus 500 and other devices. The apparatus 500 can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G LTE, 5G NR, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0130] In an exemplary embodiment, the apparatus 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the above-mentioned online testing method for the software.
[0131] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is further provided, such as a memory 504 including instructions. The instructions can be executed by the processor 520 of the apparatus 500 to perform the above-mentioned online testing method of the software. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0132] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0133] 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 can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
[0134] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements that are inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a..." does not exclude the presence of other identical elements in the process, method, article or device that includes the element.
[0135] The above is a detailed introduction to the methods and devices provided in the embodiments of the present disclosure. Specific examples are used herein to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the methods and core ideas of the present disclosure. At the same time, for those skilled in the art, according to the ideas of the present disclosure, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present disclosure.
Claims
1. A software online testing method, characterized in that: Applied to a software testing system, where an old version of a target software program is deployed on a first node managed by the system, the method includes: Creating a second node different from the first node, and deploying a new version of the target software on the second node; Filtering some test requests from all online business requests for the target software and diverting them to the second node to be processed by the new version program; Based on the processing of the test request by the new version program, the operation risk of the new version program is detected.
2. The method according to claim 1, characterized in that The method further comprises: When it is determined that the new version program is abnormal, the portion of the test requests is stopped from being diverted to the second node, so that the old version program of the first node processes all online service requests for the target software.
3. The method according to claim 1, characterized in that The detecting the operation risk of the new version program based on the processing of the test request by the new version program includes: determining an abnormality indicator generated by the second node processing the test request, and determining that the new version program is abnormal if the abnormality indicator is greater than a threshold; and / or, A system log of the test request processed by the second node is determined, and if an abnormality mark appears in the system log, it is determined that the new version program is abnormal.
4. The method according to claim 1, wherein Screening the test request includes: Determining that the corresponding user description information belongs to a target user of at least one preset information dimension; The target online service request initiated by the target user is screened from all the online service requests, and the test request is determined based on the target online service request.
5. The method according to claim 4, characterized in that The method further comprises: When the target function of the new version program is triggered normally, the number of the preset information dimensions is increased.
6. The method according to claim 4, characterized in that The determining the test request based on the target online service request includes: A portion of the target online service requests with a preset proportion is used as the test request.
7. The method according to claim 6, characterized in that The method further comprises: When the triggering frequency of the target function of the new version of the program is lower than the frequency threshold, increasing the preset ratio; and / or, When the number of times the target function of the new version of the program is triggered abnormally is less than the quantity threshold, the preset ratio is reduced.
8. An electronic device, characterized in that: include: Processor, memory; The memory is used to store computer programs; The processor is configured to execute the online testing method for software according to any one of claims 1 to 7 by calling the computer program.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the online testing method for software according to any one of claims 1 to 7 is implemented.
10. A computer program product, characterized in that The invention comprises a computer program, which implements the method as described in any one of claims 1 to 7 when being executed by a processor.