CN113688041A - Pressure testing method, system, storage medium and terminal - Google Patents

Pressure testing method, system, storage medium and terminal Download PDF

Info

Publication number
CN113688041A
CN113688041A CN202110976083.8A CN202110976083A CN113688041A CN 113688041 A CN113688041 A CN 113688041A CN 202110976083 A CN202110976083 A CN 202110976083A CN 113688041 A CN113688041 A CN 113688041A
Authority
CN
China
Prior art keywords
module
random number
functional
function
modules
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.)
Granted
Application number
CN202110976083.8A
Other languages
Chinese (zh)
Other versions
CN113688041B (en
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.)
Unisoc Chongqing Technology Co Ltd
Original Assignee
Unisoc Chongqing Technology 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 Unisoc Chongqing Technology Co Ltd filed Critical Unisoc Chongqing Technology Co Ltd
Priority to CN202110976083.8A priority Critical patent/CN113688041B/en
Publication of CN113688041A publication Critical patent/CN113688041A/en
Application granted granted Critical
Publication of CN113688041B publication Critical patent/CN113688041B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention provides a pressure testing method, a system, a storage medium and a terminal, wherein the method comprises the following steps: determining functional module information corresponding to the equipment to be tested according to the equipment identification, wherein the functional module information comprises names of M functional modules and a preset ratio corresponding to each functional module; aiming at any one of the M functional modules, calculating the ratio of the preset ratio of the functional module to the sum of the preset ratios of the M functional modules to obtain the actual ratio of the functional module; determining a random number interval corresponding to each functional module according to the actual ratio of the M functional modules; receiving a random event from a test host, wherein the random event comprises a random number; the method can effectively adapt to the function test of the equipment under different scenes, and improve the test effect.

Description

Pressure testing method, system, storage medium and terminal
Technical Field
The invention relates to the technical field of equipment testing, in particular to a pressure testing method, a pressure testing system, a storage medium and a terminal.
Background
The conventional random pressure test (monkey testing) is a command line tool in Android (Android), can run in a simulator and actual equipment, and can perform pressure test on an application program under development by sending a pseudorandom user event stream (such as key input, touch screen input, gesture input and the like) to a system, so that all possible situations are covered by random events as far as possible, and generally any person operates for any long time in the test field, the system cannot make mistakes, and the monkey testing (monkey testing) is an effective and quick method for testing the stability and the robustness of software.
For the internet of things device carrying an embedded Real-time System, for example, in a Real-time Operating System in which an Application Processor (AP) takes a mini Real-time Operating System kernel (FreeRTOS) as a kernel, the Operating System kernel (kernel) is a service which is used as the bottom layer, affects the most core module of the whole AP, and has the greatest effect on the stability of the platform System, so that the test of the stability of the platform System is mainly designed around the main service flow of the kernel. The FreeRTOS is a mini real-time operating system kernel, which is a lightweight operating system, and the functions include: task management, thread communication, memory management, time management, software timers, etc., thread communication such as semaphores and message queues, etc., can substantially meet the needs of smaller systems. The stability test of the platform is designed around the characteristics of FreeRTOS, and from the system test angle, the coverage can be directly removed through various platform service scenes, so that a test method based on RTOS can be designed, the system function can be removed through different platform scenes, and the stability and the robustness of the system can be tested.
In the equipment research and development project period, the platform test can respectively perform function test and pressure test on each module of the embedded equipment to ensure that the functions of each module reach the standard, but the current test process easily ignores the scene coverage of random calling of each module function combination, and for the equipment with different product forms, the key user scenes of the equipment are different, and obviously, the test of the existing fixed combination cannot meet the actual test requirement.
Therefore, there is a need to provide a novel pressure testing method, system, storage medium and terminal to solve the above problems in the prior art.
Disclosure of Invention
The invention aims to provide a pressure testing method, a pressure testing system, a storage medium and a terminal, which are effectively suitable for testing functions of equipment in different scenes.
In a first aspect, to achieve the above object, the pressure testing method of the present invention includes:
determining function module information corresponding to the equipment to be tested according to the equipment identification, wherein the function module information comprises names of M function modules and a preset ratio corresponding to each function module, the more the function modules are called, the larger the preset ratio is, and M is a positive integer;
aiming at any one of the M functional modules, calculating the ratio of the preset ratio of the functional module to the sum of the preset ratios of the M functional modules to obtain the actual ratio of the functional module;
determining a random number interval corresponding to each function module according to the actual ratio of the M function modules, wherein the larger the actual ratio of the function modules is, the larger the ratio of the random number interval corresponding to the function module to the whole random number interval is;
receiving a random event from a test host, the random event comprising a random number;
and executing the functional module corresponding to the random number interval in which the random number falls, and acquiring the calling result of the functional module.
The pressure testing method has the beneficial effects that: under different test scenes, the random event from the test host is received by determining the information of the functional module corresponding to the equipment to be tested, the functional module corresponding to the random number interval in which the random number of the random event falls is executed, and the calling result of the functional module is obtained, so that the test function of the functional module of the equipment to be tested under different test scenes is completed, the functional test under different scenes can be freely matched, the functional test can be freely combined, the calling result of the tested functional module can be recorded, and the test requirements under different scenes can be fully met.
In some possible embodiments, the random event is generated by a pseudo-random function, and the random number falls within the whole interval of the random number; and the random event is used for calling a function module corresponding to the random number interval in which the random number falls.
In some possible embodiments, after obtaining the calling result of the function module, the method further includes:
repeatedly receiving a random event from a test host, and executing a functional module corresponding to a random number interval in which the random number falls;
and until the total error times of the functional modules reach an error threshold value, or the execution times of the functional modules reach an execution threshold value. The beneficial effects are that: by continuously and repeatedly receiving random events from the test host, each module is fully tested, and the accuracy of a final test result is ensured.
In some possible embodiments, the random number intervals corresponding to different functional modules do not overlap, and a union of the random number intervals corresponding to M functional modules is equal to the whole random number interval. The beneficial effects are that: the M functional modules are prevented from being overlapped with each other, and the condition that a single random number simultaneously corresponds to a plurality of functional modules to cause interference is avoided when the functional modules are executed according to the random numbers.
In some possible embodiments, the call result further includes at least one of an error time and an error module name. The beneficial effects are that: it is convenient to record the error time when the function module is executed and the name of the error function module.
In some possible embodiments, after the obtaining of the call result of the functional module is performed, the method further includes:
and counting the error accumulation times and the test accumulation times of the functional module, and calculating the passing rate of the functional module according to the ratio of the error accumulation times and the test accumulation times of the functional module. The beneficial effects are that: the passing rate of the functional modules can be calculated by calculating the error accumulation times and the test accumulation times of each functional module, so that the test condition of each functional module can be accurately known.
In a second aspect, the present invention also discloses a pressure testing system, including:
the information confirming module is used for confirming function module information corresponding to the equipment to be tested, wherein the function module information comprises names of M function modules and a preset ratio corresponding to each function module, the more the function modules are called, the larger the preset ratio is, and M is a positive integer;
the proportion calculation module is used for calculating the ratio of the preset proportion value of the function module to the sum of the preset proportion values of the M function modules aiming at any one function module in the M function modules to obtain the actual proportion value of the function module;
the interval determining module is used for determining a random number interval corresponding to each function module according to the actual proportion values of the M function modules, wherein the larger the actual proportion value of the function module is, the larger the proportion value of the random number interval corresponding to the function module in the whole random number interval is;
the receiving module is used for receiving a random event from the test host, wherein the random event comprises a random number;
and the execution testing module is used for executing the functional module corresponding to the random number interval in which the random number falls and acquiring the calling result of the functional module.
The pressure testing system has the advantages that: under different test scenes, the information confirmation module determines the information of the functional module corresponding to the equipment to be tested, after the receiving module receives the random event from the test host, the execution test module executes the functional module corresponding to the random number interval in which the random number of the random event falls, and acquires the calling result of the functional module, so that the test function of the functional module of the equipment to be tested under different test scenes is completed, the functional test under different scenes can be freely matched, the functional test can be freely combined, the calling result of the tested functional module can be recorded, and the test requirements under different scenes can be fully met.
In some possible embodiments, the execution testing module is further configured to:
repeatedly receiving a random event from a test host, and executing a functional module corresponding to a random number interval in which the random number falls;
and until the total error times of the functional modules reach an error threshold value, or the execution times of the functional modules reach an execution threshold value.
In some possible embodiments, the execution testing module is further configured to:
and counting the error accumulation times and the test accumulation times of the functional module, and calculating the passing rate of the functional module according to the ratio of the error accumulation times and the test accumulation times of the functional module.
In a third aspect, the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method described above.
In a fourth aspect, the present invention discloses a terminal, including: a processor and a memory;
the memory is used for storing a computer program;
the processor is configured to execute the computer program stored in the memory to cause the terminal to perform the above-mentioned method.
For the beneficial effects of the third aspect and the fourth aspect, reference is made to the description of the beneficial effects of the first aspect and the second aspect, and details are not repeated here.
Drawings
FIG. 1 is a flow chart of a pressure testing method according to an embodiment of the present invention;
FIG. 2 is a block diagram of a test scenario structure of a pressure test method according to an embodiment of the present invention;
FIG. 3 is a block diagram of a pressure testing system according to an embodiment of the present invention;
fig. 4 is a block diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present 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. Unless defined otherwise, technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention belongs. As used herein, the word "comprising" and similar words are intended to mean that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items.
Before describing the embodiments of the present invention in detail, some terms used in the embodiments of the present invention will be explained below to facilitate understanding by those skilled in the art.
Monkey (egg pounding) test principle: monkey is a command line tool in Android, which can run in a simulator or in real equipment. The method sends a pseudorandom user event stream (such as key input, touch screen input, gesture input and the like) to a system, and realizes stress test on the application program under development. The Monkey test is a quick and effective method for testing the stability and the robustness of software.
In view of the problems in the prior art, an embodiment of the present invention provides a pressure testing method, as shown in fig. 1, the method including the following steps:
s101, determining function module information corresponding to equipment to be tested, wherein the function module information comprises names of M function modules and a preset ratio corresponding to each function module, the more the function modules are called, the larger the preset ratio is, and M is a positive integer;
s102, aiming at any one of the M functional modules, calculating the ratio of the preset ratio of the functional module to the sum of the preset ratios of the M functional modules to obtain the actual ratio of the functional module;
s103, determining a random number interval corresponding to each function module according to the actual ratio of the M function modules, wherein the larger the actual ratio of the function modules is, the larger the ratio of the random number interval corresponding to the function modules to the whole random number interval is;
s104, receiving a random event from a test host, wherein the random event comprises a random number;
and S105, executing the functional module corresponding to the random number interval in which the random number falls, and acquiring the calling result of the functional module.
The test scenario of the present invention is shown in fig. 2, in the test method, after determining the function module information corresponding to the device to be tested for different devices to be tested under different scenarios, the function module information includes names of M function modules of the device to be tested and a preset ratio corresponding to each function module, and according to a ratio between the preset ratio of each function module and a sum of the pre-review ratios of the M function modules, an actual ratio of each function module is obtained, since the higher the probability that each function module needs to be tested in the test process is, the more the number of times is called, the larger the preset ratio is, the larger the calculated actual ratio of each function module is, and then the random number interval corresponding to each function module is determined according to the actual ratio of each function module, when the device to be tested receives a random event from the test host, determining which random number interval the random number falls in according to the size of the random number, then correspondingly executing the functional module corresponding to the random number interval, and acquiring a calling result when the functional module is executed, thereby completing the functional test of the device to be tested.
In the test process, the names and the preset ratio of the functional modules are correspondingly determined in different scenes, so that the test method can effectively respond to different test scenes, can freely combine the functional tests, and can perform pressure test on the equipment to be tested in different test scenes so as to adapt to the test requirements of different test scenes.
In some embodiments, the random event is generated by a pseudo-random function, the random number falling within the random number ensemble interval; and the random event is used for calling a function module corresponding to the random number interval in which the random number falls.
After the random event is generated through the pseudo-random function, the functional module corresponding to the random number interval corresponding to the random number is determined according to the range of the random number of the random event in the random number overall interval, so that the device to be tested correspondingly executes the functional module, and the test is completed.
In still other embodiments, after obtaining the calling result of the function module, the method further includes:
repeatedly receiving a random event from a test host, and executing a functional module corresponding to a random number interval in which the random number falls;
and until the total error times of the functional modules reach an error threshold value, or the execution times of the functional modules reach an execution threshold value.
In the process of executing the functional module according to the random event sent by the test host, considering the limit of the execution times, by setting an error threshold and a receiving threshold, when the total error times of the functional module reaches the error threshold, or in the whole test process, the test host sends the random event to enable the execution times of the functional module to reach the execution threshold, so that the whole test process is judged to be finished, and the test process can be finished.
In other embodiments, the random number intervals corresponding to different functional modules do not overlap, and a union of the random number intervals corresponding to the M functional modules is equal to the whole random number interval.
The random number intervals of different functional modules are not overlapped, and the union of the random number intervals corresponding to each functional module is equal to the random number whole interval, so that the random number intervals corresponding to all the functional modules just form a complete random number whole interval.
In some embodiments, the calling result further includes at least one of the error time and the name of the error module, and after the test is called, the error time and the name of the error functional module are recorded, so that the error condition in the test process can be accurately known at the time of inquiry.
In still other embodiments, after the obtaining the call result of the functional module is performed, the method further comprises:
and counting the error accumulation times and the test accumulation times of the functional module, and calculating the passing rate of the functional module according to the ratio of the error accumulation times and the test accumulation times of the functional module.
The passing rate of the functional module can be calculated by counting the test accumulated times of the functional module and the error accumulated times of the functional module.
The passing rate includes both a single passing rate of a single functional module and an overall passing rate of all functional modules, the single passing rate is a ratio of the number of times of errors occurring during testing of the single functional module to the number of times of execution of the single functional module in the testing process, and the overall passing rate is a ratio of the sum of the number of times of errors occurring during testing of all functional modules to the sum of the number of times of execution of all functional modules in the testing process, which is not described herein again.
To further specifically explain this embodiment, as shown in fig. 2, an example will be specifically explained.
Before testing, for different types of devices to be tested in different scenes, setting function module information, such as a function module list, by predefining, wherein the different types of the devices to be tested in different scenes correspond to different function module lists, the different function module lists comprise names of function modules and preset occupation ratios, the preset occupation ratios represent the calling probabilities of the function modules, and the larger the preset occupation ratio, the higher the calling probabilities of the function modules are.
In this embodiment, the test host sends an existing query command, such as an Attention (AT) command implemented by sending a real-time operating system RTOS to the device to be tested, and determines the current test item model by determining a return value, so as to obtain a test scenario and a device model of the current device to be tested.
After the test scene and the equipment model of the current equipment to be tested are obtained, a function module list containing names of the function modules and a preset ratio can be correspondingly obtained, and after that, the actual ratio of each function module in the whole is obtained by calculating according to the preset ratio of each function module:
the calculation process of the actual ratio of the functional modules is as follows:
the actual occupancy ratio is (sum of preset occupancy ratio/cumulative preset occupancy ratio) 100%
And after the actual ratio of each functional module is obtained through calculation, determining a random number interval corresponding to each functional module in the random number overall interval according to the actual ratio, wherein the larger the actual ratio of the functional module is, the larger the ratio of the random number interval corresponding to the functional module to the random number overall interval is.
In order to avoid overlapping of the random number sections of the plurality of function modules, the lower bound value of the random number section of each function module is set as an open section, and the upper bound value of the random number section of each function module is set as a closed section, that is, the random number section has the composition of (lower bound value, upper bound value), "(" indicates that the left end is an open section, and "]" indicates that the right end is a closed section.
The lower bound value of the initial function module is set to be 0, the lower bound value of the current function module is set to be the upper bound value of the random number interval of the previous function module, and the upper bound value of the current function module is set to be the product of the upper bound value of the random number interval of the previous function module, the actual ratio of the current function module and the size of the whole random number interval.
In this embodiment, the device under test includes A, B, C three function modules, and the preset ratio values thereof are 2, 3, and 5, respectively, and then the information stored in the function module information is A, B, C, respectively; 2. 3 and 5.
And then calculating the actual ratio of each functional module according to the preset ratios of the three functional modules:
the actual ratio of functional module a is 2/(2+3+5) × 100 ═ 20%
The actual ratio of functional block B is 3/(2+3+5) × 100%: 30%
The actual ratio of functional module C is 5/(2+3+5) × 100 ═ 50%
The whole random number whole interval is set to the natural number in [1,100], the random number interval of the functional module a is set to (0, 20], the random number interval of the functional module B is set to (20, 50], and the random number interval of the functional module a is set to (50, 100).
By the set intervals, the natural numbers in [1,100] can be effectively and completely covered, and each interval does not overlap.
In the subsequent test, after the device to be tested receives the random event sent by the test host, the device to be tested executes and calls the functional module corresponding to the random number interval according to the position of the random number in the random event in the random number interval, records the calling execution condition of the functional module each time, and records the name and the error time of the functional module with the error, thereby facilitating the subsequent inquiry of the error condition.
Meanwhile, in the execution process, the test accumulated times of the test and the error accumulated times of the error occurrence of the functional module are counted so as to count the passing rate of each functional module.
Specifically, for example, the total test time is 100 times, where the test time of the functional module a is 20 times, the test time of the functional module B is 30 times, the test time of the functional module C is 50 times, the test error time of the functional module a is 2 times, the test error of the functional module B is 3 times at this time, the error time of the functional module C is 4 times, and then the total pass rate is:
Figure BDA0003227336450000111
the passing rate of the functional module A is as follows:
Figure BDA0003227336450000112
the pass rate of the functional module B is:
Figure BDA0003227336450000113
the pass rate of the functional module C is:
Figure BDA0003227336450000114
through the method, the passing rate of each functional module and the overall passing rate can be calculated.
In other embodiments, to limit the testing time and the testing times, the testing of the device under test is stopped when the total number of testing times of the functional modules reaches the execution threshold, or the testing of the device under test is stopped when the total number of error times of the functional modules reaches the error threshold.
On the other hand, under some specific conditions, the upper limit of the test times and the upper limit of the error times may also be set separately for a certain functional module, and when the total test times of a certain functional module reaches the upper limit of the test times or the error times reaches the upper limit of the error times, the test process for the test equipment is stopped, which is not described herein again.
The invention also discloses a pressure testing system, as shown in fig. 3, comprising:
the information confirming module 301 is configured to determine function module information corresponding to the device to be tested, where the function module information includes names of M function modules and a preset ratio corresponding to each function module, where the larger the number of times that a function module is called, the larger the preset ratio is, and M is a positive integer;
a proportion calculation module 302, configured to calculate, for any one of the M function modules, a ratio between a preset proportion value of the function module and a sum of preset proportion values of the M function modules, so as to obtain an actual proportion value of the function module;
an interval determining module 303, configured to determine a random number interval corresponding to each function module according to the actual ratio of the M function modules, where the larger the actual ratio of the function module is, the larger the ratio of the random number interval corresponding to the function module to the whole random number interval is;
a receiving module 304, configured to receive a random event from a test host, where the random event includes a random number;
the execution test module 305 is configured to execute a functional module corresponding to the random number interval in which the random number falls, and obtain a call result of the functional module.
In some embodiments, the executive test module 305 is further configured to:
repeatedly receiving a random event from a test host, and executing a functional module corresponding to a random number interval in which the random number falls;
and until the total error times of the functional modules reach an error threshold value, or the execution times of the functional modules reach an execution threshold value.
In some embodiments, the information confirmation module 301 is further configured to:
receiving a query command from a test host;
and sending a response message to the test host, wherein the response message comprises the identification of the device to be tested.
In some embodiments, the executive test module 305 is further configured to:
and counting the error accumulation times and the test accumulation times of the functional module, and calculating the passing rate of the functional module according to the ratio of the error accumulation times and the test accumulation times of the functional module.
It should be noted that the structure and principle of the pressure testing system correspond to the steps in the pressure testing system one to one, and therefore, the description thereof is omitted.
It should be noted that the division of the modules of the above apparatus is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling software by the processing element, and part of the modules can be realized in the form of hardware. For example, the selection module may be a processing element that is set up separately, or may be implemented by being integrated in a chip of the system, or may be stored in a memory of the system in the form of program code, and the function of the above x module may be called and executed by a processing element of the system. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, when one of the above modules is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a System-On-a-Chip (SOC).
In other embodiments of the present application, an embodiment of the present application discloses a terminal device, and as shown in fig. 4, the terminal device 400 may include: one or more processors 401; a memory 402; a display 403; one or more application programs (not shown); and one or more computer programs 404, which may be connected via one or more communication buses 405. Wherein the one or more computer programs 404 are stored in the memory 402 and configured to be executed by the one or more processors 401, the one or more computer programs 404 comprising instructions.
The invention also discloses a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, performs the above-mentioned method.
The storage medium of the invention has stored thereon a computer program which, when being executed by a processor, carries out the above-mentioned method. The storage medium includes: a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, a usb disk, a Memory card, or an optical disk, which can store program codes.
In another embodiment of the disclosure, the present invention further provides a chip system, which is coupled to the memory and configured to read and execute the program instructions stored in the memory to perform the steps of the above method.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
Each functional unit in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or make a contribution to the prior art, or all or part of the technical solutions may be implemented in the form of a software product stored in a storage medium and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard drive, read only memory, random access memory, magnetic or optical disk, and the like.
The above description is only a specific implementation of the embodiments of the present application, but the scope of the embodiments of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the embodiments of the present application should be covered by the scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.
Although the embodiments of the present invention have been described in detail hereinabove, it is apparent to those skilled in the art that various modifications and variations can be made to these embodiments. However, it is to be understood that such modifications and variations are within the scope and spirit of the present invention as set forth in the following claims. Moreover, the invention as described herein is capable of other embodiments and of being practiced or of being carried out in various ways.

