CN114416596A - Application testing method and device, computer equipment and storage medium - Google Patents

Application testing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114416596A
CN114416596A CN202210207226.3A CN202210207226A CN114416596A CN 114416596 A CN114416596 A CN 114416596A CN 202210207226 A CN202210207226 A CN 202210207226A CN 114416596 A CN114416596 A CN 114416596A
Authority
CN
China
Prior art keywords
parameter
version application
old
application
new
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210207226.3A
Other languages
Chinese (zh)
Inventor
单辉
王宝玉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An E Wallet Electronic Commerce Co Ltd
Original Assignee
Ping An E Wallet Electronic Commerce Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An E Wallet Electronic Commerce Co Ltd filed Critical Ping An E Wallet Electronic Commerce Co Ltd
Priority to CN202210207226.3A priority Critical patent/CN114416596A/en
Publication of CN114416596A publication Critical patent/CN114416596A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Abstract

The invention discloses a method and a device for testing application, computer equipment and a storage medium, wherein the method comprises the following steps: receiving a verification instruction for verifying the new version application; acquiring the parameter input into the old version application, and extracting a target parameter from all the acquired parameters according to a preset sampling rule; acquiring a first parameter of the old version application after processing the target parameter of the old version application; inputting the target parameter into the new version application, and acquiring a second parameter obtained after the new version application processes the target parameter; replacing the old version application with the new version application when it is determined that the first parameter is consistent with the second parameter; the invention uses the real parameter to test the new version application, saves the test data resource and improves the test accuracy and the test efficiency.

Description

