Software testing method and device based on mobile internet and medium
By analyzing the coupling of the functional module and its associated function module in the software test, set the appropriate test cases and test times, and perform the first round of testing and user testing, solve the problem of abnormal function modules in existing technologies. The accuracy and adaptation detection ability of software testing.
Patent Information
- Application Number
- CN202411689870.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-01-24
AI Technical Summary
The existing software testing technology is only tested on the overall software, and fails to effectively analyze the correlation between functional modules in the software and their associated functional modules, resulting in the association of functional modules being easily affected when the functional module is abnormal, reducing the accuracy of software testing.
By obtaining the test function in the software to be tested, and calculating the degree of coupling with conventional functions, set test cases and tests based on the coupling level, and perform the first round of testing and user testing to generate test signals Match detection.
It improves the accuracy of software testing, can effectively detect the adaptation of functional modules and their associated functional modules, and ensures that when the software's functional modules are abnormal, the impact of the associated functional modules is minimal.
Smart Images

Figure CN119357064A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of software testing, and specifically relates to a software testing method, device and medium based on mobile Internet. Background Art
[0002] Software testing technology is an important part of the software development process. It is an activity that runs through the entire software development life cycle and verifies and confirms software products. Its purpose is to find various problems in software products as soon as possible, including inconsistencies with user requirements and pre-defined requirements, check for bugs in software products, write test reports, and give them to developers for modification. The basic goal of software testers is to find errors in software.
[0003] The invention patent application with application number 201810379272.5 proposes a software testing method and device, which includes: reading the operation log of the target software; when there is a target defect identifier in the operation log, extracting the step information of the defect step corresponding to the target defect identifier from the operation log; integrating the extracted step information to generate a playback script for playing back the defect step. By reading the software operation log and integrating and generating a playback script based on the extracted step information, it is possible to ensure accurate playback of the defect steps and truly restore the actual situation of the defect.
[0004] However, the above-mentioned prior art only tests the software as a whole, and does not set a software testing method that is suitable for the correlation analysis result between a certain functional module and its associated functional modules in the software. Therefore, in actual applications, when an abnormality occurs in a functional module, its associated functional modules are also easily affected, thereby reducing the accuracy of software testing; To this end, the present invention proposes a software testing method, device and medium based on mobile Internet. Summary of the invention
[0005] The purpose of the present invention is to propose a software testing method, device and medium based on mobile Internet to solve the problems raised in the above background technology.
[0006] In the first aspect, in order to achieve the above-mentioned purpose, the present invention adopts the following technical solutions: A software testing method based on mobile Internet, the software testing method is as follows: Step S1, obtaining the functions to be tested in the software to be tested, recording the corresponding functions as the functions to be tested, and calculating the coupling degree between the functions to be tested and the conventional functions; Step S2, setting test cases corresponding to different functions to be tested in the software to be tested and the number of tests of the test cases based on the coupling degree level; Step S3, using the test cases to perform a first round of testing on different functions to be tested in the software to be tested, and combining the first round of test results to determine whether the functions to be tested should be tested by users or generate test abnormality signals; Step S4, performing user testing on the function to be tested in combination with the mobile Internet, obtaining a user test value of the function to be tested through the user testing, and generating a corresponding signal according to the user test value.
[0007] Furthermore, the step S1 includes the following sub-steps: Step S11, decomposing the software to be tested into functions to be tested and regular functions; Step S12, obtaining the number of calls corresponding to any regular function called by the function to be tested, and summing the number of calls to obtain the total number of calls of all regular functions called by the function to be tested; Step S13, calculating the coupling degree between the function to be tested and the normal function according to the coupling degree formula.
[0008] Furthermore, the step S2 includes the following sub-steps: Step S21, obtaining the coupling degree between the function to be tested and the conventional function; Step S22, if the coupling degree between the function to be tested and the conventional function is greater than or equal to a first coupling degree threshold, then the corresponding coupling degree level is determined to be a high coupling degree; If the coupling degree between the function to be tested and the conventional function is less than the first coupling degree threshold and greater than or equal to the second coupling degree threshold, the corresponding coupling degree level is determined to be medium coupling degree; If the coupling degree between the function to be tested and the conventional function is less than the second coupling degree threshold, the corresponding coupling degree level is determined to be low coupling degree; wherein the first coupling degree threshold is greater than the second coupling degree threshold; Step S23, setting test cases corresponding to different functions to be tested and the number of tests of the test cases based on the coupling degree level.
[0009] Furthermore, the correlation between the coupling level and the number of test cases is: When the coupling degree level is high coupling degree, the test number of the test case corresponding to the function to be tested is the first test number; When the coupling degree level is medium coupling degree, the number of tests for the test case corresponding to the function to be tested is the second number of tests; When the coupling degree level is low coupling degree, the number of tests of the test case corresponding to the function to be tested is the third number of tests; wherein the first number of tests is greater than the second number of tests, and the second number of tests is greater than the third number of tests.
[0010] Furthermore, the step S3 includes the following sub-steps: Step S31, obtaining a test case corresponding to the function to be tested, and then using the test case to perform a first round of testing on the function to be tested; Step S32, in the first round of testing, the activation response time XYiu and the number of security vulnerabilities AQiu of each test of the function to be tested are obtained, where i is the number of the function to be tested, and u is the number of the first round of testing of the function to be tested; Step S33, calculating the abnormality index DYu of the function to be tested in the software to be tested at each test by the formula DYiu=u1×XYiu+u2×AQiu; wherein u1 and u2 are weight coefficients with fixed values; Step S34, if the abnormal index has a mode, then the mode of the abnormal index is taken as the test index for the function to be tested in the software to be tested; if the abnormal index does not have a mode, then the abnormal indexes in each test are summed and the average is taken as the test index for the function to be tested in the software to be tested; Step S35, if the test index is greater than or equal to the test threshold, the first round of testing of the function to be tested fails; if the test index is less than the abnormal threshold, the first round of testing of the function to be tested passes; Step S36, when all the functions to be tested in the software to be tested pass the first round of testing, user testing is performed; when any function to be tested in the software to be tested fails the first round of testing, a test abnormality signal is generated.
[0011] Furthermore, the first round of testing includes the following sub-steps: Step S311, constructing a test space for the function to be tested, setting a controller in the test space, and importing the function to be tested and the test cases corresponding to the function to be tested into the test space; Step S312, perform the first round of testing on the function to be tested using the test case according to the number of tests, enable the function to be tested by controlling the air value, record the enabling time of the function to be tested, send a work instruction to the controller when the function to be tested is successfully enabled, record the time when the controller receives the work instruction as the start working time of the function to be tested, and subtract the enabling time from the start working time to obtain the enabling response time of the function to be tested; Step S313, testing the virtual space into which the function to be tested is imported through a test case, and the test case performs a security scan to obtain security vulnerabilities existing in the virtual space after the function to be tested is imported, and the number of security vulnerabilities is counted as the number of security vulnerabilities.
[0012] Furthermore, the test process of the user test in step S4 is specifically as follows: Step S41, assembling the function to be tested into a test terminal for user testing, and distributing the test terminal to the test user; Step S42, configuring a corresponding recording module in the test terminal, and using the recording module to collect real-time test data of the function to be tested; Step S43, obtaining the startup time QTi, memory occupancy rate NCi, number of freezes KCi and freeze duration of each freeze when the test terminal enables the corresponding function to be tested, and traversing and comparing the freeze duration of each freeze to obtain the maximum freeze duration KTi when the test terminal enables the corresponding function to be tested; Step S44, the user test value YCi of the test terminal corresponding to the function to be tested is calculated by a formula, and the specific formula is as follows: YCi=(KTi+QTi)×a1+(KCi+NCi)×a2; where a1 and a2 are weight coefficients with fixed values; Step S45, if the user test value is less than the user test threshold, a test abnormality signal is generated; If the user test value is greater than or equal to the user test threshold, a test normal signal is generated.
[0013] Furthermore, the real-time test data includes the startup time, memory usage, number of freezes, and freeze duration of each freeze when the test terminal enables the corresponding function to be tested.
[0014] In a second aspect, a computer device is provided, the computer device comprising: A memory storing a computer program; The processor is communicatively connected to the memory, and when the computer program is executed by the processor, the software testing method is implemented.
[0015] In a third aspect, a computer-readable storage medium stores a computer program, which implements a software testing method when executed by a processor.
[0016] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: The present invention obtains the functions to be tested that need to be tested in the software to be tested, and calculates the coupling degree between the functions to be tested and conventional functions; sets test cases corresponding to different functions to be tested in the software to be tested and the test times of the test cases based on the coupling degree level; uses the test cases to perform a first round of testing on different functions to be tested in the software to be tested, and judges whether to perform user testing on the functions to be tested or generate test abnormality signals in combination with the results of the first round of testing; performs user testing on the functions to be tested in combination with the mobile Internet, obtains user test values of the functions to be tested by user testing, and generates corresponding signals according to the user test values. The present invention combines the correlation analysis between the function modules in the software and the function modules associated with them to realize the adaptation detection of the functions in the software. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.
[0018] Figure 1 is a flow chart of the method of the present invention; Figure 2 is a method flow chart of the sub-steps corresponding to step S1 in the present invention; Figure 3 is a method flow chart of the sub-steps corresponding to step S2 in the present invention; Figure 4 It is a schematic diagram of the structure of the computing device in the present invention. DETAILED DESCRIPTION
[0019] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] Embodiment 1: See also Figure 1-Figure 3 As shown, the technical solution provided by the present invention is: a software testing method based on mobile Internet, which is mainly used to perform qualification test on the functions in the tested software, and the method is specifically as follows: Step S1, obtaining the functions to be tested in the software to be tested, recording the corresponding functions as the functions to be tested, and calculating the coupling degree between the functions to be tested and the conventional functions; It should be specifically noted that the software to be tested consists of the function to be tested and the regular functions. The regular functions are specifically all functions in the software to be tested except the function to be tested. For example, the software to be tested is video software, the function to be tested is the resolution function, and the regular functions may be the video playback function, the video fast forward function, the video pause function, and the video volume adjustment function, etc.; In this embodiment, step S1 includes the following sub-steps: Step S11, decomposing the software to be tested into functions to be tested and regular functions; Step S12, obtaining the number of calls corresponding to any regular function called by the function to be tested, and summing the number of calls to obtain the total number of calls of all regular functions called by the function to be tested; Step S13, calculating the coupling degree between the function to be tested and the normal function according to the coupling degree formula; Among them, the coupling degree formula is: coupling degree = number of calls / total number of calls; Exemplarily, the software to be tested consists of a first function, a second function, a third function, a fourth function and a fifth function. If the first function is used as the function to be tested, and the first function is associated with the second function, the third function, the fourth function and the fifth function, then the second function, the third function, the fourth function and the fifth function are used as regular functions. When the function to be tested calls the second function 3 times, calls the third function 4 times, calls the fourth function 2 times, and calls the fifth function 1 time, the corresponding coupling degrees are 0.3, 0.4, 0.2 and 0.1 respectively. If the second function is used as the function to be tested, and the second function is associated with the first function, the third function, the fourth function and the fifth function, then the first function, the third function, the fourth function and the fifth function are used as regular functions.
[0021] Step S2, setting test cases corresponding to different functions to be tested in the software to be tested and the number of tests of the test cases based on the coupling degree level; In this embodiment, step S2 includes the following sub-steps: Step S21, obtaining the coupling degree between the function to be tested and the conventional function; Step S22, if the coupling degree between the function to be tested and the conventional function is greater than or equal to a first coupling degree threshold, then the corresponding coupling degree level is determined to be a high coupling degree; If the coupling degree between the function to be tested and the conventional function is less than the first coupling degree threshold and greater than or equal to the second coupling degree threshold, the corresponding coupling degree level is determined to be medium coupling degree; If the coupling degree between the function to be tested and the conventional function is less than the second coupling degree threshold, the corresponding coupling degree level is determined to be low coupling degree; wherein the first coupling degree threshold is greater than the second coupling degree threshold; Step S23, setting test cases corresponding to different functions to be tested and the number of tests of the test cases based on the coupling degree level; wherein the test case is specifically a test program that can be used to test the function to be tested, for example, when the function to be tested is resolution, the test case is a test program that can perform resolution testing; When the coupling degree level is high coupling degree, the test number of the test case corresponding to the function to be tested is the first test number; When the coupling degree level is medium coupling degree, the number of tests for the test case corresponding to the function to be tested is the second number of tests; When the coupling degree level is low coupling degree, the number of tests for the test case corresponding to the function to be tested is the third number of tests; It should be specifically noted that the first test number is greater than the second test number, and the second test number is greater than the third test number.
[0022] Step S3, using the test cases to perform a first round of testing on different functions to be tested in the software to be tested, and combining the first round of test results to determine whether the functions to be tested should be tested by users or generate test abnormality signals; In this embodiment, step S3 includes the following sub-steps: Step S31, obtaining a test case corresponding to the function to be tested, and then using the test case to perform a first round of testing on the function to be tested; Specifically, the first round of testing includes the following sub-steps: Step S311, constructing a test space for the function to be tested, setting a controller in the test space, and importing the function to be tested and the test cases corresponding to the function to be tested into the test space; in practice, the test space can be generated by digital twin technology, and the test space is the same as the use environment of the function to be tested; Step S312, perform the first round of testing on the function to be tested using the test case according to the number of tests, enable the function to be tested by controlling the air value, record the enabling time of the function to be tested, send a work instruction to the controller when the function to be tested is successfully enabled, record the time when the controller receives the work instruction as the start working time of the function to be tested, and subtract the enabling time from the start working time to obtain the enabling response time of the function to be tested; Step S313, testing the virtual space into which the function to be tested is imported through a test case, the test case performs a security scan to obtain security vulnerabilities existing in the virtual space after the function to be tested is imported, and the number of security vulnerabilities is counted as the number of security vulnerabilities; Step S32, in the first round of testing, the activation response time XYiu and the number of security vulnerabilities AQiu of each test of the function to be tested are obtained, where i is the number of the function to be tested, and u is the number of the first round of testing of the function to be tested; Step S33, the abnormality index DYu of the function to be tested in the software to be tested during each test is calculated by a formula, and the specific formula is as follows: DYiu=u1×XYiu+u2×AQiu, where u1 and u2 are weight coefficients with fixed values, and u2>u1; Step S34, if the abnormal index has a mode, then the mode of the abnormal index is taken as the test index for the function to be tested in the software to be tested; if the abnormal index does not have a mode, then the abnormal indexes in each test are summed and the average is taken as the test index for the function to be tested in the software to be tested; Step S35, if the test index is greater than or equal to the test threshold, the first round of testing of the function to be tested fails; if the test index is less than the abnormal threshold, the first round of testing of the function to be tested passes; Step S36, when all the functions to be tested in the software to be tested pass the first round of testing, user testing is performed; when any function to be tested in the software to be tested fails the first round of testing, a test abnormality signal is generated.
[0023] Step S4, performing user testing on the function to be tested in combination with the mobile Internet, obtaining a user test value of the function to be tested through the user testing, and generating a corresponding signal according to the user test value; The test process of the user test in step S4 is specifically as follows: Step S41, assembling the function to be tested into a test terminal for user testing, and distributing the test terminal to the test user; It should be noted that the real-time test data specifically includes the startup time, memory usage, number of freezes, and freeze duration of each freeze when the test terminal enables the corresponding function to be tested; Step S42, configuring a corresponding recording module in the test terminal, and using the recording module to collect real-time test data of the function to be tested; Step S43, obtaining the startup time QTi, memory occupancy rate NCi, number of freezes KCi and freeze duration of each freeze when the test terminal enables the corresponding function to be tested, and traversing and comparing the freeze duration of each freeze to obtain the maximum freeze duration KTi when the test terminal enables the corresponding function to be tested; Step S44, the user test value YCi of the test terminal corresponding to the function to be tested is calculated by a formula, and the specific formula is as follows: YCi=(KTi+QTi)×a1+(KCi+NCi)×a2; where a1 and a2 are weight coefficients with fixed values; Step S45, if the user test value is less than the user test threshold, a test abnormality signal is generated; If the user test value is greater than or equal to the user test threshold, a test normal signal is generated.
[0024] Due to the adoption of the technical solution of the present embodiment, by obtaining the functions to be tested that need to be tested in the software to be tested, the coupling degree between the functions to be tested and the conventional functions is calculated, and the coupling degree level is obtained according to the coupling degree. Then, based on the coupling degree level, the test cases corresponding to the different functions to be tested in the software to be tested and the test times of the test cases are set. During the actual test, the test cases are first used to perform the first round of testing on the different functions to be tested in the software to be tested, and the user test or the generation of the test abnormality signal is determined in combination with the results of the first round of testing. Then, the user test is performed on the functions to be tested in combination with the mobile Internet. The user test obtains the user test value of the function to be tested, and the corresponding signal is generated according to the user test value. The present invention combines the correlation analysis between the functional modules in the software and the related functional modules to realize the adaptation detection of the functions in the software.
[0025] In this application, if corresponding calculation formulas appear, the above calculation formulas are all dimensionless and take their numerical calculations. The weight coefficients, proportional coefficients and other coefficients in the formulas are set to a result value obtained by quantifying each parameter. The size of the weight coefficient and the proportional coefficient can be determined as long as it does not affect the proportional relationship between the parameter and the result value.
[0026] Example 3: Figure 4 As shown, this embodiment provides a computer device, which may include: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. The processor may call the logic instructions in the memory to execute a software testing method based on the mobile Internet, the method comprising: obtaining the functions to be tested in the software to be tested, recording the corresponding functions as the functions to be tested, and calculating the coupling degree between the functions to be tested and the conventional functions; setting the test cases corresponding to different functions to be tested in the software to be tested and the number of tests of the test cases based on the coupling degree level; using the test cases to perform the first round of testing on different functions to be tested in the software to be tested, and judging whether the functions to be tested are to be tested or to generate test abnormality signals in combination with the first round of testing results; performing user testing on the functions to be tested in combination with the mobile Internet, obtaining the user test value of the functions to be tested by the user test, and generating the corresponding signal according to the user test value.
[0027] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0028] Embodiment 3: The present application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a software testing method based on the mobile Internet provided by the above methods, the method including: obtaining the functions to be tested in the software to be tested, recording the corresponding functions as the functions to be tested, and calculating the coupling degree between the functions to be tested and the conventional functions; setting the test cases corresponding to different functions to be tested in the software to be tested and the number of tests of the test cases based on the coupling degree level; using the test cases to perform a first round of testing on different functions to be tested in the software to be tested, and judging whether the functions to be tested should be user tested or a test abnormality signal should be generated in combination with the results of the first round of testing; performing user testing on the functions to be tested in combination with the mobile Internet, obtaining the user test value of the function to be tested by the user test, and generating a corresponding signal based on the user test value.
[0029] Embodiment 4: The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned software testing method based on mobile Internet, the method comprising: obtaining the functions to be tested in the software to be tested, recording the corresponding functions as the functions to be tested, and calculating the degree of coupling between the functions to be tested and the conventional functions; setting the test cases corresponding to different functions to be tested in the software to be tested and the number of tests of the test cases based on the coupling degree level; using the test cases to perform a first round of testing on different functions to be tested in the software to be tested, and judging whether the functions to be tested should be user tested or a test abnormality signal should be generated in combination with the results of the first round of testing; performing user testing on the functions to be tested in combination with mobile Internet, obtaining user test values of the functions to be tested by the user test, and generating corresponding signals based on the user test values.
[0030] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0031] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0032] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A software testing method based on mobile Internet, characterized in that: The software testing method is as follows: Step S1, obtaining the functions to be tested in the software to be tested, recording the corresponding functions as the functions to be tested, and calculating the coupling degree between the functions to be tested and the conventional functions; Step S2, setting test cases corresponding to different functions to be tested in the software to be tested and the number of tests of the test cases based on the coupling degree level; Step S3, using the test cases to perform a first round of testing on different functions to be tested in the software to be tested, and combining the first round of test results to determine whether the functions to be tested should be tested by users or generate test abnormality signals; Step S4, performing user testing on the function to be tested in combination with the mobile Internet, obtaining a user test value of the function to be tested through the user testing, and generating a corresponding signal according to the user test value.
2. A software testing method based on mobile Internet according to claim 1, characterized in that: The step S1 includes the following sub-steps: Step S11, decomposing the software to be tested into functions to be tested and regular functions; Step S12, obtaining the number of calls corresponding to any regular function called by the function to be tested, and summing the number of calls to obtain the total number of calls of all regular functions called by the function to be tested; Step S13, calculating the coupling degree between the function to be tested and the normal function according to the coupling degree formula.
3. A software testing method based on mobile Internet according to claim 2, characterized in that: The step S2 includes the following sub-steps: Step S21, obtaining the coupling degree between the function to be tested and the conventional function; Step S22, if the coupling degree between the function to be tested and the conventional function is greater than or equal to a first coupling degree threshold, then the corresponding coupling degree level is determined to be a high coupling degree; If the coupling degree between the function to be tested and the conventional function is less than the first coupling degree threshold and greater than or equal to the second coupling degree threshold, the corresponding coupling degree level is determined to be medium coupling degree; If the coupling degree between the function to be tested and the conventional function is less than the second coupling degree threshold, the corresponding coupling degree level is determined to be low coupling degree; wherein the first coupling degree threshold is greater than the second coupling degree threshold; Step S23, setting test cases corresponding to different functions to be tested and the number of tests of the test cases based on the coupling degree level.
4. The software testing method based on mobile Internet according to claim 3, characterized in that: The correlation between the coupling level and the number of test cases is: When the coupling degree level is high coupling degree, the test number of the test case corresponding to the function to be tested is the first test number; When the coupling degree level is medium coupling degree, the number of tests for the test case corresponding to the function to be tested is the second number of tests; When the coupling degree level is low coupling degree, the number of tests of the test case corresponding to the function to be tested is the third number of tests; wherein the first number of tests is greater than the second number of tests, and the second number of tests is greater than the third number of tests.
5. A software testing method based on mobile Internet according to claim 4, characterized in that: The step S3 includes the following sub-steps: Step S31, obtaining a test case corresponding to the function to be tested, and then using the test case to perform a first round of testing on the function to be tested; Step S32, in the first round of testing, the activation response time XYiu and the number of security vulnerabilities AQiu of each test of the function to be tested are obtained, where i is the number of the function to be tested, and u is the number of the first round of testing of the function to be tested; Step S33, calculating the abnormality index DYu of the function to be tested in the software to be tested at each test by the formula DYiu=u1×XYiu+u2×AQiu; wherein u1 and u2 are weight coefficients with fixed values; Step S34, if the abnormal index has a mode, then the mode of the abnormal index is taken as the test index for the function to be tested in the software to be tested; if the abnormal index does not have a mode, then the abnormal indexes in each test are summed and the average is taken as the test index for the function to be tested in the software to be tested; Step S35, if the test index is greater than or equal to the test threshold, the first round of testing of the function to be tested fails; if the test index is less than the abnormal threshold, the first round of testing of the function to be tested passes; Step S36, when all the functions to be tested in the software to be tested pass the first round of testing, user testing is performed; when any function to be tested in the software to be tested fails the first round of testing, a test abnormality signal is generated.
6. A software testing method based on mobile Internet according to claim 5, characterized in that: The first round of testing includes the following sub-steps: Step S311, constructing a test space for the function to be tested, setting a controller in the test space, and importing the function to be tested and the test cases corresponding to the function to be tested into the test space; Step S312, perform the first round of testing on the function to be tested using the test case according to the number of tests, enable the function to be tested by controlling the air value, record the enabling time of the function to be tested, send a work instruction to the controller when the function to be tested is successfully enabled, record the time when the controller receives the work instruction as the start working time of the function to be tested, and subtract the enabling time from the start working time to obtain the enabling response time of the function to be tested; Step S313, testing the virtual space into which the function to be tested is imported through a test case, and the test case performs a security scan to obtain security vulnerabilities existing in the virtual space after the function to be tested is imported, and the number of security vulnerabilities is counted as the number of security vulnerabilities.
7. The software testing method based on mobile Internet according to claim 5, characterized in that: The test process of the user test in step S4 is specifically as follows: Step S41, assembling the function to be tested into a test terminal for user testing, and distributing the test terminal to the test user; Step S42, configuring a corresponding recording module in the test terminal, and using the recording module to collect real-time test data of the function to be tested; Step S43, obtaining the startup time QTi, memory occupancy rate NCi, number of freezes KCi and freeze duration of each freeze when the test terminal enables the corresponding function to be tested, and traversing and comparing the freeze duration of each freeze to obtain the maximum freeze duration KTi when the test terminal enables the corresponding function to be tested; Step S44, the user test value YCi of the test terminal corresponding to the function to be tested is calculated by a formula, and the specific formula is as follows: YCi=(KTi+QTi)×a1+(KCi+NCi)×a2; where a1 and a2 are weight coefficients with fixed values; Step S45, if the user test value is less than the user test threshold, a test abnormality signal is generated; If the user test value is greater than or equal to the user test threshold, a test normal signal is generated.
8. A software testing method based on mobile Internet according to claim 7, characterized in that: The real-time test data includes the startup time, memory usage, number of freezes, and freeze duration of each freeze when the test terminal enables the corresponding function to be tested.
9. A computer device, characterized in that: The computer device comprises: A memory storing a computer program; A processor is communicatively connected to the memory, and when the computer program is executed by the processor, the method described in any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Software testing methods and apparatus
CN108595332B
Cited By
Automatic test grading retry control method, system, equipment and medium
CN120407425A