Claims (12)

1. A method of pressure testing, the method comprising:
determining function module information corresponding to the equipment to be tested, wherein the function module information comprises names of M function modules and a preset ratio corresponding to each function module, the more the function modules are called, the larger the preset ratio is, and M is a positive integer;
aiming at any one of the M functional modules, calculating the ratio of the preset ratio of the functional module to the sum of the preset ratios of the M functional modules to obtain the actual ratio of the functional module;
determining a random number interval corresponding to each function module according to the actual ratio of the M function modules, wherein the larger the actual ratio of the function modules is, the larger the ratio of the random number interval corresponding to the function module to the whole random number interval is;
receiving a random event from a test host, the random event comprising a random number;
and executing the functional module corresponding to the random number interval in which the random number falls, and acquiring the calling result of the functional module.
2. The method of claim 1, wherein the random event is generated by a pseudo-random function, and wherein the random number falls within the overall interval of the random number; and the random event is used for calling a function module corresponding to the random number interval in which the random number falls.
3. The method according to claim 1 or 2, wherein after obtaining the calling result of the function module, the method further comprises:
repeatedly receiving a random event from a test host, and executing a functional module corresponding to a random number interval in which the random number falls;
and until the total error times of the functional modules reach an error threshold value, or the execution times of the functional modules reach an execution threshold value.
4. The method according to claim 1 or 2, wherein the random number intervals corresponding to different functional modules do not overlap, and the union of the random number intervals corresponding to M functional modules is equal to the whole random number interval.
5. The method of claim 1, wherein the call result further comprises at least one of an error time and an error module name.
6. The method of claim 1, wherein after performing the obtaining of the call result of the functional module, the method further comprises:
and counting the error accumulation times and the test accumulation times of the functional module, and calculating the passing rate of the functional module according to the ratio of the error accumulation times and the test accumulation times of the functional module.
7. A pressure testing system, comprising:
the information confirming module is used for confirming function module information corresponding to the equipment to be tested, wherein the function module information comprises names of M function modules and a preset ratio corresponding to each function module, the more the function modules are called, the larger the preset ratio is, and M is a positive integer;
the proportion calculation module is used for calculating the ratio of the preset proportion value of the function module to the sum of the preset proportion values of the M function modules aiming at any one function module in the M function modules to obtain the actual proportion value of the function module;
the interval determining module is used for determining a random number interval corresponding to each function module according to the actual proportion values of the M function modules, wherein the larger the actual proportion value of the function module is, the larger the proportion value of the random number interval corresponding to the function module in the whole random number interval is;
the receiving module is used for receiving a random event from the test host, wherein the random event comprises a random number;
and the execution testing module is used for executing the functional module corresponding to the random number interval in which the random number falls and acquiring the calling result of the functional module.
8. The system of claim 7, wherein the execution testing module is further configured to:
repeatedly receiving a random event from a test host, and executing a functional module corresponding to a random number interval in which the random number falls;
and until the total error times of the functional modules reach an error threshold value, or the execution times of the functional modules reach an execution threshold value.
9. The system of claim 7, wherein the information confirmation module is further configured to:
receiving a query command from a test host;
and sending a response message to the test host, wherein the response message comprises the identification of the device to be tested.
10. The system of claim 7, wherein the execution testing module is further configured to:
and counting the error accumulation times and the test accumulation times of the functional module, and calculating the passing rate of the functional module according to the ratio of the error accumulation times and the test accumulation times of the functional module.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 6.
12. A terminal, comprising: a processor and a memory;
the memory is used for storing a computer program;
the processor is configured to execute the memory-stored computer program to cause the terminal to perform the method of any of claims 1 to 6.
CN202110976083.8A 2021-08-24 2021-08-24 Pressure testing method, system, storage medium and terminal Active CN113688041B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110976083.8A CN113688041B (en) 2021-08-24 2021-08-24 Pressure testing method, system, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110976083.8A CN113688041B (en) 2021-08-24 2021-08-24 Pressure testing method, system, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN113688041A true CN113688041A (en) 2021-11-23
CN113688041B CN113688041B (en) 2023-01-31

Family

ID=78582273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110976083.8A Active CN113688041B (en) 2021-08-24 2021-08-24 Pressure testing method, system, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN113688041B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080294578A1 (en) * 2007-05-24 2008-11-27 Palo Alto Research Center Incorporated Diagnosing intermittent faults
CN108022357A (en) * 2017-11-03 2018-05-11 链家网(北京)科技有限公司 One kind prize drawing algorithm design method and device
US10156197B1 (en) * 2017-06-16 2018-12-18 GM Global Technology Operations LLC Model predictive control systems and methods for increasing computational efficiency
CN112181835A (en) * 2020-09-29 2021-01-05 中国平安人寿保险股份有限公司 Automatic testing method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080294578A1 (en) * 2007-05-24 2008-11-27 Palo Alto Research Center Incorporated Diagnosing intermittent faults
US10156197B1 (en) * 2017-06-16 2018-12-18 GM Global Technology Operations LLC Model predictive control systems and methods for increasing computational efficiency
CN108022357A (en) * 2017-11-03 2018-05-11 链家网(北京)科技有限公司 One kind prize drawing algorithm design method and device
CN112181835A (en) * 2020-09-29 2021-01-05 中国平安人寿保险股份有限公司 Automatic testing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113688041B (en) 2023-01-31

Similar Documents