Application testing method and device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of cloud testing, in particular to a method and a device for testing application, computer equipment and a storage medium.
Background
After an application is on-line, developers need to continuously adjust and reconstruct the application and replace the old version application with the tested new version application, so that the running speed of the application is increased, and the running logic of the application is optimized, so that the purposes of saving server running resources and improving user experience are achieved. In the prior art, a large number of testers are needed to verify the reconstructed new version application, the testers need to simulate a large number of parameter input, perform feasibility and accuracy tests on the new version application, manually compare whether the running results of the new version application and the old version application are consistent or not, the verification efficiency is extremely low, and a large amount of human resources are wasted. Therefore, how to efficiently and accurately test the new version application becomes a technical problem to be solved urgently by technical personnel.
Disclosure of Invention
The invention aims to provide a method and a device for testing application, computer equipment and a storage medium.
According to one aspect of the present invention, there is provided a method for testing an application, applied to an application management background, the method including the steps of:
receiving a verification instruction for verifying the new version application; wherein the new version application is based on a reconstructed version of an old version application;
acquiring the parameter input into the old version application, and extracting a target parameter from all the acquired parameters according to a preset sampling rule;
acquiring a first parameter of the old version application after processing the target parameter of the old version application;
inputting the target parameter into the new version application, and acquiring a second parameter obtained after the new version application processes the target parameter;
replacing the old version application with the new version application when it is determined that the first parameter is consistent with the second parameter.
Optionally, the extracting the target parameter from all the obtained parameters according to a preset sampling rule specifically includes:
when the old version application only has one input interface, periodically taking the last received parameter of the input interface in each time interval as a target parameter according to a preset time interval; alternatively, the first and second electrodes may be,
when the old version application only has one input interface, taking the parameter of the input received as the parameter of the goal of entering the parameter of the old version; alternatively, the first and second electrodes may be,
when the old version is applied with a plurality of input interfaces, setting corresponding interval values for each input interface according to the parameter receiving frequency of each input interface, and taking the parameter sequence number of the parameter received by each input interface as the parameter of the corresponding interval value as the target parameter according to the interval values.
Optionally, the obtaining of the parameter input into the old version application and extracting the target parameter from all the obtained parameter input according to a preset sampling rule specifically include:
establishing connection between a user side and a load balancing server, and respectively establishing connection between the load balancing server and a plurality of processing servers corresponding to the old version application;
sending the sampling rule to the load balancing server, so that the load balancing server polls and extracts a target parameter from the parameter input by the user side according to the sampling rule, and sends the target parameter to a designated processing server in the plurality of processing servers;
the obtaining of the first parameter of the old version application after processing the target parameter of the entry specifically includes:
and acquiring a first parameter of the target parameter after the designated processing server processes the target parameter of the target parameter.
Optionally, when it is determined that the first parameter and the second parameter are consistent, replacing the old version application with the new version application, specifically including:
calculating the first parameter according to a preset hash algorithm to obtain a first hash value, and calculating the second parameter according to the hash algorithm to obtain a second hash value;
and judging whether the first hash value is the same as the second hash value, if so, replacing the old version application with the new version application, and if not, determining an abnormal new function module in the new version application according to each old function module in the old version application, wherein the abnormal new function module cannot realize the same function compared with the corresponding old function module in the old version application.
Optionally, the determining, according to each old function module in the old version application, an abnormal new function module in the new version application specifically includes:
analyzing parameter output parameters of all old functional modules in the old version application from a first running log of the old version application;
analyzing the parameter of each new function module in the new version application from the second running log of the new version application; wherein, each old function module in the old version application and each new function module in the new version application have a one-to-one correspondence relationship;
and traversing each new function module in the new version application in sequence, judging whether the parameter of the currently traversed new function module is the same as the parameter of the old function module with the corresponding relation, if so, continuing traversing, and if not, determining the currently traversed new function module as an abnormal new function module.
Optionally, the determining whether the parameter of the currently traversed new function module is the same as the parameter of the old function module having the corresponding relationship, if yes, continuing the traversal, and if not, determining the currently traversed new function module as the abnormal new function module specifically includes:
calculating the parameter of the new function module traversed currently according to a preset Hash algorithm to obtain a third Hash value, and calculating the parameter of the old function module with the corresponding relation according to the Hash algorithm to obtain a fourth Hash value;
and judging whether the third hash value is the same as the fourth hash value, if so, continuing traversal, and if not, determining the currently traversed new function module as an abnormal new function module.
Optionally, the replacing the old version application with the new version application specifically includes:
when a first parameter and a second parameter of the target parameter are consistent, recording as the number of times of one-time verification success;
and when the accumulated number of the extracted target parameter access parameters reaches a preset number, judging whether the ratio of the accumulated verification success times to the accumulated number reaches a preset success rate, if so, replacing the old version application with the new version application.
In order to achieve the above object, the present invention further provides a device for testing an application method, which is applied to an application management background, and the device specifically includes the following components:
the receiving module is used for receiving a verification instruction for verifying the new version application; wherein the new version application is based on a reconstructed version of an old version application;
the extraction module is used for acquiring the parameter input into the old version application and extracting a target parameter input from all the acquired parameter input according to a preset sampling rule;
the acquisition module is used for acquiring a first parameter after the old version application processes the target parameter;
the input module is used for inputting the target parameter into the new version application and acquiring a second parameter after the new version application processes the target parameter;
and the replacing module is used for replacing the old version application with the new version application when the first parameter is determined to be consistent with the second parameter.
In order to achieve the above object, the present invention further provides a computer device, which specifically includes: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above-described steps of the method of testing an application when executing the computer program.
In order to achieve the above object, the present invention also provides a computer storage medium having stored thereon a computer program which, when being executed by a processor, carries out the above-introduced steps of the method of testing an application.
The method, the device, the computer equipment and the storage medium for testing the application provided by the invention extract the target parameter from the parameter sent by the user terminal through the load balancing server, and comparing the first parameter output by the old version application with the second parameter output by the new version application to complete one-time verification, when the success rate of the parameter input of the new version application processing target reaches the preset success rate, the new version application can be used to replace the old version application to complete the version update, thereby solving the problem that the tester needs to simulate a large number of test parameters to test the new version application in the prior art, realizing the effects of flexibly verifying the functions of the new version application and saving data resources, and simultaneously, the logic of the test application cannot influence the old version application which is normally running, so that the verification cost can be saved, and the verification efficiency can be improved.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a schematic flow chart of an alternative method of testing an application provided by example one;
FIG. 2 is a schematic diagram of an alternative program module of the apparatus for testing applications provided in example two;
fig. 3 is a schematic diagram of an alternative hardware architecture of the computer device provided by the third example.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
The embodiment of the invention provides a method for testing application, which is applied to an application management background, and as shown in fig. 1, the method specifically comprises the following steps:
step S101: receiving a verification instruction for verifying the new version application; wherein the new version application is based on a reconstructed version of an old version application.
The verification instruction is an instruction sent by the application management background and used for verifying whether the application function of the new version is feasible or not.
Specifically, the functions of the new version application and the old version application are substantially consistent, the running speed of the new version application is higher, and the running effect is better. The new version application and the old version application both contain the same number of functional modules, and the functional modules with the corresponding relationship can realize the same function.
In this embodiment, the old version application is an application that is running normally before being reconfigured and optimized, and is used to receive and process the parameter sent by the user side. In order to accelerate the running speed of the old version application and optimize the processing logic, a developer needs to perform optimization upgrade on the old version application, namely, a code of the old version application is rewritten, and the optimized code is generated into a new version application. The existing manual testing method needs to generate a large amount of simulation data to improve the testing accuracy, and the testing method needs to consume a large amount of human resources and testing resources, so that the cost is high and the testing speed is slow.
Step S102: and acquiring the parameter input into the old version application, and extracting a target parameter from all the acquired parameters according to a preset sampling rule.
Specifically, the extracting of the target parameter from all the obtained parameters according to the preset sampling rule includes the following steps:
when the old version application only has one input interface, periodically taking the last received parameter of the input interface in each time interval as a target parameter according to a preset time interval; alternatively, the first and second electrodes may be,
when the old version application only has one input interface, taking the parameter of the input received as the parameter of the goal of entering the parameter of the old version; alternatively, the first and second electrodes may be,
when the old version is applied with a plurality of input interfaces, setting corresponding interval values for each input interface according to the parameter receiving frequency of each input interface, and taking the parameter sequence number of the parameter received by each input interface as the parameter of the corresponding interval value as the target parameter according to the interval values.
The sampling rules can be divided into timing sampling, quantitative sampling and hierarchical sampling, and hierarchical sampling is that the input parameters generated by the user side can be sent to the old version application through a plurality of input interfaces for processing, for example: in a shopping scene, a user at a user end can use a shopping cart to place an order to generate a parameter of entering the business, and sends the parameter to an old version application through an input interface corresponding to the shopping cart, or directly places an order through a mall to generate a parameter of entering the business, and sends the parameter to the old version application through an input interface corresponding to a mall. If the ratio of the users using the shopping cart for placing orders to the users using the mall for placing orders is 3:7, the input parameter receiving frequency of the input interface corresponding to the shopping cart is 30% and the input parameter receiving frequency of the input interface corresponding to the mall is 70% in one time period, so that the last received input parameter extracted from every 30 input parameters using the shopping cart for placing orders can be configured as a target input parameter, and the last received input parameter extracted from every 70 input parameters using the mall for placing orders can be configured as a target input parameter.
In this embodiment, the purpose of extracting the target parameter according to the sampling rule is to ensure that the target parameter is representative, so that the operation result of the new version application is more reliable and is close to a real scene. The developer can select a proper sampling rule for sampling according to the characteristics of the parameter generated by the user side, so that the verification comparability of the new version application and the old version application is improved as much as possible.
Further, the step S102 further includes the following steps:
step A1: and establishing connection between a user side and a load balancing server, and respectively establishing connection between the load balancing server and a plurality of processing servers corresponding to the old version application.
Step A2: and sending the sampling rule to the load balancing server, so that the load balancing server polls and extracts a target parameter from the parameter input by the user side according to the sampling rule, and sends the target parameter to a designated processing server in the plurality of processing servers.
In this embodiment, a designated processing server is set for the target parameter, and the designated processing server is used for processing the target parameter extracted by the load balancing server according to the sampling rule.
Specifically, the application management background sends a preset sampling rule to the load balancing server, the load balancing server intercepts the parameter of the user side sent to the old application version through a weighted polling algorithm, then performs polling sampling on the parameter of the user side entering the load balancing server according to the preset sampling rule, and distributes the extracted target parameter of the user side entering the load balancing server to a designated processing server corresponding to the old application version for processing.
Preferably, the load balancing server is an NGINX load balancing server.
Further, in a scenario that the load balancing server is not used, the step S102 further includes the following steps:
and adding an identifier for the target parameter and sending the target parameter added with the identifier to an old version application.
The Identifier is a UUID (universal Unique Identifier), is transmitted along with the target parameter in the process of processing the target parameter in the old version application, and is output together with the first parameter when the old version application outputs the first parameter.
Step S103: and acquiring a first parameter of the old version application after processing the target parameter of the access point.
Specifically, the step S103 includes:
and acquiring a first parameter of the target parameter after the designated processing server processes the target parameter of the target parameter.
The load balancing server can process the extracted target parameter input through the designated processing server, so that only the first parameter output by the designated processing server needs to be obtained, the parameter input is not required to be screened from all parameter output again, and the parameter obtaining efficiency is improved.
Further, in a scenario that a load balancing server is not used, the step S103 further includes the following steps:
and screening the parameter output by the old version application, wherein the parameter output by the old version application comprises the parameter with the same identification as the target parameter input by the old version application as a first parameter output by the old version application.
In this embodiment, two logics for obtaining the first parameter are provided, one of which is: acquiring a first parameter output by a designated processing server after the load balancing server sends the screened target parameter to the designated processing server; the second step is as follows: and screening out parameter output parameters with the same identification as the target parameter input parameters from all parameter output parameters output by the old version application as first parameter output parameters.
Step S104: and inputting the target parameter into the new version application, and acquiring a second parameter obtained after the new version application processes the target parameter.
Step S105: replacing the old version application with the new version application when it is determined that the first parameter is consistent with the second parameter.
Specifically, the step S105 includes the following steps:
step B1: and calculating the first parameter according to a preset hash algorithm to obtain a first hash value, and calculating the second parameter according to the hash algorithm to obtain a second hash value.
Step B2: and judging whether the first hash value is the same as the second hash value, if so, replacing the old version application with the new version application, and if not, determining an abnormal new function module in the new version application according to each old function module in the old version application, wherein the abnormal new function module cannot realize the same function compared with the corresponding old function module in the old version application.
The new version application and the old version application are both composed of the same number of functional modules, and the functional modules have one-to-one correspondence, namely, the two functional modules with the correspondence can realize the same function. In the application, all the function modules operate according to a preset operation sequence, a first function module processes target parameter input, and transmits parameter output parameters obtained by the function modules to a next function module for processing in sequence until the last function module outputs the parameter output parameters.
In this embodiment, the premise that the first parameter and the second parameter are calculated by using a hash algorithm is that there is no interference parameter that affects hash calculation, such as a timestamp, in the first parameter and the second parameter, and the processing results of the new version application and the old version application on the target parameter should be theoretically consistent, so as to ensure that the overall operation function is not affected when the new version application is used to replace the old version application for application update.
Further, the determining an abnormal new function module in the new version application according to each old function module in the old version application specifically includes the following steps:
step B21: and analyzing the parameter of each old functional module in the old version application from the first running log of the old version application.
Step B22: analyzing the parameter of each new function module in the new version application from the second running log of the new version application; and each old function module in the old version application and each new function module in the new version application have a one-to-one correspondence relationship.
Step B23: and traversing each new function module in the new version application in sequence, judging whether the parameter of the currently traversed new function module is the same as the parameter of the old function module with the corresponding relation, if so, continuing traversing, and if not, determining the currently traversed new function module as an abnormal new function module.
Further, the step B23 specifically includes the following steps:
step B231: and calculating the parameter of the new function module traversed currently according to a preset hash algorithm to obtain a third hash value, and calculating the parameter of the old function module with the corresponding relation according to the hash algorithm to obtain a fourth hash value.
Step B232: and judging whether the third hash value is the same as the fourth hash value, if so, continuing traversal, and if not, determining the currently traversed new function module as an abnormal new function module.
In addition, the replacing the old version application with the new version application specifically includes:
when a first parameter and a second parameter of the target parameter are consistent, recording as the number of times of one-time verification success; and when the accumulated number of the extracted target parameter access parameters reaches a preset number, judging whether the ratio of the accumulated verification success times to the accumulated number reaches a preset success rate, if so, replacing the old version application with the new version application.
The new version application is verified by using a large number of real target parameter access parameters to ensure that the new version application has normal functions and accurate operation results, so that the new version application can be judged to replace the old version application to work only when the number of times of successful verification of the target parameter access parameters reaches a preset number, and the old version application is updated.
In this embodiment, a load balancing server extracts a target parameter from a parameter sent by a user side, and compares a first parameter output by an old version application with a second parameter output by a new version application to complete a verification once, when a success rate of processing the target parameter input by the new version application reaches a preset success rate, the new version application can be used to replace the old version application to complete version update, thereby solving the problem that in the prior art, a tester needs to simulate a large number of test parameters to test the new version application, achieving the effects of flexibly verifying the function of the new version application and saving data resources, and meanwhile, the logic of the test application can also actively position an abnormal new function module in the new version application, and achieving the purposes of saving verification cost, improving verification efficiency, and the like without affecting the normally running old version application, The purpose of locating the position of the anomaly.
Example two
Based on the method for testing an application provided in the first embodiment, an apparatus for testing an application is provided in this embodiment, and specifically, fig. 2 illustrates an alternative structural block diagram of the apparatus for testing an application, where the apparatus for testing an application is divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors, so as to complete the present invention. The program module referred to in the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable for describing the execution process of the device for testing applications in the storage medium than the program itself.
As shown in fig. 2, the apparatus for testing an application is applied to an application management background, and specifically includes the following components:
a receiving module 201, configured to receive a verification instruction for verifying a new version application; wherein the new version application is based on a reconstructed version of an old version application;
an extraction module 202, configured to obtain the parameter of the old version application, and extract a target parameter of the old version application from all the obtained parameters of the old version application according to a preset sampling rule;
an obtaining module 203, configured to obtain a first parameter after the old version application processes the target parameter;
the input module 204 is configured to input the target parameter into the new version application, and obtain a second parameter obtained after the new version application processes the target parameter;
a replacing module 205, configured to replace the old version application with the new version application when it is determined that the first parameter is consistent with the second parameter.
The extraction module 202 is specifically configured to:
when the old version application only has one input interface, periodically taking the last received parameter of the input interface in each time interval as a target parameter according to a preset time interval; or when the old version application only has one input interface, taking the parameter with the parameter sequence number of the parameter received by the input interface as the integral multiple of the preset value as the target parameter; or when the old version is applied with a plurality of input interfaces, respectively setting a corresponding interval value for each input interface according to the parameter-entering receiving frequency of each input interface, and respectively taking the parameter-entering parameter of which the parameter-entering serial number received by each input interface is an integral multiple of the corresponding interval value as the target parameter-entering parameter according to the interval value.
Specifically, the extracting module 202 is further configured to:
establishing connection between a user side and a load balancing server, and respectively establishing connection between the load balancing server and a plurality of processing servers corresponding to the old version application; and sending the sampling rule to the load balancing server, so that the load balancing server polls and extracts a target parameter from the parameter input by the user side according to the sampling rule, and sends the target parameter to a designated processing server in the plurality of processing servers.
Further, the obtaining module 203 is specifically configured to:
and acquiring a first parameter of the target parameter after the designated processing server processes the target parameter of the target parameter.
In addition, the replacing module 205 specifically includes:
the calculation unit is used for calculating the first parameter according to a preset hash algorithm to obtain a first hash value, and calculating the second parameter according to the hash algorithm to obtain a second hash value;
and the judging unit is used for judging whether the first hash value is the same as the second hash value, if so, replacing the old version application with the new version application, and if not, determining an abnormal new function module in the new version application according to each old function module in the old version application, wherein the abnormal new function module cannot realize the same function compared with the corresponding old function module in the old version application.
Wherein, the judging unit specifically includes:
the first analysis subunit is used for analyzing the parameter of each old functional module in the old version application from the first running log of the old version application;
the second analysis subunit is used for analyzing the parameter of each new function module in the new version application from the second running log of the new version application; wherein, each old function module in the old version application and each new function module in the new version application have a one-to-one correspondence relationship;
and the judging subunit is used for sequentially traversing each new function module in the new version application, judging whether the parameter of the currently traversed new function module is the same as the parameter of the old function module with the corresponding relationship, if so, continuing traversing, and if not, determining the currently traversed new function module as an abnormal new function module.
Further, the determining subunit is specifically configured to:
calculating the parameter of the new function module traversed currently according to a preset Hash algorithm to obtain a third Hash value, and calculating the parameter of the old function module with the corresponding relation according to the Hash algorithm to obtain a fourth Hash value; and judging whether the third hash value is the same as the fourth hash value, if so, continuing traversal, and if not, determining the currently traversed new function module as an abnormal new function module.
Further, the replacing module 205 is further configured to:
when a first parameter and a second parameter of the target parameter are consistent, recording as the number of times of one-time verification success; and when the accumulated number of the extracted target parameter access parameters reaches a preset number, judging whether the ratio of the accumulated verification success times to the accumulated number reaches a preset success rate, if so, replacing the old version application with the new version application.
EXAMPLE III
The embodiment also provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server or a rack server (including an independent server or a server cluster composed of a plurality of servers) capable of executing programs, and the like. As shown in fig. 3, the computer device 30 of the present embodiment includes at least but is not limited to: a memory 301, a processor 302 communicatively coupled to each other via a system bus. It is noted that FIG. 3 only shows the computer device 30 having components 301 and 302, but it is understood that not all of the shown components are required and that more or fewer components may be implemented instead.
In this embodiment, the memory 301 (i.e., storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 301 may be an internal storage unit of the computer device 30, such as a hard disk or a memory of the computer device 30. In other embodiments, the memory 301 may also be an external storage device of the computer device 30, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash card (FlashCard), or the like, provided on the computer device 30. Of course, the memory 301 may also include both internal and external storage devices for the computer device 30. In the present embodiment, the memory 301 is generally used for storing an operating system and various types of application software installed in the computer device 30. In addition, the memory 301 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 302 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 302 generally serves to control the overall operation of the computer device 30.
Specifically, in this embodiment, the processor 302 is configured to execute the program of the method for testing the application stored in the memory 301, and when the program of the method for testing the application is executed, the following steps are implemented:
receiving a verification instruction for verifying the new version application; wherein the new version application is based on a reconstructed version of an old version application;
acquiring the parameter input into the old version application, and extracting a target parameter from all the acquired parameters according to a preset sampling rule;
acquiring a first parameter of the old version application after processing the target parameter of the old version application;
inputting the target parameter into the new version application, and acquiring a second parameter obtained after the new version application processes the target parameter;
replacing the old version application with the new version application when it is determined that the first parameter is consistent with the second parameter.
The specific embodiment process of the above method steps can be referred to as embodiment one, and the detailed description of this embodiment is not repeated herein.
Example four
The present embodiments also provide a computer storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., having stored thereon a computer program that, when executed by a processor, implements the method steps of:
receiving a verification instruction for verifying the new version application; wherein the new version application is based on a reconstructed version of an old version application;
acquiring the parameter input into the old version application, and extracting a target parameter from all the acquired parameters according to a preset sampling rule;
acquiring a first parameter of the old version application after processing the target parameter of the old version application;
inputting the target parameter into the new version application, and acquiring a second parameter obtained after the new version application processes the target parameter;
replacing the old version application with the new version application when it is determined that the first parameter is consistent with the second parameter.
The specific embodiment process of the above method steps can be referred to as embodiment one, and the detailed description of this embodiment is not repeated herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for testing an application, the method being applied to an application management background, the method comprising:
receiving a verification instruction for verifying the new version application; wherein the new version application is based on a reconstructed version of an old version application;
acquiring the parameter input into the old version application, and extracting a target parameter from all the acquired parameters according to a preset sampling rule;
acquiring a first parameter of the old version application after processing the target parameter of the old version application;
inputting the target parameter into the new version application, and acquiring a second parameter obtained after the new version application processes the target parameter;
replacing the old version application with the new version application when it is determined that the first parameter is consistent with the second parameter.
2. The method for testing applications according to claim 1, wherein the extracting the target parameter from all the obtained parameters according to the preset sampling rule specifically comprises:
when the old version application only has one input interface, periodically taking the last received parameter of the input interface in each time interval as a target parameter according to a preset time interval; alternatively, the first and second electrodes may be,
when the old version application only has one input interface, taking the parameter of the input received as the parameter of the goal of entering the parameter of the old version; alternatively, the first and second electrodes may be,
when the old version is applied with a plurality of input interfaces, setting corresponding interval values for each input interface according to the parameter receiving frequency of each input interface, and taking the parameter sequence number of the parameter received by each input interface as the parameter of the corresponding interval value as the target parameter according to the interval values.
3. The method according to claim 1, wherein the obtaining of the parameter entries input to the old version application and extracting the target parameter entries from all the obtained parameter entries according to a preset sampling rule specifically comprises:
establishing connection between a user side and a load balancing server, and respectively establishing connection between the load balancing server and a plurality of processing servers corresponding to the old version application;
sending the sampling rule to the load balancing server, so that the load balancing server polls and extracts a target parameter from the parameter input by the user side according to the sampling rule, and sends the target parameter to a designated processing server in the plurality of processing servers;
the obtaining of the first parameter of the old version application after processing the target parameter of the entry specifically includes:
and acquiring a first parameter of the target parameter after the designated processing server processes the target parameter of the target parameter.
4. The method according to claim 1, wherein the replacing the old version application with the new version application when the first parameter is determined to be consistent with the second parameter comprises:
calculating the first parameter according to a preset hash algorithm to obtain a first hash value, and calculating the second parameter according to the hash algorithm to obtain a second hash value;
and judging whether the first hash value is the same as the second hash value, if so, replacing the old version application with the new version application, and if not, determining an abnormal new function module in the new version application according to each old function module in the old version application, wherein the abnormal new function module cannot realize the same function compared with the corresponding old function module in the old version application.
5. The method according to claim 4, wherein the determining, according to each old functional module in the old version application, an abnormal new functional module in the new version application specifically includes:
analyzing parameter output parameters of all old functional modules in the old version application from a first running log of the old version application;
analyzing the parameter of each new function module in the new version application from the second running log of the new version application; wherein, each old function module in the old version application and each new function module in the new version application have a one-to-one correspondence relationship;
and traversing each new function module in the new version application in sequence, judging whether the parameter of the currently traversed new function module is the same as the parameter of the old function module with the corresponding relation, if so, continuing traversing, and if not, determining the currently traversed new function module as an abnormal new function module.
6. The method according to claim 5, wherein the determining whether the parameter of the new function module currently traversed is the same as the parameter of the old function module having the corresponding relationship, if yes, continuing the traversal, and if not, determining the new function module currently traversed as the abnormal new function module, specifically includes:
calculating the parameter of the new function module traversed currently according to a preset Hash algorithm to obtain a third Hash value, and calculating the parameter of the old function module with the corresponding relation according to the Hash algorithm to obtain a fourth Hash value;
and judging whether the third hash value is the same as the fourth hash value, if so, continuing traversal, and if not, determining the currently traversed new function module as an abnormal new function module.
7. The method for testing an application according to any one of claims 1 to 6, wherein the replacing the old version application with the new version application specifically comprises:
when a first parameter and a second parameter of the target parameter are consistent, recording as the number of times of one-time verification success;
and when the accumulated number of the extracted target parameter access parameters reaches a preset number, judging whether the ratio of the accumulated verification success times to the accumulated number reaches a preset success rate, if so, replacing the old version application with the new version application.
8. An apparatus for testing an application, the apparatus being applied to an application management background, the apparatus comprising:
the receiving module is used for receiving a verification instruction for verifying the new version application; wherein the new version application is based on a reconstructed version of an old version application;
the extraction module is used for acquiring the parameter input into the old version application and extracting a target parameter input from all the acquired parameter input according to a preset sampling rule;
the acquisition module is used for acquiring a first parameter after the old version application processes the target parameter;
the input module is used for inputting the target parameter into the new version application and acquiring a second parameter after the new version application processes the target parameter;
and the replacing module is used for replacing the old version application with the new version application when the first parameter is determined to be consistent with the second parameter.
9. A computer device, the computer device comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when executing the computer program.
10. A computer storage medium on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202210207226.3A 2022-03-04 2022-03-04 Application testing method and device, computer equipment and storage medium Pending CN114416596A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210207226.3A CN114416596A (en) 2022-03-04 2022-03-04 Application testing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210207226.3A CN114416596A (en) 2022-03-04 2022-03-04 Application testing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114416596A true CN114416596A (en) 2022-04-29

Family

ID=81264521

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210207226.3A Pending CN114416596A (en) 2022-03-04 2022-03-04 Application testing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114416596A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115032493A (en) * 2022-07-15 2022-09-09 扬州晶新微电子有限公司 Wafer testing method and system based on tube core parameter display

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115032493A (en) * 2022-07-15 2022-09-09 扬州晶新微电子有限公司 Wafer testing method and system based on tube core parameter display
CN115032493B (en) * 2022-07-15 2023-10-13 扬州晶新微电子有限公司 Wafer testing method and system based on tube core parameter display

Similar Documents

Publication Publication Date Title
CN109302522B (en) Test method, test device, computer system, and computer medium
CN111124850A (en) MQTT server performance testing method, system, computer equipment and storage medium
US9703690B2 (en) Determining test case efficiency
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
CN110554938B (en) BIOS (basic input output System) testing method, system, terminal and storage medium based on script set
CN112559354A (en) Front-end code specification detection method and device, computer equipment and storage medium
CN109614325B (en) Method and device for determining control attribute, electronic equipment and storage medium
CN110543420A (en) Software testing method, system, terminal and storage medium
CN114416596A (en) Application testing method and device, computer equipment and storage medium
CN105117340A (en) URL (Uniform Resource Locator) detection method and device used for quality evaluation of iOS browser application
CN114706740A (en) Chaos experiment method, device, storage medium and equipment
CN117493188A (en) Interface testing method and device, electronic equipment and storage medium
CN111949548B (en) Automatic unauthorized penetration testing method and storage device
CN112181822A (en) Test method and test method for starting time consumption of application program
CN116431522A (en) Automatic test method and system for low-code object storage gateway
CN115543816A (en) Software regression test result verification method, device, equipment and storage medium
CN115576831A (en) Test case recommendation method, device, equipment and storage medium
CN113849484A (en) Big data component upgrading method and device, electronic equipment and storage medium
CN113806231A (en) Code coverage rate analysis method, device, equipment and medium
CN113342632A (en) Simulation data automatic processing method and device, electronic equipment and storage medium
CN113672514A (en) Test method, test device, server and storage medium
CN112346994A (en) Test information correlation method and device, computer equipment and storage medium
CN111274128A (en) Test method, test device, computer equipment and computer readable storage medium
CN115576821B (en) Verification method and device, electronic equipment and storage medium
CN113282304B (en) System for identifying virtual machine based on app installation list

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination