Program code testing method and device

A technology of program code and test method, applied in the computer field, can solve the problems of reducing mass detection and untargeted detection

Active Publication Date: 2017-02-01
TENCENT TECH (SHENZHEN) CO LTD
View PDF4 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] In view of this, the purpose of the embodiments of the present invention is to provide a program code testing method and device to reduce the massive detection caused by traditional path coverage and to detect untargeted problems

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Program code testing method and device
  • Program code testing method and device
  • Program code testing method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] For the sake of reference and clarity, the technical terms, abbreviations or abbreviations used in the following text are summarized as follows:

[0029] Finite solution problem: If a function / program has a limited set of test cases to ensure that the logic can run normally, it is called a finite solution problem;

[0030] Non-infinite solution problem: If a function / program has an infinite set of test cases to ensure that the logic can run normally, it is called an infinite solution problem. In theory, an infinite solution problem cannot guarantee that the function / program will work in all cases normal.

[0031] In addition to poor pertinence, in traditional white-box testing, different inputs are likely to have different results for the same code execution (different results, corresponding logical exits or logical branches are also different), even for the same input, it may be due to Different states produce different results (different results correspond to differe...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The embodiment of the invention discloses a program code testing method and device and aims at reducing massive detection brought by traditional route coverage and solving the problem that the detection has not pertinence. The program code testing method comprises the steps that the testing purpose of a test is obtained; a logic topological tree corresponding to a procedure code is searched to obtain a logic outlet node relevant to the testing purpose and serving as a target logic outlet node; the target logic outlet node is used as a starting point, and logic testing is conducted on a logic path containing the target logic outlet node in the logic topological tree. It is thus clear that in the embodiment, logic testing is conducted on a logic path containing the target logic outlet node relevant to the testing purpose, rather than logic testing conducted on all logic paths. Due to the fact that the test is the logic test based on the testing purpose, the program code testing scheme provided by the embodiment has more pertinence compared with traditional white box testing.

Description

technical field [0001] The present invention relates to the field of computer technology, more specifically, to a program code testing method and device. Background technique [0002] White box testing is also known as structural testing, transparent box testing, logic-driven testing or code-based testing. The box refers to the software (or program) under test, and the white box means that the box is visible, and it is clear what is inside the box and how it works. [0003] One of the coverage criteria of traditional white-box testing is logic coverage. Logic coverage includes statement coverage, decision coverage, condition coverage, decision / condition coverage, condition combination coverage and path coverage, and its ultimate goal is to execute all paths at least once. Such as figure 1 As shown in , the program code needs to go through the logic layer from the entry node to the exit node, and the logic coverage finally expects to cover all possible logic branches, and ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
CPCG06F11/3676G06F11/3688
Inventor 童立舟丁磊江诗怡
Owner TENCENT TECH (SHENZHEN) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products