Supercharge Your Innovation With Domain-Expert AI Agents!

Method and device for constructing test case and code test, equipment and medium

A test case and source code technology, applied in the computer field, can solve the problems of huge workload business, complex code reconstruction, etc., and achieve the effect of improving efficiency and management efficiency.

Pending Publication Date: 2022-06-03
BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In related technologies, in order to reduce the redundancy of unit test codes to facilitate the writing of unit test codes, the conditional statements in the program are replaced by refactoring the source code (business code). However, refactoring the code requires complex and large changes. It will still bring a huge workload and introduce many uncontrollable risks to the business

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
  • Method and device for constructing test case and code test, equipment and medium
  • Method and device for constructing test case and code test, equipment and medium
  • Method and device for constructing test case and code test, equipment and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0036] In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present invention.

[0037] figure 1 The system architecture of the method and apparatus for constructing test cases and code testing applicable to the embodiments of the present invention is schematically shown.

[0038] refer to figure 1As shown, the system architecture 100 applicable to the method and apparatus for constructing test cases and code testing a...

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 relates to a method, a device, equipment and a medium for constructing a test case and testing codes, and relates to the technical field of computers, the method for constructing the test case comprises the following steps: obtaining a source code of a to-be-tested object, determining a conditional branch expected to run and an execution statement under the conditional branch according to the conditional statement; based on the conditional branches and the execution statements under the conditional branches, a test case is constructed, and the test case comprises a mapping relation between the conditional branches and the execution statements under the conditional branches; the code testing method comprises the following steps: acquiring a source code of a to-be-tested object; a pre-constructed test case is run, an actual running result is obtained, and an expected running result is described in the form of a condition-assertion mapping pair in the test case; and verifying the correctness of the source code by comparing the actual operation result with the expected operation result.

Description

technical field [0001] The present invention relates to the field of computer technology, and in particular, to a method, device, device and medium for constructing test cases and code testing. Background technique [0002] In the process of software development, unit testing is currently used to check the correctness of the smallest unit of source code program modules. Usually, a test case (case) needs to be constructed for testing. The source code of the statement, when writing a test case, a test case (case) can only test one of the conditions contained in the conditional statement, so when performing unit testing, it is necessary to write multiple cases to cover all cases, resulting in the writing of test cases. The amount of coding required is huge and contains a lot of redundant code, which will bring huge workload. [0003] In the process of realizing the present invention, the inventor found that there are at least the following technical problems in the related art...

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
IPC IPC(8): G06F11/36
CPCG06F11/3676G06F11/3684G06F11/3696
Inventor 张淏然
Owner BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More