Generating method and device for test sample
A test sample and sample technology, applied in the field of test sample generation methods and devices, can solve problems such as low code coverage, and achieve the effects of solving low code coverage, reducing the generation of meaningless samples, and improving code coverage
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0032] According to an embodiment of the present invention, a method embodiment of a method for generating a test sample is also provided. It should be noted that the steps shown in the flow chart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions , and, although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order different from that shown or described herein.
[0033] The method embodiment provided in Embodiment 1 of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Take running on a computer terminal as an example, figure 1 It is a block diagram of the hardware structure of a computer terminal according to a method for generating a test sample according to an embodiment of the present application. Such as figure 1 As shown, the computer terminal 10 may include one or more (only one i...
Embodiment 2
[0073] According to an embodiment of the present invention, a device for implementing the method for generating the test sample described above is also provided, Figure 5 is a structural block diagram of a device for generating a test sample according to an embodiment of the present application, such as Figure 5 As shown, the device includes:
[0074]The obtaining module 52 is used to obtain the information of the key data in the specified sample; wherein, the key data is the data of the branch instruction polluting the program under test in the specified sample;
[0075] It should be noted that the branch instruction of the program under test polluting the key data can be manifested as direct pollution and indirect pollution. Corresponding operations (such as addition, subtraction, multiplication, and division, etc.), but directly propagate to the branch instruction, which can be called direct pollution at this time; before the test program executes the branch instruction,...
Embodiment 3
[0090] Embodiments of the present invention may provide a computer terminal, and the computer terminal may be any computer terminal device in a group of computer terminals. The computer terminal may be the terminal in Embodiment 1. Optionally, in this embodiment, the foregoing computer terminal may also be replaced with a terminal device such as a mobile terminal.
[0091] Optionally, in this embodiment, the foregoing computer terminal may be located in at least one network device among multiple network devices of the computer network.
[0092] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the test sample generation method: obtain the information of key data in the specified sample; wherein, the key data is the branch that pollutes the program under test in the specified sample The data of the instruction; according to the information, the key data in the specified sample is mutated to obtain the mutated speci...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com