CN112181851A - Software testing method, device and storage medium - Google Patents

Software testing method, device and storage medium Download PDF

Info

Publication number
CN112181851A
CN112181851A CN202011165816.1A CN202011165816A CN112181851A CN 112181851 A CN112181851 A CN 112181851A CN 202011165816 A CN202011165816 A CN 202011165816A CN 112181851 A CN112181851 A CN 112181851A
Authority
CN
China
Prior art keywords
function
target test
instruction
copy
tested
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011165816.1A
Other languages
Chinese (zh)
Other versions
CN112181851B (en
Inventor
曹军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202011165816.1A priority Critical patent/CN112181851B/en
Publication of CN112181851A publication Critical patent/CN112181851A/en
Application granted granted Critical
Publication of CN112181851B publication Critical patent/CN112181851B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the disclosure provides a software testing method, a device and a storage medium, wherein the method comprises the following steps: according to a target test function in software to be tested, a copy function which is the same as the target test function is generated, the target test function is edited, the function to be tested is generated, according to a preset test case, a first call instruction in the function to be tested is executed, a universal stub function corresponding to the function to be tested is called, a second call instruction in the universal stub function is executed, a first function corresponding to the copy function called by the universal stub function is executed, or a second function corresponding to the universal stub function is executed. Because the copy function which is the same as the target test function is generated in advance, when the target test function is subjected to multi-thread test, the called universal stub function replaces the call-back target test function through the call-back copy function, and therefore logic errors caused by simultaneous modification and calling of the target test function in multi-thread mode are avoided.

Description

Software testing method, device and storage medium
Technical Field
The disclosed embodiments relate to the field of computer technologies, and in particular, to a software testing method, a software testing device, and a storage medium.
Background
Before the software is put into operation, the software needs to be tested. In the testing process, unit testing refers to checking and verifying the minimum testable unit in software, such as testing a function, a class, or a functional window. The unit test is the lowest level test activity to be performed in the software development process, an independent unit of the software is tested under the condition of being isolated from other parts of a program, and the unit test is a key link for ensuring that the developed software can normally and stably run and form a deliverable version.
At present, in the unit test process of software test, the unit test of the target test function is often realized by combining the stub function, and the test isolation of the test unit can be executed by using the stub function. In the process of carrying out unit test in a non-intrusive mode, the target test function needs to insert a call instruction to call the stub function, and call the target test function back or execute other functions through the call instruction in the stub function.
However, in a multi-thread scenario, a stub function is called by inserting a call instruction, which may result in missed stubs of a target test function, so that the execution of a test case is biased, resulting in an error in unit testing.
Disclosure of Invention
The embodiment of the disclosure provides a software testing method, a device and a storage medium, so as to solve the problem that unit testing is wrong due to deviation of execution of a test case in a software unit testing process in a multi-thread scene.
In a first aspect, an embodiment of the present disclosure provides a software testing method, including:
generating a copy function which is the same as a target test function according to the target test function in software to be tested;
editing the target test function to generate a function to be tested;
executing a first calling instruction in the function to be tested according to a preset test case so as to call a universal stub function corresponding to the function to be tested;
and executing a second calling instruction in the universal stub function, and executing a first function corresponding to the copy function called by the universal stub function, or executing a second function corresponding to the universal stub function.
In a second aspect, an embodiment of the present disclosure provides a software testing apparatus, including:
the copying unit is used for generating a copying function which is the same as the target testing function according to the target testing function in the software to be tested;
the editing unit is used for editing the target test function to generate a function to be tested;
the calling unit is used for executing a first calling instruction in the function to be tested according to a preset test case so as to call a universal stub function corresponding to the function to be tested;
and the execution unit is used for executing a second calling instruction in the general stub function, and executing a first function corresponding to the copy function called by the general stub function, or executing a second function corresponding to the general stub function.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes computer-executable instructions stored by the memory to cause the at least one processor to perform the software testing method as described above in the first aspect and in various possible designs of the first aspect.
In a fourth aspect, the embodiments of the present disclosure provide a computer-readable storage medium, in which computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the software testing method according to the first aspect and various possible designs of the first aspect are implemented.
The software testing method, the software testing equipment and the storage medium provided by the embodiment comprise the following steps: generating a copy function which is the same as a target test function according to the target test function in software to be tested; editing the target test function to generate a function to be tested; executing a first calling instruction in the function to be tested according to a preset test case so as to call a universal stub function corresponding to the function to be tested; and executing a second calling instruction in the universal stub function, and executing a first function corresponding to the copy function called by the universal stub function, or executing a second function corresponding to the universal stub function. Because the copy function which is the same as the target test function is generated in advance according to the target test function, when the multithreading test is carried out on the target test function, the called general stub function replaces the callback target test function through the callback copy function, and therefore, the logic error caused by the simultaneous modification and calling of the multithreading to the target test function is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and for those skilled in the art, other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1a is a diagram illustrating a unit testing method in a single-threaded scenario in the prior art;
FIG. 1b is a diagram illustrating a method for testing units in a multi-thread scenario in the prior art;
fig. 2 is a first schematic flowchart of a software testing method according to an embodiment of the present disclosure;
FIG. 3 is a diagram illustrating execution of a second call instruction in a stub function according to an embodiment of the present disclosure;
fig. 4 is a second flowchart illustrating a software testing method according to an embodiment of the present disclosure;
FIG. 5 is a flowchart of step S201 in the embodiment shown in FIG. 4;
FIG. 6 is a flowchart of step S202 in the embodiment shown in FIG. 4;
FIG. 7 is a flowchart of step S204 in the embodiment shown in FIG. 4;
FIG. 8 is a block diagram of a software testing device according to an embodiment of the present disclosure;
fig. 9 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
Fig. 1a is an exemplary diagram of a unit testing method in a single-threaded scenario in the prior art. Referring to fig. 1a, in the prior art, in a unit test process of a software test, a stub function is often used in combination to implement a unit test on a target test function, and a test isolation of a functional unit can be implemented using the stub function. In the process of carrying out unit test in a non-intrusive mode, a target test function needs to insert a call instruction of the target test function to call a stub function, and the target test function is called back or other functions are executed through the stub function call instruction in the stub function, referring to fig. 1a, after the target test function calls the stub function, the call instruction in the stub function in a test case a can call back the target test function to execute a function a of the target test function; the call instruction in the stub function executes its own B function in the test case B. In a single-thread scenario, as shown in fig. 1a, a test case a and a test case b are sequentially executed, that is, in the test case a, a calling function is first inserted into a target test function to call a stub function; when the pile function calls back the target test function, the previously inserted calling function of the target test function is removed from the target test function, repeated calling is avoided, and only the functional instruction in the target test function is executed, so that the A function of the target test function is realized. When the test case B is carried out, inserting the calling function into the target test function again to call the stub function and execute the B function of the stub function.
FIG. 1b is a diagram illustrating a unit testing method in a multi-thread scenario in the prior art. Referring to fig. 1b, in a multi-thread scenario, multiple threads may call a target test function at the same time (out of order), and taking the test case a and the test case b in fig. 1a as an example, the test case a and the test case b may execute out of order and call and modify the target test function out of order, for example, when the target test function is modified by calling back the target test function by a stub function in the test case a, it is likely that the target test function also needs to be modified by the test case b. Furthermore, because the unit test is a part of the software test before the software is put into use, errors such as pile missing and the like occur in the unit test, the errors occur in the subsequent integration test of the software, the difficulty of correcting the errors is higher, the cost is higher, the comprehensive cost in the software development process is improved, and the probability of problems occurring in the software use process is also improved.
The embodiment of the present disclosure provides a software testing method to solve the above problems.
Referring to fig. 2, fig. 2 is a first schematic flowchart of a software testing method according to an embodiment of the present disclosure. The method of the embodiment can be applied to electronic equipment for software testing, and the software testing method comprises the following steps:
s101: and generating a copy function which is the same as the target test function according to the target test function in the software to be tested.
Specifically, the target test function is a functional module in the software to be tested, that is, a functional unit that needs to perform unit testing, and the target test function is a program or code that can be referred to by other codes or programs. The target test function may be a function (function) in a code form, a subroutine, or a method in object-oriented programming, according to the function and implementation manner of the specific implementation in software. The target test function is generally determined and set by a user according to needs, and specific contents of the target test function are not limited herein.
The copy function is a function obtained by backing up or copying the target test function, and the copy function may be a function obtained by compiling and functionally identical to the target test function, or a function in which an internal instruction and a code are completely identical to the target test function.
S102: and editing the target test function to generate a function to be tested.
Illustratively, in the process of carrying out the unit test in a non-intrusive mode, the target test function needs to insert a call instruction to call the universal stub function, edit the target test function, namely, the process of inserting the call instruction, so as to solve the problem that an external called function exists in the target test function. Illustratively, a call instruction may be used to execute program code for an address jump, by which a target test function may be caused to jump to a corresponding stub function when executed. The target test function of the inserted call instruction is the function to be tested.
Illustratively, the implementation of the insert call instruction includes: and acquiring an instruction starting position of the target test function, and inserting a first call instruction at the instruction starting position to generate the function to be tested. Specifically, the target test function includes a plurality of instruction lines, and an instruction start position of the target test function, that is, an instruction line located in a start position area among the plurality of instruction lines of the target test function. It should be noted that the instruction start position is not limited to the first line of all instruction lines, and may be any instruction line position before another instruction line for implementing the main function of the target test function, and may be specifically set according to the instruction content of the target test function, and is not limited herein.
It should be noted that, besides the insertion of the call function, there are other methods for editing the target test function to generate the function to be tested, for example, initializing the target test function, or inputting different parameters, and using a conditional statement in the target test function to make the target test function jump to the corresponding general stub function when the target test function is executed, where a specific implementation manner for editing the target test function is not limited.
S103: and executing a first calling instruction in the function to be tested according to a preset test case so as to call the universal stub function corresponding to the function to be tested.
The universal stub function is an entity simulating a specific functional module and is used for replacing a sub-module needing to be called in the target test function. The stub function is the concept in white-box testing, i.e. replacing the function currently needing testing by some self-defined test function. By using the stub function, the isolation test of the functional unit can be realized, the coupling between different units is reduced, and an error source can be better found in the unit test process of software.
The test case is a description of a test task for a specific software product and function, and embodies a test scheme, a method, a technology and a strategy. A test case is a set of test inputs, execution conditions, and expected results tailored for a particular purpose to verify that a particular software function and requirement is met. The test case is, for example, information, data, or script that is preset by a user and is set in the electronic device that executes the unit test method provided in this embodiment, and is used to test the target test function.
The specific method for testing the target test function is recorded in the test case, and the function to be tested can be called and an input value can be obtained by the function to be tested according to the test case. Of course, according to the specific situation of the function to be tested, the function to be tested may also have no input value, for example, the function to be tested is a parameterless function; here, no particular limitation is imposed.
And after the function to be tested is called, starting to execute the instruction in the function to be tested. Specifically, the function to be tested comprises one or more instructions, and the instructions can be one-line or multi-run sequential codes; the first call instruction is one or more instructions used for calling the universal stub function in the function to be tested, the first call instruction is executed, and the universal stub function can be called in a parameter or parameter-free mode.
Optionally, according to a preset test case, executing a first call instruction in the function to be tested to call a universal stub function corresponding to the function to be tested, including: executing a first call instruction in a function to be tested to obtain a first function execution address and a first function execution parameter; and calling the universal stub function corresponding to the first function execution address according to the first function execution parameter.
Specifically, the first function execution address is a position of the universal stub function in the function to be tested, more specifically, for example, a code line position of the universal stub function, and the first function execution parameter is an input parameter for inputting the universal stub function.
S104: and executing a second calling instruction in the universal stub function, and executing a first function corresponding to the copy function called by the universal stub function, or executing a second function corresponding to the universal stub function.
Specifically, the stub function also includes one or more instructions, and different instructions correspond to different execution contents, thereby implementing different functions. For example, instruction a is used to cause the universal stub function to output a prompt of "error"; the instruction B is used for calling a function _ a in the universal stub function; instruction C is used to call a target test function within the generic stub function. The second calling instruction is one or more instructions in the universal stub function, wherein the second calling instruction at least comprises an instruction for calling the copy function and a function for realizing the universal stub function. According to different input parameters received by the universal stub function, the second call instruction in the universal stub function can correspondingly realize different functions. Fig. 3 is a schematic diagram of executing a second call instruction in a stub function according to an embodiment of the present disclosure, and referring to fig. 3, for example, a first function corresponding to a copy function called by the stub function may be executed through the second call instruction, where the first function is, for example, a function of querying a database; alternatively, the second call instruction may execute a second function of the stub function itself, for example, a function of outputting an "error" notification message through the stub function.
The copy function and the target test function are the same function obtained by copying, so that the first function corresponding to the copy function is the corresponding first function of the target test function, and the implementation result of the first function can show whether the function of the target test function is normal or not. In a multi-thread scenario, multiple threads can call the copy function at the same time, and execute a first function corresponding to the copy function or a second function of the universal stub function according to, for example, a conditional statement or logic judgment in the universal stub function, so that the step of modifying the target test function and calling the function is avoided, and logic conflict caused by multi-thread calling is also avoided.
After the second call instruction is executed, the first function or the second function is realized, and according to the output result corresponding to the first function and the second function, the expected output result recorded in the test case is contrasted, so that whether the function of the target test unit in the test case is normal can be determined, and the unit test of the target test unit is realized.
In the embodiment, a copy function which is the same as the target test function is generated according to the target test function in the software to be tested; editing the target test function to generate a function to be tested; executing a first calling instruction in a function to be tested according to a preset test case so as to call a universal stub function corresponding to the function to be tested; and executing a second calling instruction in the universal stub function, and executing a first function corresponding to the copy function called by the universal stub function, or executing a second function corresponding to the universal stub function. Because the copy function which is the same as the target test function is generated in advance according to the target test function, when the multithreading test is carried out on the target test function, the called general stub function replaces the callback target test function through the callback copy function, and therefore, the logic error caused by the simultaneous modification and calling of the multithreading to the target test function is avoided.
Referring to fig. 4, fig. 4 is a schematic flowchart illustrating a software testing method according to an embodiment of the present disclosure. In this embodiment, S101 to S104 are further detailed, and the software testing method includes:
s201: and configuring a cache space corresponding to the target test function according to the target test function.
Specifically, the cache space is a physical space for storing the contents of the function, which is opened up in a memory or a hard disk, and is used for storing instructions composed of codes and programs.
Optionally, as shown in fig. 5, S201 includes two specific implementation steps S3011 and S3012:
and S2011, applying a code segment page to the operating system according to the number of the instruction lines of the target test function.
S2012, the code segment page is set to the cache space corresponding to the target test function.
The code page is a storage unit of the code, the instruction code in the target test function is obtained, and the code page is correspondingly applied to the operating system as the cache space corresponding to the target test function according to the number of the instruction lines, so that the waste of the storage space can be avoided, and the use efficiency of the memory is improved.
S202: and copying the target test function in the cache space to generate a copy function.
Optionally, as shown in fig. 6, S202 includes three specific implementation steps S2021, S2022, and S2023:
s2021: and acquiring preset cache space parameters.
Specifically, the cache space parameter is used to represent information required for constructing the cache space. For example, the total amount of the cache space, the unit length of the cache space, and the like, and the implementation manner of the specific cache space parameter may be determined according to the implementation manner of the cache space.
S2022: and constructing one or more dummy functions according to the cache space parameters.
The dummy function refers to an empty row without input and output, generally has no actual function, is used for occupying space, and is edited and modified subsequently to have the actual function. Illustratively, the cache space parameters may include the number of dummy functions and the size of the dummy functions, and more specifically, 100 function bodies are constructed to include the dummy functions of 10000 lines of code, for example, by the cache space parameters. The implementation manner of specifically constructing the dummy function is different in different software development languages, and is not specifically limited herein.
S2023: and copying the instructions in the target test function into one or more dummy functions to generate a copy function.
The target test function comprises one or more instructions, more specifically, the target test function comprises one or more code lines, the code of each code line in the target test function is copied into one or more dummy functions, so that the copy function formed by the one or more dummy functions can completely realize the functions and effects of the target test function, and the internal operation logic and sequence of the copy function are consistent with the target test function, so that the aim of testing the target test function equivalently through the test of the copy function can be achieved.
The specific method for copying the instruction in one function to another function or functions and forming a new function is different in implementation methods in different software development languages, but is the prior art, and is not described here again.
Optionally, after S202, further comprising:
s203: and correcting the execution address of the copy function according to the execution address of the target test function.
Illustratively, the execution address of the target test function refers to the code line position of the target test function, and the execution address of the copy function refers to the code line position of the copy function. Specifically, after the copy function is generated, the copy function needs to be called subsequently to replace the call of the target test function, however, since the copy function is generated after being copied according to the target test function, the address of the copy function is not the same as the address of the target test function, and under the condition that compatibility is considered, the execution address of the copy function needs to be corrected, so that the universal stub function can directly jump to the copy function when the target test function needs to be called, external adaptive modification is not needed, and the compatibility and the test efficiency are improved.
Optionally, as shown in fig. 7, S203 includes three specific implementation steps of S2031, S2032, and S2033:
s2031: and analyzing the instructions of the copy function to obtain the position relation between the execution addresses of the instructions in the copy function.
In this implementation, the instructions included in the copy function are in one-to-one correspondence with the instructions in the target test function, and illustratively, the copy function also includes one or more instructions, and more specifically, the instructions may be a line of code or a sub-function. And copying an execution address corresponding to the instruction of the function, namely a code position where a starting instruction in the function is located. The starting instruction and other instructions in the copy function have a fixed positional relationship, for example, the execution address of instruction a is 0001; the execution address of instruction a is 0002 and the execution address of instruction c is 0003.
S2032: and determining a copy offset address according to the execution address of the target test function and the execution address of the copy function.
In order to enable the stub function to jump to the copy function directly when calling the target test function, the execution address of the copy function needs to be calibrated by the execution address of the target test function, and an address offset between the execution address of the target test function and the execution address of the copy function, that is, a copy offset address, is determined. The process of determining the copy offset address is described below in an exemplary manner, and for the sake of brief explanation, the following numbers identifying the execution addresses are all decimal numbers. For example, the execution address of the target test function is 0001, and the execution address of the copy function is 0101; the copy offset address is the difference between the execution address of the target test function and the execution address of the copy function, i.e. 0100, the copy offset address is 0100, which can be understood as 100 address units.
S2033: and correcting the execution address corresponding to the instruction of the copy function according to the copy offset address to obtain a corrected execution address corresponding to the instruction of the copy function.
After determining the copy offset address, the modified execution address corresponding to each instruction in the copy function may be determined based on the copy offset address and the location relationship between the execution addresses of the instructions in the copy function. Illustratively, for example, the copy is determined to include an instruction a, an instruction b, and an instruction c, where an execution address of the instruction a is 0101, an execution address of the instruction b is 0102, an execution address of the instruction c is 0103, and a copy offset address is 0100, and according to a preset offset direction, a modified execution address of the instruction a may be determined to be 0001; the modified execution address of instruction b may be determined to be 0002; the modified execution address of instruction c may be determined to be 0003.
By correcting the execution address, the universal stub function can directly jump to the copy function when the target test function needs to be called, and each instruction in the copy function can be correctly executed. The address correction is not required to be additionally carried out on the side of the general function, and the compatibility and the test efficiency are improved.
S204: and editing the target test function to generate a function to be tested.
In this embodiment, step S204 is the same as step S102 in the above embodiment, and please refer to the discussion of step S102 for a detailed discussion, which is not repeated herein.
S205: and the multiple threads respectively execute the first calling instruction in the function to be tested in parallel according to a preset test case so as to call the universal stub function corresponding to the function to be tested.
Specifically, the multiple threads respectively call a first call instruction in the function to be tested, and according to the mapping relation between the first call instruction and the universal stub function, the multiple threads respectively call the universal stub function in parallel. The specific implementation process is the same as the implementation process of step S104 in the above embodiment, and details are not described here.
Optionally, the second call instruction includes a first instruction and a second instruction, the first instruction is used for calling the stub function pair copy function, and the second instruction is used for executing the function of the stub function.
S206: executing a first instruction by a first thread in the multiple threads and executing a first function corresponding to the copy function; and executing a second instruction in parallel by a second thread in the multiple threads, and executing a second function corresponding to the universal stub function.
Specifically, a first thread executes a first instruction to obtain a second function execution address and a second function execution parameter, wherein the second function execution address is used for positioning an execution address of a copy function; the second function execution parameter is used to characterize the input parameter of the input copy function, such as the number of times the generic stub function is called, the query parameter, and the like. According to the second function execution parameter, a copy function corresponding to the second function execution address can be called, the copy function is used as a functional unit and has a specific function, such as a database query function, and after the first function is realized, a corresponding function realization result can be obtained, such as a result of the copy function outputting a query database. According to the result, whether the function of the copy function is normal or not can be judged by contrasting the test case.
In addition, the second thread executes a second instruction, which is an instruction included in the stub function to execute a function of the stub function itself, for example, to output an "error" notification message.
It should be noted that, in step S205 and step S206, the first thread and the second thread are not in a fixed order in terms of time sequence, that is, there is a possibility that the first thread executes step S205, and the second thread executes step S206; it is also possible that the first thread is executing step S206 and the second thread is executing step S205.
In the step of the embodiment, in a multi-thread scene, because the copy function is set in advance by opening up the cache space, and the original target test function is not called and modified any more but the copy function is called during subsequent multi-thread calling, the problem of pile skipping caused by conflict when the target test function is called and modified in a multi-thread parallel manner is avoided, and the stability of unit testing is improved.
Obtaining a second function execution address and a second function execution parameter; and calling the copy function corresponding to the second function execution address according to the second function execution parameter, and executing the first function corresponding to the copy function.
Fig. 8 is a block diagram of a software testing apparatus according to an embodiment of the present disclosure, which corresponds to the software testing method according to the above embodiment. For ease of illustration, only portions that are relevant to embodiments of the present disclosure are shown. Referring to fig. 8, the software testing apparatus 30 includes:
the copying unit 301 is configured to generate a copy function identical to the target test function according to the target test function in the software to be tested.
The editing unit 302 is configured to edit the target test function to generate a function to be tested.
The calling unit 303 is configured to execute a first calling instruction in the function to be tested according to a preset test case, so as to call a universal stub function corresponding to the function to be tested.
And the execution unit 304 is configured to execute the second call instruction in the stub function, execute the first function corresponding to the copy function called by the stub function, or execute the second function corresponding to the stub function.
In an embodiment of the present disclosure, the copy unit 301 is specifically configured to: configuring a cache space corresponding to the target test function according to the target test function; and copying the target test function in the cache space to generate a copy function.
In an embodiment of the present disclosure, when configuring, according to the target test function, a cache space corresponding to the target test function, the copying unit 301 is specifically configured to: applying a code segment page to an operating system according to the number of the instruction lines of the target test function; and setting the code segment page as a cache space corresponding to the target test function.
In an embodiment of the present disclosure, the copy unit 301 copies the target test function in the cache space, and when generating the copy function, is specifically configured to: acquiring preset cache space parameters, wherein the cache space parameters are used for representing information required for constructing a cache space; constructing one or more dummy functions according to the cache space parameters; and copying the instructions in the target test function into one or more dummy functions to generate a copy function.
In an embodiment of the present disclosure, the copy unit 301 copies the target test function in the cache space, and after generating the copy function, is specifically configured to: and correcting the execution address of the copy function according to the execution address of the target test function.
In an embodiment of the present disclosure, when the copy unit 301 corrects the execution address of the copy function according to the execution address of the target test function, specifically, the copy unit is configured to: analyzing the instruction of the copy function to obtain the position relation between the execution addresses of the instruction in the copy function; determining a copy offset address according to the execution address of the target test function and the execution address of the copy function; and correcting the execution address corresponding to the instruction of the copy function according to the copy offset address to obtain a corrected execution address corresponding to the instruction of the copy function.
In an embodiment of the present disclosure, the editing unit 302 is specifically configured to: acquiring an instruction initial position of a target test function; and inserting a first call instruction at the instruction starting position to generate a function to be tested.
In an embodiment of the present disclosure, the invoking unit 303 is specifically configured to: executing a first call instruction in a function to be tested to obtain a first function execution address and a first function execution parameter; and calling the universal stub function corresponding to the first function execution address according to the first function execution parameter.
In one embodiment of the present disclosure, the second call instruction includes a first instruction and a second instruction, the first instruction is used for calling the universal stub function to the copy function, and the second instruction is used for executing the function of the universal stub function; the execution unit 304 is specifically configured to: executing the first instruction to obtain a second function execution address and a second function execution parameter; and calling a copy function corresponding to the second function execution address according to the second function execution parameter, and executing a first function corresponding to the copy function, or executing a second instruction, and executing a second function corresponding to the universal stub function.
The device provided in this embodiment may be used to implement the technical solution of the above method embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
Referring to fig. 9, a schematic structural diagram of an electronic device 40 suitable for implementing the embodiment of the present disclosure is shown, where the electronic device 40 may be a terminal device or a server. Among them, the terminal Device may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a Digital broadcast receiver, a Personal Digital Assistant (PDA), a tablet computer (PAD), a Portable Multimedia Player (PMP), a car terminal (e.g., car navigation terminal), etc., and a fixed terminal such as a Digital TV, a desktop computer, etc. The electronic device shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 9, the electronic device 40 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 401, which may perform various suitable actions and processes according to a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage means 408 into a Random Access Memory (RAM) 403. In the RAM403, various programs and data necessary for the operation of the electronic apparatus 40 are also stored. The processing device 401, the ROM402, and the RAM403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 40 to communicate wirelessly or by wire with other devices to exchange data. While fig. 9 illustrates an electronic device 40 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 401.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of Network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In a first aspect, according to one or more embodiments of the present disclosure, there is provided a software testing method, including:
according to a target test function in software to be tested, a copy function which is the same as the target test function is generated, the target test function is edited, the function to be tested is generated, according to a preset test case, a first call instruction in the function to be tested is executed, a universal stub function corresponding to the function to be tested is called, a second call instruction in the universal stub function is executed, a first function corresponding to the copy function called by the universal stub function is executed, or a second function corresponding to the universal stub function is executed.
According to one or more embodiments of the present disclosure, generating a copy function identical to a target test function according to the target test function in software to be tested includes: configuring a cache space corresponding to the target test function according to the target test function; and copying the target test function in the cache space to generate a copy function.
According to one or more embodiments of the present disclosure, configuring a cache space corresponding to a target test function according to the target test function includes: applying a code segment page to an operating system according to the number of the instruction lines of the target test function; and setting the code segment page as a cache space corresponding to the target test function.
According to one or more embodiments of the present disclosure, replicating a target test function in a cache space and generating a copy function includes: acquiring preset cache space parameters, wherein the cache space parameters are used for representing information required for constructing a cache space; constructing one or more dummy functions according to the cache space parameters; and copying the instructions in the target test function into one or more dummy functions to generate a copy function.
According to one or more embodiments of the present disclosure, after copying the target test function and generating the copy function in the cache space, the method further includes: and correcting the execution address of the copy function according to the execution address of the target test function.
According to one or more embodiments of the present disclosure, modifying an execution address of a copy function according to an execution address of a target test function includes: analyzing the instruction of the copy function to obtain the position relation between the execution addresses of the instruction in the copy function; determining a copy offset address according to the execution address of the target test function and the execution address of the copy function; and correcting the execution address corresponding to the instruction of the copy function according to the copy offset address to obtain a corrected execution address corresponding to the instruction of the copy function.
According to one or more embodiments of the present disclosure, editing a target test function to generate a function to be tested includes: acquiring an instruction initial position of a target test function; and inserting a first call instruction at the instruction starting position to generate a function to be tested.
According to one or more embodiments of the present disclosure, according to a preset test case, executing a first call instruction in a function to be tested to call a universal stub function corresponding to the function to be tested, including: executing a first call instruction in a function to be tested to obtain a first function execution address and a first function execution parameter; and calling the universal stub function corresponding to the first function execution address according to the first function execution parameter.
According to one or more embodiments of the present disclosure, the second call instruction includes a first instruction and a second instruction, the first instruction is used for calling the universal stub function to the copy function, and the second instruction is used for executing the function of the universal stub function; executing a second call instruction in the universal stub function, and executing a first function corresponding to the copy function called by the universal stub function, or executing a second function corresponding to the universal stub function, including: executing the first instruction to obtain a second function execution address and a second function execution parameter; and calling a copy function corresponding to the second function execution address according to the second function execution parameter, and executing a first function corresponding to the copy function, or executing a second instruction, and executing a second function corresponding to the universal stub function.
In a second aspect, according to one or more embodiments of the present disclosure, there is provided a software testing apparatus including:
and the copying unit is used for generating a copying function which is the same as the target testing function according to the target testing function in the software to be tested.
And the editing unit is used for editing the target test function to generate a function to be tested.
And the calling unit is used for executing a first calling instruction in the function to be tested according to a preset test case so as to call the universal stub function corresponding to the function to be tested.
And the execution unit is used for executing the second calling instruction in the universal stub function and executing the first function corresponding to the copy function called by the universal stub function or executing the second function corresponding to the universal stub function.
According to one or more embodiments of the present disclosure, the copy unit is specifically configured to: configuring a cache space corresponding to the target test function according to the target test function; and copying the target test function in the cache space to generate a copy function.
According to one or more embodiments of the present disclosure, when the copy unit configures, according to the target test function, a cache space corresponding to the target test function, the copy unit is specifically configured to: applying a code segment page to an operating system according to the number of the instruction lines of the target test function; and setting the code segment page as a cache space corresponding to the target test function.
According to one or more embodiments of the present disclosure, the copy unit copies the target test function in the cache space, and when generating the copy function, is specifically configured to: acquiring preset cache space parameters, wherein the cache space parameters are used for representing information required for constructing a cache space; constructing one or more dummy functions according to the cache space parameters; and copying the instructions in the target test function into one or more dummy functions to generate a copy function.
According to one or more embodiments of the present disclosure, the copy unit copies the target test function in the cache space, and after generating the copy function, is specifically configured to: and correcting the execution address of the copy function according to the execution address of the target test function.
According to one or more embodiments of the present disclosure, when the copy unit corrects the execution address of the copy function according to the execution address of the target test function, the copy unit is specifically configured to: analyzing the instruction of the copy function to obtain the position relation between the execution addresses of the instruction in the copy function; determining a copy offset address according to the execution address of the target test function and the execution address of the copy function; and correcting the execution address corresponding to the instruction of the copy function according to the copy offset address to obtain a corrected execution address corresponding to the instruction of the copy function.
According to one or more embodiments of the present disclosure, the editing unit is specifically configured to: acquiring an instruction initial position of a target test function; and inserting a first call instruction at the instruction starting position to generate a function to be tested.
According to one or more embodiments of the present disclosure, the calling unit is specifically configured to: executing a first call instruction in a function to be tested to obtain a first function execution address and a first function execution parameter; and calling the universal stub function corresponding to the first function execution address according to the first function execution parameter.
According to one or more embodiments of the present disclosure, the second call instruction includes a first instruction and a second instruction, the first instruction is used for calling the universal stub function to the copy function, and the second instruction is used for executing the function of the universal stub function; an execution unit, specifically configured to: executing the first instruction to obtain a second function execution address and a second function execution parameter; and calling a copy function corresponding to the second function execution address according to the second function execution parameter, and executing a first function corresponding to the copy function, or executing a second instruction, and executing a second function corresponding to the universal stub function.
In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes the computer-executable instructions stored by the memory to cause the at least one processor to perform the software testing method as described above in the first aspect and in various possible designs of the first aspect.
In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, a software testing method as described above in the first aspect and various possible designs of the first aspect is implemented.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (12)

1. A software testing method, comprising:
generating a copy function which is the same as a target test function according to the target test function in software to be tested;
editing the target test function to generate a function to be tested;
executing a first calling instruction in the function to be tested according to a preset test case so as to call a universal stub function corresponding to the function to be tested;
and executing a second calling instruction in the universal stub function, and executing a first function corresponding to the copy function called by the universal stub function, or executing a second function corresponding to the universal stub function.
2. The method of claim 1, wherein generating a copy function identical to a target test function in software under test according to the target test function comprises:
according to the target test function, configuring a cache space corresponding to the target test function;
and copying the target test function in the cache space to generate a copy function.
3. The method of claim 2, wherein configuring, according to the target test function, a buffer space corresponding to the target test function comprises:
applying a code segment page to an operating system according to the number of the instruction lines of the target test function;
setting the code segment page as a cache space corresponding to the target test function.
4. The method of claim 2, wherein replicating the target test function within the cache space to generate a copy function comprises:
acquiring preset cache space parameters, wherein the cache space parameters are used for representing information required for constructing the cache space;
constructing one or more dummy functions according to the cache space parameters;
and copying the instructions in the target test function into the one or more dummy functions to generate a copy function.
5. The method of claim 2, wherein after copying the target test function and generating a copy function within the cache space, further comprising:
and correcting the execution address of the copy function according to the execution address of the target test function.
6. The method of claim 5, wherein modifying the execution address of the copy function according to the execution address of the target test function comprises:
analyzing the instruction of the copy function to obtain the position relation between the execution addresses of the instruction in the copy function;
determining a copy offset address according to the execution address of the target test function and the execution address of the copy function;
and correcting the execution address corresponding to the instruction of the copy function according to the copy offset address to obtain a corrected execution address corresponding to the instruction of the copy function.
7. The method of any one of claims 1-6, wherein editing the target test function to generate a function to be tested comprises:
acquiring an instruction starting position of the target test function;
and inserting a first call instruction at the instruction starting position to generate a function to be tested.
8. The method according to any one of claims 1 to 6, wherein executing a first call instruction in the function to be tested according to a preset test case to call a universal stub function corresponding to the function to be tested comprises:
executing a first call instruction in the function to be tested to obtain a first function execution address and a first function execution parameter;
and calling a universal stub function corresponding to the first function execution address according to the first function execution parameter.
9. The method of any of claims 1-6, wherein the second call instruction comprises a first instruction to call a stub function pair copy function and a second instruction to perform a function of a stub function; executing a second call instruction in the stub function, and executing a first function corresponding to a copy function called by the stub function, or executing a second function corresponding to the stub function, including:
executing the first instruction to obtain a second function execution address and a second function execution parameter; according to the second function execution parameter, calling the copy function corresponding to the second function execution address to execute the first function corresponding to the copy function, or,
and executing the second instruction to execute a second function corresponding to the universal stub function.
10. A software testing device, comprising:
the copying unit is used for generating a copying function which is the same as the target testing function according to the target testing function in the software to be tested;
the editing unit is used for editing the target test function to generate a function to be tested;
the calling unit is used for executing a first calling instruction in the function to be tested according to a preset test case so as to call a universal stub function corresponding to the function to be tested;
and the execution unit is used for executing a second calling instruction in the general stub function, and executing a first function corresponding to the copy function called by the general stub function, or executing a second function corresponding to the general stub function.
11. An electronic device, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the unit testing method of any of claims 1 to 9.
12. A computer-readable storage medium having computer-executable instructions stored thereon which, when executed by a processor, implement the unit testing method of any one of claims 1 to 9.
CN202011165816.1A 2020-10-27 2020-10-27 Software testing method, device and storage medium Active CN112181851B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011165816.1A CN112181851B (en) 2020-10-27 2020-10-27 Software testing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011165816.1A CN112181851B (en) 2020-10-27 2020-10-27 Software testing method, device and storage medium

Publications (2)

Publication Number Publication Date
CN112181851A true CN112181851A (en) 2021-01-05
CN112181851B CN112181851B (en) 2023-07-28

Family

ID=73923779

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011165816.1A Active CN112181851B (en) 2020-10-27 2020-10-27 Software testing method, device and storage medium

Country Status (1)

Country Link
CN (1) CN112181851B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1710547A (en) * 2004-06-16 2005-12-21 华为技术有限公司 Software detection method and system
CN1873626A (en) * 2005-06-01 2006-12-06 中兴通讯股份有限公司 Unit test system and method for automatic generating stub and driving function
CN101110055A (en) * 2007-08-31 2008-01-23 中兴通讯股份有限公司 Device for implementing general use pile function in unit test and implementing method thereof
CN104731695A (en) * 2013-12-19 2015-06-24 广州凯乐软件技术有限公司 Unit testing system and method supporting table-driven underlying input
CN104834590A (en) * 2014-02-11 2015-08-12 腾讯科技(深圳)有限公司 Software test method and system
CN104915287A (en) * 2014-03-11 2015-09-16 富士施乐实业发展(中国)有限公司 Method and system for unit testing
CN104915292A (en) * 2015-06-12 2015-09-16 浪潮电子信息产业股份有限公司 Method for dynamically piling Linux kernel module
US20150378880A1 (en) * 2014-06-26 2015-12-31 Parasoft Corporation Dynamically Configurable Test Doubles For Software Testing And Validation
CN108549605A (en) * 2018-04-13 2018-09-18 郑州云海信息技术有限公司 A kind of automated testing method
CN110532185A (en) * 2019-08-29 2019-12-03 中国工商银行股份有限公司 Test method, device, electronic equipment and computer readable storage medium
CN110737892A (en) * 2018-07-20 2020-01-31 武汉斗鱼网络科技有限公司 detection method for APC injection and related device
CN111797006A (en) * 2020-06-11 2020-10-20 新奇点智能科技集团有限公司 Method, device and equipment for testing thread and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1710547A (en) * 2004-06-16 2005-12-21 华为技术有限公司 Software detection method and system
CN1873626A (en) * 2005-06-01 2006-12-06 中兴通讯股份有限公司 Unit test system and method for automatic generating stub and driving function
CN101110055A (en) * 2007-08-31 2008-01-23 中兴通讯股份有限公司 Device for implementing general use pile function in unit test and implementing method thereof
CN104731695A (en) * 2013-12-19 2015-06-24 广州凯乐软件技术有限公司 Unit testing system and method supporting table-driven underlying input
CN104834590A (en) * 2014-02-11 2015-08-12 腾讯科技(深圳)有限公司 Software test method and system
CN104915287A (en) * 2014-03-11 2015-09-16 富士施乐实业发展(中国)有限公司 Method and system for unit testing
US20150378880A1 (en) * 2014-06-26 2015-12-31 Parasoft Corporation Dynamically Configurable Test Doubles For Software Testing And Validation
CN104915292A (en) * 2015-06-12 2015-09-16 浪潮电子信息产业股份有限公司 Method for dynamically piling Linux kernel module
CN108549605A (en) * 2018-04-13 2018-09-18 郑州云海信息技术有限公司 A kind of automated testing method
CN110737892A (en) * 2018-07-20 2020-01-31 武汉斗鱼网络科技有限公司 detection method for APC injection and related device
CN110532185A (en) * 2019-08-29 2019-12-03 中国工商银行股份有限公司 Test method, device, electronic equipment and computer readable storage medium
CN111797006A (en) * 2020-06-11 2020-10-20 新奇点智能科技集团有限公司 Method, device and equipment for testing thread and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
YUNHO KIM 等: "Precise concolic unit testing of C programs using extended units and symbolic alarm filtering", 《PROCEEDINGS OF THE 40TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING》, pages 315 *
万东燕 等: "基于桩函数动态赋值的软件覆盖率测试方法", 《制导与引信》, vol. 41, no. 2, pages 57 - 60 *
孙华衿: "C/C++单元自动化覆盖测试框架的研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 10, pages 138 - 229 *
曹红杏: "testbed 桩函数设置", Retrieved from the Internet <URL:《https://blog.csdn.net/caohongxing/article/details/86670667》> *

Also Published As

Publication number Publication date
CN112181851B (en) 2023-07-28

Similar Documents

Publication Publication Date Title
CN111090536B (en) Method, device, medium and electronic equipment for acquiring memory leakage information
CN110377462B (en) Interface testing method and device and terminal equipment
CN108170465B (en) Version information management method, electronic equipment and readable storage medium
CN110879781B (en) Program debugging method, device, electronic equipment and computer readable storage medium
CN110851204B (en) Application starting method and device and application packaging method and device
CN110727566B (en) Method, device, medium and electronic equipment for acquiring process crash information
CN111444453A (en) Page return data processing method and device
US20240095022A1 (en) Hotfix method, apparatus, device and storage medium
CN113407165B (en) SDK generation and self-upgrade method, device, readable medium and equipment
CN112650521B (en) Software development kit SDK thermal restoration method and device and electronic equipment
CN113127000A (en) Compiling method, device and equipment of application program assembly and storage medium
CN110704050B (en) Module initializing method and device, electronic equipment and computer readable storage medium
CN110442419B (en) Interface layout method and device for Android application
CN112181851B (en) Software testing method, device and storage medium
CN111752644A (en) Interface simulation method, device, equipment and storage medium
CN110908882A (en) Performance analysis method and device of application program, terminal equipment and medium
CN113448585B (en) Compiling method and device of thread pool, electronic equipment and storage medium
CN113608997B (en) Remote debugging method and device for embedded webpage of application program and electronic equipment
CN110764995B (en) Method, device, medium and electronic equipment for detecting file access abnormality
CN114153462A (en) Client source code processing method and device, storage medium and electronic equipment
CN116149977A (en) SDK test method and device, electronic equipment and storage medium
CN111310175A (en) iOS application safety monitoring and protecting method and device based on plug-in
CN111367555B (en) Assertion method, assertion device, electronic equipment and computer readable medium
CN113031986B (en) Feature comparison algorithm dynamic loading method, device, terminal and medium
CN115878091A (en) Data processing method, device, equipment and storage medium

Legal Events

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