CN111897727A - Software testing method and device, computer equipment and storage medium - Google Patents
Software testing method and device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN111897727A CN111897727A CN202010751979.1A CN202010751979A CN111897727A CN 111897727 A CN111897727 A CN 111897727A CN 202010751979 A CN202010751979 A CN 202010751979A CN 111897727 A CN111897727 A CN 111897727A
- Authority
- CN
- China
- Prior art keywords
- information
- version
- version software
- code execution
- full
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3676—Test management for coverage analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3696—Methods or tools to render software testable
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
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)
Abstract
The invention relates to the field of software testing, and discloses a software testing method, a device, computer equipment and a storage medium, wherein the method comprises the following steps: acquiring first version software information and second version software information; generating version differentiation information according to the first version software information and the second version software information; acquiring full code execution information, determining incremental code execution information according to version differentiation information and the full code execution information, wherein the full code execution information is acquired after a test case tests second version software information; and acquiring full functional relation call data of the second version software information, analyzing the incremental code execution information according to the full functional relation call data, and generating case test data. The invention can improve the test efficiency and test effectiveness of the incremental code.
Description
Technical Field
The present invention relates to the field of software testing, and in particular, to a software testing method and apparatus, a computer device, and a storage medium.
Background
In the field of software, with the great shortening of the updating period, developers need to spend a great deal of time on the research and development work of new versions; the number of testing tasks is also multiplied for the tester. The time for two parties to communicate is very limited.
Test cases are typically designed by testers based on their own experience and software requirements. Often, the test case cannot completely cover the new function of the new version. In the prior art, although some auxiliary testing tools exist, such as DEBUG tool (DEBUG tool), it can check whether the incremental code has bug (error or defect); as another example, a code coverage detection tool (e.g., xdebug), full code coverage may be obtained. However, the test range of the DEBUG tool is limited to the coverage area of the test case, and the uncovered area of the test case cannot be detected. For some non-new projects, the reference value provided by the full code coverage obtained by the code coverage detection tool is very limited.
Therefore, it is necessary to find a new testing method to improve the testing efficiency and testing effectiveness of the incremental code.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a software testing method, apparatus, computer device and storage medium to improve testing efficiency and testing validity of incremental code.
A software testing method, comprising:
acquiring first version software information and second version software information;
generating version differentiation information according to the first version software information and the second version software information;
acquiring full code execution information, and determining incremental code execution information according to the version differentiation information and the full code execution information, wherein the full code execution information is acquired after a test case tests the second version software information;
and acquiring the full functional relationship calling data of the second version software information, analyzing the incremental code execution information according to the full functional relationship calling data, and generating case test data.
A software testing apparatus comprising:
the software information acquisition module is used for acquiring first version software information and second version software information;
the generation differentiation information module is used for generating version differentiation information according to the first version software information and the second version software information;
an incremental code execution information determining module, configured to acquire full code execution information, and determine incremental code execution information according to the version differentiation information and the full code execution information, where the full code execution information is obtained after a test case tests the second version software information;
and the test data generation module is used for acquiring the full functional relationship calling data of the second version software information, analyzing the incremental code execution information according to the full functional relationship calling data and generating case test data.
A computer device comprising a memory, a processor and computer readable instructions stored in the memory and executable on the processor, the processor implementing the software testing method when executing the computer readable instructions.
A computer readable storage medium storing computer readable instructions which, when executed by a processor, implement the software testing method described above.
According to the software testing method, the software testing device, the computer equipment and the storage medium, the first version software information and the second version software information are obtained, wherein the first version software information can refer to the currently online software version, and the second version software information can refer to the currently tested software version. And generating version differentiation information according to the first version software information and the second version software information, wherein the version differentiation information is an incremental code of the second version software information relative to the first version software information. Acquiring full code execution information, and determining incremental code execution information according to the version differentiation information and the full code execution information, wherein the full code execution information is obtained after the second version software information is tested by a test case, and the incremental code execution information is test data related to the incremental code in the full code execution information. And acquiring full functional relation call data of the second version software information, analyzing the incremental code execution information according to the full functional relation call data, and generating case test data, wherein the case test data can be used for checking the coverage condition of the test case on the incremental code, so that the test condition of the incremental code is intuitively reflected, and the code error rate caused by the incremental code is reduced. The invention can improve the test efficiency and test effectiveness of the incremental code.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a diagram of an application environment of a software testing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a software testing method according to an embodiment of the present invention;
FIG. 3 is a flow chart of a software testing method according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a software testing method according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a software testing method according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating a software testing method according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a software testing apparatus according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a computer device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, 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.
The software testing method provided by the embodiment can be applied to the application environment shown in fig. 1, in which the client communicates with the server. The client includes, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server can be implemented by an independent server or a server cluster composed of a plurality of servers.
In an embodiment, as shown in fig. 2, a software testing method is provided, which is described by taking the application of the method to the server in fig. 1 as an example, and includes the following steps S10-S40.
S10, acquiring first version software information and second version software information;
in this embodiment, the first version software information refers to a software version used for comparison with the second version software information, and is generally a software version with better stability, for example, a software version that is currently online. The second version software information refers to the version of software used for the promotion, typically the new version that has just been developed. For example, the version number of the first version software information is v0.1993, and the version number of the second version software information is v 0.1995.
Optionally, as shown in fig. 3, step S10 includes:
s101, receiving an input instruction in a preset network architecture environment;
s102, importing the first version software information and the second version software information according to an input instruction.
In this embodiment, the preset network architecture environment may be Django. Django is an open source Web application framework written in Python language. The input instruction refers to a plurality of control instructions input by a tester through an input device in Django. The tester can create a page in Django and then import the first version of software information and the second version of software information to be tested into the page. The first version software information and the second version software information may be obtained according to a code library address included in the input instruction.
In steps S101-S102, an input command is received in a preset network architecture environment, where the test operation needs to be performed in a specific network architecture environment, and the network architecture environment adopted in this embodiment is Django. And importing the first version software information and the second version software information according to the input instruction to complete the input of different versions of software information, wherein the first version software information can refer to the currently online software version, and the second version software information can refer to the currently detected software version.
And S20, generating version differentiation information according to the first version software information and the second version software information.
In this embodiment, after the first version software information and the second version software information are obtained, the comparison tool may be used to compare the difference in content between the first version software information and the second version software information, so as to obtain version differentiation information. Version differentiation information includes, but is not limited to, file, code, submitter, time of submission.
Alternatively, as shown in fig. 4, step S20 includes:
s201, screening first comparison data from the first version software information according to a preset screening condition, and screening second comparison data from the second version software information;
s202, receiving a preset difference comparison instruction, comparing the first comparison data with the second comparison data according to the preset difference comparison instruction, and generating the version differentiation information.
In this embodiment, the preset screening condition may be set according to actual needs. The preset screening condition aims to filter files irrelevant to the incremental code, such as phpunit files, js files, test files, vendor public libraries and the like. And filtering files irrelevant to the incremental codes according to the preset screening condition by the first version software information to obtain first comparison data. And filtering the file irrelevant to the incremental code according to the second version software information according to a preset screening condition to obtain second comparison data. The first version software information and the second version software information are screened through the preset screening conditions, so that the comparison quantity of the first version software information and the second version software information can be greatly reduced, and the speed of generating version differentiation information is improved.
The preset difference comparison instruction refers to an instruction for comparing software version differences, such as a svn diff instruction or a git diff instruction, which can be executed in Django. The version differentiation information may include differentiation details of line codes. Specifically, in the version differentiation information, the addition is represented by + and the deletion is represented by, and the difference of the code line can be represented as: version number-file-old row number-new row number-change type. The version differentiation information may include several pieces of difference data, and each piece of difference data may be represented as: file, old line number, new line number, class, function name, system name.
In steps S201 to S202, first comparison data is screened from the first version software information according to a preset screening condition, and second comparison data is screened from the second version software information, so as to reduce the data amount of code comparison and improve the efficiency of generating version differentiation information. Receiving a preset difference comparison instruction, comparing the first comparison data with the second comparison data according to the preset difference comparison instruction, and generating version difference information, wherein the version difference information is an incremental code (not including a code screened by a preset screening condition) of the second version software information relative to the first version software information.
S30, acquiring full code execution information, and determining incremental code execution information according to the version differentiation information and the full code execution information, wherein the full code execution information is acquired after the second version software information is tested by a test case.
In this embodiment, the full code execution information refers to a test intermediate result obtained after the second version software information is tested by using the test case. The full code execution information may include the coverage, the number of executions, and the execution time of all code lines, the coverage, the number of executions, and the execution time of all functions, and the coverage, the number of executions, and the execution time of all branches. The full amount of code execution information can be obtained by a preset test tool. The test case refers to the description of a test task performed on a specific software product, and embodies test schemes, methods, techniques and strategies. Test cases include, but are not limited to, test objects, test environments, input data, test steps, expected results, test scripts.
Because the full code execution information contains the execution information of all the codes of the second version software information during testing, the incremental code execution information can be acquired according to the version differentiation information and the full code execution information. Specifically, the corresponding code execution information may be found from the full code execution information according to the code position included in the version differentiation information. All code lines in the version differentiation information can search corresponding code execution information in the full amount of code execution information. All the searched code execution information is the incremental code execution information.
Alternatively, as shown in fig. 5, step S30 includes:
s301, adding a monitoring code into the second version software information by using a preset instrumentation tool;
s302, when the test case is used for testing the second version software information, collecting execution data of all codes of the second version software information according to the monitoring codes;
and S303, after the test is finished, generating the full code execution information according to the execution data, wherein the full code execution information comprises line coverage, function coverage, branch coverage, line execution times, function execution times, branch execution times, line execution time, function execution time and branch execution time.
In this embodiment, the predetermined pile inserting tool may use a PHPUnit + Xdebug tool. PHPUnit is a lightweight PHP testing framework. The Xdebug is a PHP program debugger based on open source code, and can be used for tracking, debugging and analyzing the running condition of the PHP program. The Xdebug can be extended over PHPUnit to obtain code execution data.
Specifically, a PHP file, such as named coverage, may be created, wherein an instrumentation code, such as xdebug _ start _ code _ coverage (), is added to the coverage file, and then the coverage file is retrieved in the first row of the index. After the test is completed, the coverage file contains the full code execution information. The full code execution information comprises line coverage, function coverage, branch coverage, line execution times, function execution times, branch execution times, line execution time, function execution time and branch execution time.
In steps S301 to S303, a monitoring code is added to the second version software information by using a preset instrumentation tool, where the execution of the code can be performed by the monitoring code. When the test case is used for testing the second version software information, the execution data of all codes of the second version software information is collected according to the monitoring codes, wherein the execution data comprises but is not limited to the execution times of the codes and error information. And after the test is finished, generating the full code execution information according to the execution data, wherein the full code execution information comprises line coverage, function coverage, branch coverage, line execution times, function execution times, branch execution times, line execution time, function execution time and branch execution time, the full code execution information is complete test data generated after the test of the test case, the content is more, and the test data does not distinguish the incremental code from the non-incremental code.
And S40, acquiring the full function relation call data of the second version software information, analyzing the incremental code execution information according to the full function relation call data, and generating case test data.
In this embodiment, the full amount of function relationship calling data may be an analysis result obtained by analyzing the second version software information using a preset performance analysis tool.
After the full-scale functional relationship call data is obtained, the incremental code execution information can be analyzed in Python based on the functional call relationship contained in the full-scale functional relationship call data, and case test data is obtained. The case test data includes, but is not limited to, incremental code coverage, incremental code execution time, and incremental code execution times.
By performing information analysis on the incremental code, the execution conditions of all functions can be analyzed, and executed functions and unexecuted functions can be screened out. For example, after parsing, it is found that the a function is not executed, and a function associated with a, such as B, C, D function, can be known based on the function call relation. Therefore, new test cases need to be added to test the four functions. In some cases, the total number of executable test paths and the number of executed test paths may be calculated according to the incremental code execution information and the full-scale function relationship call data, and whether a new test case needs to be added is determined according to a ratio between the number of executed test paths and the total number of executable test paths.
In other cases, the execution efficiency of the code may be judged according to the execution time, and the code with too long execution time may be optimized. The execution code of the core can also be determined according to the execution times, and the maintenance of the execution code of the part of the core is strengthened.
In steps S10-S40, first version software information and second version software information are obtained, where the first version software information may refer to a currently online software version and the second version software information may refer to a currently detected software version. And generating version differentiation information according to the first version software information and the second version software information, wherein the version differentiation information is an incremental code of the second version software information relative to the first version software information. Acquiring full code execution information, and determining incremental code execution information according to the version differentiation information and the full code execution information, wherein the full code execution information is obtained after the second version software information is tested by a test case, and the incremental code execution information is test data related to the incremental code in the full code execution information. And acquiring full functional relation call data of the second version software information, analyzing the incremental code execution information according to the full functional relation call data, and generating case test data, wherein the case test data can be used for checking the coverage condition of the test case on the incremental code, so that the test condition of the incremental code is intuitively reflected, and the code error rate caused by the incremental code is reduced.
Alternatively, as shown in fig. 6, step S40 includes:
s401, analyzing the second version software information according to a preset performance analysis tool to generate the full-scale functional relation call data;
s402, analyzing the incremental code execution information according to the full function relation call data, and obtaining a test page related to the incremental code execution information and page execution information corresponding to the test page;
and S403, generating the case test data according to the test page and the page execution information.
In this embodiment, the predetermined performance analysis tool may be XHProf. XHProf is a layered PHP performance analysis tool and can analyze the function called by each function body in the second version software information. The full amount of data for a functional relationship call may be represented by a tree-like representation of the functional relationship call graph.
In the analysis process, the incremental code execution information can be split according to time sequence based on the test steps of the test case to obtain the code execution information of each test step, and each test step corresponds to one test page. And analyzing the code execution information related to each test page by using the full functional relationship calling data to obtain the page execution information of the test page. The page execution information may include page code coverage information.
The use case test data can be generated according to the test page and the page execution information. Here, the use case test data may be a test report. The use case test data may include a visual image of a plurality of test pages. The color of the visual image (which may be the background color, the font color, or identified as needed) may be set according to the page code coverage rate information. If the test page does not involve the incremental code, the page background color may be set to gray; the page code coverage rate is 0-30%, and the page background color can be set to be green; the page code coverage rate is 30-70%, and the page background color can be set to be yellow; the page code coverage rate is 70-100%, and the page background color can be set to be red.
In steps S401 to S403, the second version software information is analyzed according to a preset performance analysis tool, and the full-scale functional relationship call data is generated, where the application layer objects such as the business process module, the test page, and the like corresponding to each function and code can be located by the full-scale functional relationship call data, so as to improve the readability of the case test data. Analyzing the incremental code execution information according to the full functional relationship calling data to obtain a test page related to the incremental code execution information and page execution information corresponding to the test page, wherein the incremental code execution information is divided by taking the test page as a unit, so that the quantity of the incremental codes contained in each test page and the corresponding test condition can be clearly analyzed. And generating the use case test data according to the test pages and the page execution information, wherein the use case test data can reflect the test condition of the incremental code on each test page, so that the test efficiency of the incremental code is greatly improved, the increment code can be conveniently found whether to make mistakes or not in time, and the effectiveness of software test is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In an embodiment, a software testing apparatus is provided, and the software testing apparatus corresponds to the software testing methods in the above embodiments one to one. As shown in fig. 7, the software testing apparatus includes a module for acquiring software information 10, a module for generating differential information 20, a module for determining incremental code execution information 30, and a module for generating test data 40. The functional modules are explained in detail as follows:
an acquiring software information module 10, configured to acquire first version software information and second version software information;
a difference information generating module 20, configured to generate difference information according to the first version software information and the second version software information;
an incremental code execution information determining module 30, configured to obtain full code execution information, and determine incremental code execution information according to the version differentiation information and the full code execution information, where the full code execution information is obtained after a test case tests the second version software information;
and the test data generation module 40 is configured to acquire full functional relationship call data of the second version software information, analyze the incremental code execution information according to the full functional relationship call data, and generate case test data.
Optionally, the software information obtaining module 10 includes:
the system comprises an input unit, a processing unit and a control unit, wherein the input unit is used for receiving an input instruction in a preset network architecture environment;
and the importing unit is used for importing the first version software information and the second version software information according to an input instruction.
Optionally, the module for generating differential information 20 includes:
the screening unit is used for screening first comparison data from the first version software information according to preset screening conditions and screening second comparison data from the second version software information;
receiving a preset difference comparison instruction, comparing the first comparison data with the second comparison data according to the preset difference comparison instruction, and generating the version differentiation information.
Optionally, the module 30 for determining incremental code execution information includes:
the instrumentation unit is used for adding a monitoring code into the second version software information by using a preset instrumentation tool;
a measurement data collecting unit, configured to collect, according to the monitoring code, execution data of all codes of the second version software information when the second version software information is tested using the test case;
and the generation total code execution information unit is used for generating the total code execution information according to the execution data after the test is finished, wherein the total code execution information comprises row coverage rate, function coverage rate, branch coverage rate, row execution times, function execution times, branch execution times, row execution time, function execution time and branch execution time.
Optionally, the module 40 for generating test data includes:
the relationship analysis unit is used for analyzing the second version software information according to a preset performance analysis tool to generate the full-scale functional relationship calling data;
the page analysis unit is used for analyzing the incremental code execution information according to the full functional relationship calling data to obtain a test page related to the incremental code execution information and page execution information corresponding to the test page;
and the test data generating unit is used for generating the case test data according to the test page and the page execution information.
For the specific definition of the software testing device, reference may be made to the definition of the software testing method above, and details are not described here. The modules in the software testing device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 8. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer readable instructions, and a database. The internal memory provides an environment for the operating system and execution of computer-readable instructions in the non-volatile storage medium. The database of the computer device is used for storing the data related to the software testing method. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer readable instructions, when executed by a processor, implement a software testing method.
In one embodiment, a computer device is provided, comprising a memory, a processor, and computer readable instructions stored on the memory and executable on the processor, the processor when executing the computer readable instructions implementing the steps of:
acquiring first version software information and second version software information;
generating version differentiation information according to the first version software information and the second version software information;
acquiring full code execution information, and determining incremental code execution information according to the version differentiation information and the full code execution information, wherein the full code execution information is acquired after a test case tests the second version software information;
and acquiring the full functional relationship calling data of the second version software information, analyzing the incremental code execution information according to the full functional relationship calling data, and generating case test data.
In one embodiment, one or more computer-readable storage media storing computer-readable instructions are provided, the readable storage media provided by the embodiments including non-volatile readable storage media and volatile readable storage media. The readable storage medium has stored thereon computer readable instructions which, when executed by one or more processors, perform the steps of:
acquiring first version software information and second version software information;
generating version differentiation information according to the first version software information and the second version software information;
acquiring full code execution information, and determining incremental code execution information according to the version differentiation information and the full code execution information, wherein the full code execution information is acquired after a test case tests the second version software information;
and acquiring the full functional relationship calling data of the second version software information, analyzing the incremental code execution information according to the full functional relationship calling data, and generating case test data.
It will be understood by those of ordinary skill in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware associated with computer readable instructions, which can be stored in a non-volatile computer readable storage medium, and when executed, can include processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.
Claims (10)
1. A software testing method, comprising:
acquiring first version software information and second version software information;
generating version differentiation information according to the first version software information and the second version software information;
acquiring full code execution information, and determining incremental code execution information according to the version differentiation information and the full code execution information, wherein the full code execution information is acquired after a test case tests the second version software information;
and acquiring the full functional relationship calling data of the second version software information, analyzing the incremental code execution information according to the full functional relationship calling data, and generating case test data.
2. The software testing method of claim 1, wherein the obtaining the first version software information and the second version software information comprises:
receiving an input instruction in a preset network architecture environment;
and importing the first version software information and the second version software information according to an input instruction.
3. The software testing method of claim 1, wherein the generating version differentiation information from the first version software information and the second version software information comprises:
screening first comparison data from the first version software information according to a preset screening condition, and screening second comparison data from the second version software information;
receiving a preset difference comparison instruction, comparing the first comparison data with the second comparison data according to the preset difference comparison instruction, and generating the version differentiation information.
4. The software testing method according to claim 1, wherein the obtaining of the full code execution information, determining the incremental code execution information according to the version differentiation information and the full code execution information, and obtaining the full code execution information after the second version software information is tested by the test case comprises:
adding a monitoring code into the second version software information by using a preset instrumentation tool;
when the test case is used for testing the second version software information, the execution data of all codes of the second version software information is collected according to the monitoring codes;
and after the test is finished, generating the full code execution information according to the execution data, wherein the full code execution information comprises line coverage, function coverage, branch coverage, line execution times, function execution times, branch execution times, line execution time, function execution time and branch execution time.
5. The software testing method of claim 1, wherein the obtaining of the full amount of the functional relationship call data of the second version of the software information, the analyzing of the incremental code execution information according to the full amount of the functional relationship call data, and the generating of the use case test data comprises:
analyzing the second version software information according to a preset performance analysis tool to generate the full-scale functional relationship calling data;
analyzing the incremental code execution information according to the full functional relationship calling data to obtain a test page related to the incremental code execution information and page execution information corresponding to the test page;
and generating the case test data according to the test page and the page execution information.
6. A software testing apparatus, comprising:
the software information acquisition module is used for acquiring first version software information and second version software information;
the generation differentiation information module is used for generating version differentiation information according to the first version software information and the second version software information;
an incremental code execution information determining module, configured to acquire full code execution information, and determine incremental code execution information according to the version differentiation information and the full code execution information, where the full code execution information is obtained after a test case tests the second version software information;
and the test data generation module is used for acquiring the full functional relationship calling data of the second version software information, analyzing the incremental code execution information according to the full functional relationship calling data and generating case test data.
7. The software testing apparatus of claim 6, wherein the get software information module comprises:
the system comprises an input unit, a processing unit and a control unit, wherein the input unit is used for receiving an input instruction in a preset network architecture environment;
and the importing unit is used for importing the first version software information and the second version software information according to an input instruction.
8. The software testing apparatus of claim 6, wherein the generate differentiation information module comprises:
the screening unit is used for screening first comparison data from the first version software information according to preset screening conditions and screening second comparison data from the second version software information;
receiving a preset difference comparison instruction, comparing the first comparison data with the second comparison data according to the preset difference comparison instruction, and generating the version differentiation information.
9. A computer device comprising a memory, a processor and computer readable instructions stored in the memory and executable on the processor, wherein the processor when executing the computer readable instructions implements a software testing method as claimed in any one of claims 1 to 5.
10. One or more readable storage media storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the software testing method of any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010751979.1A CN111897727A (en) | 2020-07-30 | 2020-07-30 | Software testing method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010751979.1A CN111897727A (en) | 2020-07-30 | 2020-07-30 | Software testing method and device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111897727A true CN111897727A (en) | 2020-11-06 |
Family
ID=73182568
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010751979.1A Pending CN111897727A (en) | 2020-07-30 | 2020-07-30 | Software testing method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111897727A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112596994A (en) * | 2020-12-25 | 2021-04-02 | 福州掌中云科技有限公司 | XHProf-based PHP program performance detection method and device |
CN112650670A (en) * | 2020-12-17 | 2021-04-13 | 京东数科海益信息科技有限公司 | Application testing method, device, system, electronic equipment and storage medium |
CN113448862A (en) * | 2021-07-12 | 2021-09-28 | 上海哔哩哔哩科技有限公司 | Software version testing method and device and computer equipment |
CN114036063A (en) * | 2021-11-30 | 2022-02-11 | 中国平安人寿保险股份有限公司 | Method, device, device and medium for improving code test coverage |
CN114253850A (en) * | 2021-12-20 | 2022-03-29 | 平安证券股份有限公司 | Code incremental coverage rate statistical method, device, equipment and storage medium |
CN114676058A (en) * | 2022-03-30 | 2022-06-28 | 北京奇艺世纪科技有限公司 | A coverage determination method, device, electronic device and storage medium |
CN115858348A (en) * | 2022-11-24 | 2023-03-28 | 上海浦东发展银行股份有限公司 | Testing workload evaluation method, equipment and medium based on bytecode |
CN117112398A (en) * | 2023-07-11 | 2023-11-24 | 贝壳找房(北京)科技有限公司 | Incremental code coverage rate detection method and device, electronic equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102722436A (en) * | 2012-05-29 | 2012-10-10 | 百度在线网络技术(北京)有限公司 | Statistical method and device for incremental coverage information |
CN105302710A (en) * | 2014-07-03 | 2016-02-03 | 腾讯科技(深圳)有限公司 | Method and apparatus for determining test case in need of regression testing |
CN106528399A (en) * | 2015-09-15 | 2017-03-22 | 腾讯科技(深圳)有限公司 | Test case determination method and apparatus |
CN109240911A (en) * | 2018-08-13 | 2019-01-18 | 腾讯科技(北京)有限公司 | Accurate test method, device and computer equipment |
CN109542761A (en) * | 2018-10-11 | 2019-03-29 | 平安科技(深圳)有限公司 | Evaluation of Software Quality, device and storage medium |
CN110597710A (en) * | 2019-08-13 | 2019-12-20 | 平安证券股份有限公司 | Test coverage rate statistical method and device, computer equipment and storage medium |
CN111026647A (en) * | 2019-11-21 | 2020-04-17 | 广州品唯软件有限公司 | Code coverage rate obtaining method and device, computer equipment and storage medium |
-
2020
- 2020-07-30 CN CN202010751979.1A patent/CN111897727A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102722436A (en) * | 2012-05-29 | 2012-10-10 | 百度在线网络技术(北京)有限公司 | Statistical method and device for incremental coverage information |
CN105302710A (en) * | 2014-07-03 | 2016-02-03 | 腾讯科技(深圳)有限公司 | Method and apparatus for determining test case in need of regression testing |
CN106528399A (en) * | 2015-09-15 | 2017-03-22 | 腾讯科技(深圳)有限公司 | Test case determination method and apparatus |
CN109240911A (en) * | 2018-08-13 | 2019-01-18 | 腾讯科技(北京)有限公司 | Accurate test method, device and computer equipment |
CN109542761A (en) * | 2018-10-11 | 2019-03-29 | 平安科技(深圳)有限公司 | Evaluation of Software Quality, device and storage medium |
CN110597710A (en) * | 2019-08-13 | 2019-12-20 | 平安证券股份有限公司 | Test coverage rate statistical method and device, computer equipment and storage medium |
CN111026647A (en) * | 2019-11-21 | 2020-04-17 | 广州品唯软件有限公司 | Code coverage rate obtaining method and device, computer equipment and storage medium |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112650670A (en) * | 2020-12-17 | 2021-04-13 | 京东数科海益信息科技有限公司 | Application testing method, device, system, electronic equipment and storage medium |
CN112596994A (en) * | 2020-12-25 | 2021-04-02 | 福州掌中云科技有限公司 | XHProf-based PHP program performance detection method and device |
CN113448862A (en) * | 2021-07-12 | 2021-09-28 | 上海哔哩哔哩科技有限公司 | Software version testing method and device and computer equipment |
CN113448862B (en) * | 2021-07-12 | 2022-08-02 | 上海哔哩哔哩科技有限公司 | Software version testing method and device and computer equipment |
CN114036063A (en) * | 2021-11-30 | 2022-02-11 | 中国平安人寿保险股份有限公司 | Method, device, device and medium for improving code test coverage |
CN114253850A (en) * | 2021-12-20 | 2022-03-29 | 平安证券股份有限公司 | Code incremental coverage rate statistical method, device, equipment and storage medium |
CN114676058A (en) * | 2022-03-30 | 2022-06-28 | 北京奇艺世纪科技有限公司 | A coverage determination method, device, electronic device and storage medium |
CN115858348A (en) * | 2022-11-24 | 2023-03-28 | 上海浦东发展银行股份有限公司 | Testing workload evaluation method, equipment and medium based on bytecode |
CN115858348B (en) * | 2022-11-24 | 2024-05-31 | 上海浦东发展银行股份有限公司 | Test workload assessment method, device and medium based on byte codes |
CN117112398A (en) * | 2023-07-11 | 2023-11-24 | 贝壳找房(北京)科技有限公司 | Incremental code coverage rate detection method and device, electronic equipment and storage medium |
CN117112398B (en) * | 2023-07-11 | 2024-04-16 | 贝壳找房(北京)科技有限公司 | Incremental code coverage rate detection method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111897727A (en) | Software testing method and device, computer equipment and storage medium | |
US9898387B2 (en) | Development tools for logging and analyzing software bugs | |
US8966449B2 (en) | Test case pattern matching | |
US7503037B2 (en) | System and method for identifying bugs in software source code, using information from code coverage tools and source control tools to determine bugs introduced within a time or edit interval | |
US9239773B1 (en) | Method and system for debugging a program that includes declarative code and procedural code | |
CN103631720A (en) | Method and device for generating test case | |
CN110704297A (en) | Code evaluation method and device, computer equipment and storage medium | |
CN109766261B (en) | Coverage test method, coverage test device, computer equipment and storage medium | |
US10209984B2 (en) | Identifying a defect density | |
CN111797026A (en) | Test case generation method and device, computer equipment and storage medium | |
CN111026647B (en) | Method and device for acquiring code coverage rate, computer equipment and storage medium | |
CN103186463B (en) | Determine the method and system of the test specification of software | |
Abdeen et al. | An approach for performance requirements verification and test environments generation | |
Han et al. | A systematic mapping study of software performance research | |
CN114490337A (en) | Commissioning method, commissioning platform, equipment and storage medium | |
CN110232018A (en) | Interface test method, device, computer equipment | |
US8930765B2 (en) | Systems and methods for feedback driven regression testing | |
CN119065650A (en) | A code generation method, device and equipment based on multi-agent language system | |
JP2023000907A (en) | Source code correction support device and source code correction support method | |
Querel et al. | Warning-introducing commits vs bug-introducing commits: A tool, statistical models, and a preliminary user study | |
CN112416781B (en) | Cross-system interface determination method, device, computer equipment and storage medium | |
CN115934500A (en) | Pipeline construction method and device, computer equipment and storage medium | |
CN114996148A (en) | Automatic testing method and device based on pyspark, computer equipment and storage medium | |
CN113220586A (en) | Automatic interface pressure test execution method, device and system | |
Yousaf et al. | Efficient Identification of Race Condition Vulnerability in C code by Abstract Interpretation and Value Analysis |
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 |