Publication Publication Date Title
CN110764993A (en) Automatic testing method and terminal equipment
CN111104421A (en) Data query method and device based on data interface standard configuration
CN108491122B (en) Click event response method, computer readable storage medium and terminal equipment
CN108388509B (en) Software testing method, computer readable storage medium and terminal equipment
CN112016919B (en) Data processing method and device for calculating total amount
CN107220169B (en) A method and device for simulating server to return customized data
CN108492150A (en) The determination method and system of entity temperature
WO2022111278A1 (en) Concurrent request timeout diagnosis method and apparatus, device, and storage medium
CN111124791A (en) System testing method and device
CN113157583B (en) Test method, device and equipment
CN117076330B (en) Access verification method, system, electronic equipment and readable storage medium
CN109388564B (en) Test method and device and electronic equipment
CN113688041B (en) Pressure testing method, system, storage medium and terminal
CN112907770A (en) License plate recognition and verification method, system, medium, parking server and client
CN110570663A (en) Parking time processing/reminding method/system, medium, terminal and server
CN116795710A (en) Performance evaluation method and device for real-time system
CN111428197A (en) Data processing method, device and equipment
CN114490321B (en) Blockchain stability testing method, system and electronic device
CN114647552B (en) Micro-service health monitoring method and device, electronic equipment and storage medium
CN110458707B (en) Behavior evaluation method and device based on classification model and terminal equipment
CN114816392A (en) Artificial intelligence-based automatic component parameter packaging method and related equipment
CN115202946A (en) Automated testing method, apparatus, device, storage medium, and program product
CN111382068B (en) Hierarchical testing method and device for large-batch data
CN119396643B (en) Interrupt monitoring module verification system and method based on UVM verification methodology
CN117009418B (en) Data analysis method, device, equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant