Patents
Literature
Patsnap Eureka AI that helps you search prior art, draft patents, and assess FTO risks, powered by patent and scientific literature data.

850 results about "Test code" patented technology

Generative Artificial Intelligence for a Network Security Scanner

A computer system for network security vulnerability inspection may include one or more processors configured to: transmit a prompt for network security vulnerability testing code to an ML chatbot (or voice bot) to cause an ML model to generate the network security vulnerability testing code, receive the network security vulnerability testing code from the ML chatbot (or voice bot), scan a network to identify network computing devices, scan one or more of the network computing devices to identify security vulnerabilities and vulnerable network computing devices, and / or communicate the security vulnerabilities and / or vulnerable network computing devices to a user.
Owner:STATE FARM MUTAL AUTOMOBILE INSURANCE COMPANY

Unmanned aerial vehicle flight control system vulnerability detection method based on data flow analysis and LLM

The invention discloses an unmanned aerial vehicle flight control system vulnerability detection method based on data flow analysis and LLM, and belongs to the technical field of intelligent software testing. Comprising the following steps: extracting a code function module associated with user operation in an unmanned aerial vehicle flight control system through a data flow analysis method, and establishing an operation-code mapping relation library; generating a structured natural language semantic description for each function module code by adopting a large language model LLM, and forming a multi-dimensional semantic feature vector; based on correlation analysis of multi-module semantic features, a combined test scene is constructed, and a natural language test case is generated; the natural language test case is converted into an executable test code through reverse semantic mapping, and coding reconstruction of test logic is completed; and executing a test code and capturing a runtime log in an unmanned aerial vehicle simulation environment, and performing vulnerability feature extraction and root cause positioning by using a large language model. According to the method, the efficiency is improved, and meanwhile, the deep coverage test of a complex interaction scene is supported.
Owner:HUAZHONG UNIV OF SCI & TECH

Debugger script embedded in debuggable program source code

An enhanced compiler recognizes debug script which is embedded with program statements in a source code, and emits compiled code containing various debugger command instructions among program instructions. Embedded commands are not limited to break or assert statements. Different portions of a program's compiled code are either tailored for debugging or else performance optimized, depending on the location and kind of embedded debug script statements. Debugger commands for debugging race conditions, intermittent bugs, mutation testing code versions, and other complex development challenges are documented and versioned as part of the source code. Program process execution paths are chosen based on call stack search results, touch counts, breakpoint status, and other data accessed via a debugger. Debug script statements are categorized and utilized to balance debugging support against performance optimization in code from a source generator, or just-in-time code.
Owner:MICROSOFT TECHNOLOGY LICENSING LLC

Code processing method and code repair testing method

The embodiment of the invention provides a code processing method and a code repair testing method. The code processing method comprises the steps of obtaining a code problem of a target item; determining a problem code of the target project according to the code problem and a code knowledge graph of the target project; inputting the code problem and the problem code into a code processing model to obtain an initial repair code; and testing the initial repair code by utilizing the test code, and obtaining a target repair code of the code problem under the condition that the test is passed. The problem code is determined through the code knowledge graph, the structure and dependency relationship of the code of the target project are better understood, the accuracy of the problem code is improved, the code processing model is used for automatically repairing the code, efficient code processing is achieved, the test code is used for testing the initial repairing code, and the correctness of the target repairing code is ensured. The code maintenance cost is reduced, and the code processing efficiency is improved.
Owner:ALIBABA (CHINA) CO LTD

Systems and methods for generative ai behaviour-driven development

Behaviour Driven Development (BDD) is used to define test scenarios and to write the test scenarios in code first before writing the application code. Expected behaviours of the new functionality in natural language are defined and converted into test code driven by a Domain Specific Language (DSL) that encapsulates the description of the expected behaviour, after which code for the functionality can start to be written. In certain implementations, artificial intelligence (AI) may be used to first generate the test scenarios and relevant test data, then to produce code that passes all the tests (or iterates until it does) such that the code requires zero or nearly zero human inspection. If generated code passes the test scenarios, it meets the expected behaviour. This saves substantial time investment and reduces the number of steps to completion.
Owner:LNRS DATA SERVICES INC

Web application fuzzy testing method based on multi-modal large model assisted web crawler

The invention provides a Web application fuzzy testing method based on a multi-modal large model assisted web crawler, which comprises the following steps of: collecting page information of a Web application program by using an LLM (Logical Link Model), extracting associated information among Web pages, and constructing a state machine according to the associated information among the Web pages to guide a sequence of crawling the Web pages; performing screenshot on the Web page by using the MLLM, obtaining HTML (Hypertext Markup Language) content of the Web page, and generating a natural language description of a task so as to describe the task needing to be completed by a user on the page and an operation required for completing the task; and sequentially converting the natural language description into test codes by using LLM, judging whether the test codes successfully complete a task or not according to the state change of the Web page before and after execution, and if the test codes successfully complete the task, generating corresponding form content and an operation sequence to generate an effective HTTP request. The method has the advantages of simple implementation method, low cost, high test efficiency, high coverage rate and the like.
Owner:NAT UNIV OF DEFENSE TECH

Code generation method, code generation model and code modification model training method

The embodiment of the invention provides a code generation method, a code generation model and a code modification model training method.The code generation method comprises the steps that target code information is retrieved from alternative code information according to a to-be-tested unit in a target program and based on the unit dependency relation of the to-be-tested unit; wherein the alternative code information is obtained by screening auxiliary information based on a target information type, the auxiliary information is obtained by performing grammar structure analysis on a code file of the target program, and the target information type is the type of information used for unit testing; and generating a unit test code of the to-be-tested unit based on the target code information. Through the method, the generation quality of the unit test code can be improved.
Owner:ALIBABA (CHINA) CO LTD

Software test code generation method and device, related equipment and computer program product

The invention discloses a software test code generation method and device, related equipment and a computer program product, and the method comprises the steps: analyzing structure information associated with a tested code, and determining frame information required by a to-be-generated test code from the structure information; sending the tested code into the configured large model to indicate the large model to generate a test case corresponding to the tested code; and sending the combination of the frame information and the test case into the large model to indicate the large model to supplement and generate a test code based on the combination of the frame information and the test case. According to the method, the task of generating the test code is split into the test case for firstly generating the tested code according to the processing logic, the test code is further generated based on the test case, and the processing logic of human is simulated, so that the quality of the finally generated test code is improved. Meanwhile, by means of the high reasoning and analysis capacity of the large model, the test code generated by the tested code can cover a more complete test scene.
Owner:YANGTZE RIVER DELTA (ANHUI) KEXUN SMART PARK OPERATION CENTER CO LTD

Code testing method and related system

The present application provides a code testing method, applied to a code testing system. When a test code is generated, context information of a code under test is extracted, and the test code is generated on the basis of the context information of the code under test. The context information often has a service meaning and can embody a test scenario, so that the prior knowledge of the service and the test scenario is achieved in the generation process of test codes, thereby generating test codes having higher quality.
Owner:HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD

Test code generation method and computing device

The invention discloses a test code generation method and computing equipment. The method comprises the following steps: firstly, obtaining programming information and a function dependency library of a to-be-tested code; and generating a cue word according to the obtained programming information and the function dependency library. And inputting the cue word into the large language model to obtain a test code of the to-be-tested code. Compared with manual writing of the test code by a tester, the method provided by the invention uses the large language model to automatically generate the test code, so that the generation efficiency of the test code is improved. And the cue word of the to-be-tested code is generated based on the programming information and the function dependency library, and the large language model is guided to generate the test code which better conforms to the test logic, so that the accuracy of the test code is improved.
Owner:XFUSION DIGITAL TECH CO LTD

Method and device for generating test case based on large model and electronic equipment

The invention provides a method and device for generating a test case based on a large model and electronic equipment, and relates to the technical field of artificial intelligence such as natural language processing, large language models and deep learning. According to the specific implementation scheme, when a test case is executed to test a tested code, assertion error reporting information is obtained; generating a first prompt word based on at least one of the test case, the tested code and the assertion error report information; inputting the first cue word into the large model to obtain a first output result of the large model; the first output result comprises repair scheme information, and the large model is used for outputting the repair scheme information matched with the first cue word based on the first cue word; and performing multiple rounds of interactive dialogues with the large model based on the first output result to generate a test case of the tested code. By implementing the embodiment of the invention, the accuracy and the code coverage rate of the test case can be improved, the problem can be quickly positioned, the repair suggestion can be automatically generated, the manual intervention is reduced, and the test efficiency is improved.
Owner:BEIJING BAIDU NETCOM SCI & TECH CO LTD

Interactive visualization method, device and equipment for fuzz test bottleneck breakthrough

The invention relates to an interactive visualization method, device and equipment for fuzzy test bottleneck breakthrough, and belongs to the field of network security. According to the method, all compiling modules in a tested program are combined into a complete intermediate code, and a global view of the tested program is obtained; generating a unique label for each function by using a hash algorithm; constructing a call graph and a control flow graph, and obtaining function call instruction information by scanning a basic block of each function; carrying out pile insertion on the basic blocks; performing a fuzzy test on the tested program after compiling and instrumentation, and obtaining runtime data in real time; according to the fuzzy test runtime data and the static analysis data, data-driven visualization is carried out, and a call graph, a control flow graph and real-time execution statistical information are displayed in real time; a test engineer is assisted through an interactive chart, and fuzzy test bottleneck constraints are positioned. According to the method, a test engineer can be helped to better understand and intervene the fuzzy test process, and the fuzzy test code coverage rate and the defect detection number are improved.
Owner:CHINESE PEOPLES LIBERATION ARMY UNIT 61660

Unit test code generation method and device, electronic equipment and storage medium

The invention provides a unit test code generation method and device, electronic equipment and a storage medium, and the method comprises the steps: generating a test case of a to-be-tested code based on a large language model; and generating a unit test code for executing the test case based on a test code template engine. According to the method and device, the electronic equipment and the storage medium provided by the invention, the combination of the large language model and the test code template engine in the unit test code generation application is realized, and compared with a scheme of generating the unit test code completely through the large language model, the dependency on the large language model is reduced, and the efficiency of generating the unit test code is improved. Therefore, the influence of low calculation efficiency of a large language model on the generation efficiency of the unit test codes is weakened, the generation efficiency of the unit test codes is improved, and conditions are provided for batch generation of the unit test codes.
Owner:IFLYTEK CO LTD

Test code repairing method and related device

The present application discloses a test code repairing method applied to a code development platform. The method comprises: obtaining a test code corresponding to a source code, and then executing the test code to obtain execution information of the test code, wherein the execution information comprises abnormal stack tracking information output during execution of the test code; on the basis of the execution information, performing fault localization on the test code to obtain location information of a faulty code; on the basis of the location information of the faulty code, extracting context information, wherein the context information comprises at least one of a faulty test case, a fault description, or the faulty content; and inputting a prompt constructed on the basis of the context information into a language model and performing inference, so as to obtain a first repaired code. The method is used to perform fault localization in light of the execution information, extract the context information on the basis of the location information of the faulty code, and, on the basis of the context information, generate accurate and complex repaired code via an advanced language model, thereby adapting to various complex fault scenarios and improving repair efficiency and accuracy.
Owner:HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD +1

Structural information and semantic information fused hardware Trojan horse detection method

The embodiment of the invention provides a structural information and semantic information fused hardware Trojan horse detection method, which can solve the technical problem of poor hardware Trojan horse detection capability. The method comprises the steps of determining a first file; the first file comprises a plurality of code files designed by a chip; establishing an abstract syntax tree based on the first file; extracting node features and node adjacency relations according to the abstract syntax tree; obtaining structure information based on the node features and the node adjacency relation; based on the multiple code files, code semantic features are obtained; based on a cross attention mechanism, fusing the structure information and the code semantic features to obtain a target feature vector; training a hardware Trojan horse detection model based on the target feature vector; and inputting the to-be-detected code into the hardware Trojan horse detection model to obtain a hardware Trojan horse detection result. In this way, suspicious signals or statements do not need to be manually processed and analyzed, the automation degree is improved, and therefore the hardware Trojan horse detection capacity is improved.
Owner:TECH & ENG CENT FOR SPACE UTILIZATION CHINESE ACAD OF SCI

Code generation method and related device

Provided in the present application is a code generation method. The method is executed by a code generation system, wherein the code generation system is used for automatically generating a test code. The method comprises: receiving a test step description inputted by a user; retrieving a text code pair vector library and a test method vector library on the basis of the test step description, so as to obtain a test code fragment and a test method use case which correspond to a similar test step description, wherein the text code pair vector library comprises description text and a vector formed by a corresponding test code, and the test method vector library comprises a vector formed by the test method use case; then, on the basis of the test code fragment and a test method which correspond to the similar test step description, performing reasoning by means of a large language model (LLM), so as to generate a test code corresponding to the test step description; and presenting to the user the test code corresponding to the test step description. The method combines retrieval with LLM reasoning, such that a complex test code can be automatically generated, thereby improving the efficiency of automated development in complex test scenarios.
Owner:HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD

Automatic testing method and device based on large model, and electronic equipment

The invention provides an automatic test method and device based on a large model, and electronic equipment. The method comprises the following steps: acquiring a test demand of a user; based on the test requirement, the marking result of each test case in a test case library and a large language model, determining a to-be-executed case; generating a to-be-executed test code corresponding to the to-be-executed use case based on an automatic test code framework, a target compiling language and the large language model; and executing the test code to be executed in a test environment to obtain a test execution result. According to the method provided by the invention, the to-be-executed use case is determined by utilizing the powerful capability of the large model, and the to-be-executed test code corresponding to the to-be-executed use case is generated through the large language model on the basis of the automatic test code framework and the target compiling language, so that efficient test case selection and test code compiling are realized, and the test efficiency is improved. And moreover, the code debugging time is saved, the test response speed and the test efficiency are greatly improved, and the quality of the to-be-tested product is further ensured.
Owner:IOL WUHAN INFORMATION TECH CO LTD

Automatic network protocol testing method and system based on large language model

The invention provides an automatic network protocol testing method and system based on a large language model. According to the method, through three core technologies of structured protocol specification extraction, hybrid test case generation and retrieval feedback enhanced code generation, full-process automation from a protocol specification document to an executable test code is realized. The method comprises the following steps: firstly, carrying out preprocessing and structured analysis on an RFC document, and extracting protocol field information and state machine description; a complete test case covering normal, abnormal and boundary conditions is automatically generated based on protocol elements; and finally, an initial test code is generated in combination with a test equipment API document retrieval result, and multi-round iterative optimization is performed through running log analysis and an experience knowledge base. Compared with the prior art, according to the scheme, an end-to-end automatic test work chain is achieved, new protocol testing can be adapted without manual protocol modeling, meanwhile, a large language model and expert experience are fused through a feedback mechanism, and the test efficiency and the code quality are remarkably improved.
Owner:TSINGHUA UNIVERSITY

Full-process automatic unit testing method and device for AI chip operator and medium

The invention discloses a full-process automatic unit testing method, device and equipment for an AI chip operator, a medium and a product. The method comprises the following steps: generating an engineering directory and a test framework design document through an architect agent according to operator interface information and a DSL operator design document knowledge base; the method comprises the following steps of: generating a test code for unit test by a software engineer agent according to a test framework design document and a domain knowledge base, and storing the test code in an engineering directory; multiple rounds of interaction are carried out through a software engineer agent and a test engineer agent, a test code is gradually corrected into a target test code which can be successfully compiled, a generated test case can be successfully executed and the generated test case meets the code coverage rate requirement, and a target operator code passing a unit test is obtained; and submitting the target operator code and the target test code which pass the normativity check to a code warehouse through a code auditing engineer agent so as to automatically realize the whole-process unit test of the AI chip operator.
Owner:SHANGHAI YUNSUI TECHNOLOGY CO LTD

Test case generation method and device based on intelligent agent, equipment and medium

The invention discloses an agent-based test case generation method and device, equipment and a medium, and relates to the technical field of software testing, the method comprises the following steps: in response to a test case generation instruction for a target function, displaying a test case framework of the target function; in response to an interaction instruction for a preset position in the test case framework, obtaining a target test code of the target function; wherein the interaction instruction is used for triggering interaction between a first agent and a second agent, and the first agent is configured to be used for analyzing a logic structure of a function code of a target function to obtain a structure code of a test point of the target function; the second intelligent agent is configured to be used for generating a target test code based on the structure code of the test point; and displaying the target test code at a preset position to obtain a target test case of the target function. The problem that the generation accuracy of the test case is low can be solved.
Owner:BEIJING YOUZHUJU NETWORK TECH CO LTD

Test program generation method and device, computer equipment and readable storage medium

The invention provides a test program generation method and device, computer equipment and a readable storage medium, and belongs to the technical field of software development. The test program generation method comprises the steps of obtaining a test requirement document of a target chip; analyzing the test demand document to obtain keyword information corresponding to the test demand document; based on a preset test development model and the keyword information, obtaining test demand development model information; according to the test requirement, developing model information, calling at least one artificial intelligence interface in a preset large language model, and generating a plurality of test codes; and according to the plurality of test codes, generating a target test program corresponding to the target chip. According to the method, the effects of shortening the development period of the test program and improving the development efficiency of the test program can be achieved.
Owner:XIAN HUAXUN MICROCHIP TECH CO LTD

Implementation method and system for PCIE physical layer built-in self-test code

The invention aims to provide a method and a system for realizing a built-in self-test code of a PCIE (Peripheral Component Interface Express) physical layer. The method comprises the following steps of: integrating PCIE BIST GEN module packaging data in a controller layer and sending the data to a physical coding sub-layer; the physical coding sub-layer codes the packaged data and sends the coded data to the physical medium adaptation layer; and the physical medium adaptation layer converts the coded data into serial data and transmits the serial data back to the controller layer. According to the invention, the BIST test assembly meeting the PIPE protocol requirement is embedded in the PCS layer, and compared with a traditional BIST test scheme, through early-stage simulation and post-silicon test data result analysis, not only can the electrical performance test requirement of an original analog circuit be met, but also the test coverage of the PCS layer is increased. And the full-stack coverage test from the physical signal to the protocol logic is realized.
Owner:博越微电子(江苏)有限公司

High-quality micro-benchmark performance test automatic generation method and device based on large language model

The invention discloses a high-quality micro-benchmark performance test automatic generation method and device based on a large language model, and the method comprises the steps: carrying out the analysis of a target project, and constructing a system dependence graph; analyzing a calling link of the target method by utilizing the system dependency graph, and guiding the large language model to perform performance classification according to source codes in the calling link; the performance classification result is matched with a predefined JMH parameter template; contextual information and a parameter template of a target method are integrated, and a large language model is effectively guided to generate a high-quality micro-benchmark performance test case; and analyzing the successfully generated micro-benchmark performance test code, detecting bad practices in the code by utilizing the bad practice rule base, repairing the bad practice code, and finally generating an efficient and accurate test case. The method is superior to a traditional method in the aspects of test generation accuracy, performance defect detection capability and the like, and the generated test case has remarkable advantages in the aspects of understandability and performance measurement accuracy.
Owner:ZHEJIANG UNIV +1

Communication protocol conformance test method and system

The invention provides a communication protocol consistency test method and system. Key function points are extracted by analyzing a target protocol document; based on the key function points, a predefined first prompt template is applied to generate a test case prompt, a large language model is guided to generate a standardized test case corresponding to each key function point, and the first prompt template comprises k few-sample examples; dynamically retrieving a related code context from a pre-constructed long-term memory library through a retrieval enhancement generation mechanism, generating a code generation prompt by applying a predefined second prompt template based on the standardized test case and the related code context, and generating an executable test code based on the code generation prompt; and performing iterative optimization on the executable test code through the large language model, and generating a new code generation prompt based on a code execution result of the previous iteration and the retrieved related code context in each iteration. The test case can be automatically generated and dynamically adapted, and the test coverage rate, efficiency and flexibility are improved.
Owner:TSINGHUA UNIVERSITY

Code generation method and related equipment

The invention provides a code generation method which is executed by a code generation system, the code generation system is used for automatically generating a test code, and the method comprises the following steps: receiving a test step description input by a user, retrieving a text code pair vector library and a test method vector library according to the test step description, the text code pair vector library comprises description texts and vectors formed by corresponding test codes, and the test method vector library comprises vectors formed by the test method calling examples; and according to the test code snippets and the test methods corresponding to the similar test step descriptions, reasoning through a large language model (LLM), generating test codes corresponding to the test step descriptions, and presenting the test codes corresponding to the test step descriptions to a user. According to the method, retrieval and LLM reasoning are combined, the complex test code can be automatically generated, and the automatic development efficiency of the complex test scene is improved.
Owner:HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD

Context engine test generation

The present disclosure is directed toward systems, methods, and non-transitory computer-readable media for generating function code and test code to determine that the function code satisfies an intent query. For example, the disclosed systems utilize a large language model to process an intent query and generate function code that defines one or more processes whose execution satisfies the intent query. In addition, the disclosed systems also utilize the large language model to generate test code that defines a function test for determining that the function code satisfies the intent query. Moreover, the disclosed systems can execute the test code to determine that the function code satisfies the intent query.
Owner:DROPBOX INC

Test code generation method and device, equipment, storage medium and product

The invention discloses a test code generation method and device, equipment, a storage medium and a product, and relates to the technical field of computers.The test code generation method comprises the steps that on the basis of an abstract syntax tree, context extraction is conducted on a variable type and a calling mode of a to-be-tested code, and key context information is obtained; the key context information, a preset test scene prompt word and a preset coding style prompt word are sent to a large model, a test code output by the large model is received, the large model carries out test scene analysis on the key context information according to the test scene prompt word and the coding style prompt word, and the test code output by the large model is obtained. And outputting the corresponding test code. According to the method, the cue word and the key context information extracted by the abstract syntax tree are input into the large model, and the test code meeting the specific coding style and the test scene requirement is generated by the large model, so that the workload of generating the test code is obviously reduced, and the working efficiency is obviously improved.
Owner:CHINA MERCHANTS BANK

Unit test case generation method and device, equipment and medium

The invention relates to the technical field of research and development management and the field of financial science and technology, and discloses a unit test case generation method, which comprises the following steps: compiling a current project to generate a class file, carrying out byte code analysis on the class file, traversing each class and method in the class file, and extracting control flow information and calling relation information. Determining circle complexity and call chain information of each method based on the extracted information, and generating path information required by the test case; simulating the execution path to generate a basic unit test case, determining an effective test case by utilizing an evaluation standard, and taking the effective test case as a template for generating a new case; and identifying the to-be-tested code of which the test case is not generated in the class file, generating a new test case by using the template, integrating the effective test case and the new test case, and generating a complete unit test case set. According to the method, by combining byte code analysis and path simulation, dependence on code context is reduced, and the effectiveness of the test case is improved through variation test and coverage rate evaluation.
Owner:PING AN BANK CO LTD

Data testing method and device, storage medium and computer program product

The invention discloses a data testing method and device, a storage medium and a computer program product. The method comprises the steps of obtaining an initial code file and a target prompt statement; analyzing and processing the initial code file and the target prompt statement by using a natural language processing model to generate a unit test code; compiling the unit test code to obtain a compiling result; and in response to determining that the unit test code is compiled based on the compilation result, executing the unit test code to obtain a test execution result. According to the method and the device, the technical problems of low test efficiency and poor test coverage rate in a unit test process in related technologies are solved.
Owner:GUANGZHOU XIAOPENG MOTORS TECH CO LTD

Server test system and method, electronic equipment and storage medium

The invention discloses a server test system and method, electronic equipment and a storage medium, and relates to the technical field of data processing. Multi-level information of power-on self-test codes, test data and optical signals is collected for a server; meanwhile, the starting-up process of the server is divided into different starting-up stages according to the code stream, namely the starting-up self-test code, and the server is tested through different test strategies in the different starting-up stages; according to the method, multi-level state sensing and optical intelligent detection are carried out in combination with multi-level information, the coverage degree of server testing is improved, and meanwhile, the server testing efficiency is improved through testing of multiple starting-up stages of a full-automatic process and automatic analysis of testing data. Therefore, the technical problem of how to improve the test efficiency and the coverage degree of the server test can be solved, and the technical effect of improving the test efficiency and the coverage degree of the server test is achieved.
Owner:INSPUR SUZHOU INTELLIGENT TECH CO LTD