CN111240987A - Migration program detection method and device, electronic equipment and computer readable storage medium - Google Patents

Migration program detection method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN111240987A
CN111240987A CN202010049678.4A CN202010049678A CN111240987A CN 111240987 A CN111240987 A CN 111240987A CN 202010049678 A CN202010049678 A CN 202010049678A CN 111240987 A CN111240987 A CN 111240987A
Authority
CN
China
Prior art keywords
function
detected
program
test result
test
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
CN202010049678.4A
Other languages
Chinese (zh)
Other versions
CN111240987B (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 QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202010049678.4A priority Critical patent/CN111240987B/en
Publication of CN111240987A publication Critical patent/CN111240987A/en
Application granted granted Critical
Publication of CN111240987B publication Critical patent/CN111240987B/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
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Abstract

The embodiment of the invention provides a migration program detection method and device, electronic equipment and a computer readable storage medium. The method comprises the following steps: analyzing a code of a transplanting program to obtain function information of a function to be detected, which is included in the transplanting program; according to the sequence that the depended function to be detected has precedence over the depended function to be detected, sequentially aiming at each function to be detected, generating a test case of the function to be detected according to the function information of the function to be detected; executing the test case under the original platform environment of the transplanted program by using the function to be detected to obtain a first test result, and executing the test case under the target platform environment of the transplanted program by using the function to be detected to obtain a second test result; comparing whether the first test result is the same as the second test result; and if the first test result is different from the second test result, determining that the function to be detected is abnormal. The program migration efficiency can be improved.

Description

Migration program detection method and device, electronic equipment and computer readable storage medium
Technical Field
The present invention relates to the field of program detection technologies, and in particular, to a method and an apparatus for detecting a migration program, an electronic device, and a computer-readable storage medium.
Background
For practical purposes, a developer may need to migrate a program running in one environment to run in another environment. For example, the program a is a program running in a CPU (Central Processing Unit) platform environment, and may need to be migrated to an FPGA (Field programmable gate Array) platform environment to run due to the performance of the CPU platform.
However, since there is a difference between the two environments, after the program is migrated to a new environment and runs, some or all of the functions may not be implemented. In the related art, a developer may manually detect the code of the migrated program to find the reason why the function cannot be realized, but the finding process requires a person with development experience to complete and may take much time. Resulting in less efficient program migration.
Disclosure of Invention
Embodiments of the present invention provide a migration program detection method, apparatus, electronic device, and computer-readable storage medium, so as to improve program migration efficiency. The specific technical scheme is as follows:
in a first aspect of the present invention, there is provided a migration program detection method, the method comprising:
analyzing a code of a transplanting program to obtain function information of a function to be detected, which is included in the transplanting program;
according to the sequence that the depended function to be detected has precedence over the depended function to be detected, sequentially aiming at each function to be detected, generating a test case of the function to be detected according to the function information of the function to be detected;
executing the test case under the original platform environment of the transplanted program by using the function to be detected to obtain a first test result, and executing the test case under the target platform environment of the transplanted program by using the function to be detected to obtain a second test result;
comparing whether the first test result is the same as the second test result;
and if the first test result is different from the second test result, determining that the function to be detected is abnormal.
In a possible embodiment, after analyzing the code of the migration program and obtaining the function information of the function to be detected included in the program to be detected, the method further includes:
displaying the function information;
acquiring a modification instruction input aiming at the function information;
according to the modification instruction, modifying the function information to obtain modified function information;
the generating of the test case of the function to be detected according to the function information includes:
and generating a test case of the function to be detected according to the changed function information.
In a possible embodiment, the analyzing the code of the migration program to obtain function information of the function to be detected included in the program to be detected includes:
traversing a code of a migration program, and acquiring one or more of the following information of a function to be detected included in the migration program as intermediate information of the function to be detected: function name, function parameters, line number of the starting line of the function in the code, line number of the ending line of the function in the code and return type;
traversing the code of the transplanting program, and determining the calling relationship between the function to be detected and other functions as the structural information of the function to be detected;
and taking the intermediate information and the structural information of the function to be detected as the function information.
In a possible embodiment, the migrating program is a CPU platform, and executing the test case in the environment of the migrating program by using the function to be tested to obtain a first test result includes:
generating a source program file of the function to be detected under the CPU platform according to the function information;
compiling the source program file to generate a first test program under a CPU platform;
and calling the first test program to execute the test case to obtain a first test result.
In a possible embodiment, the step of executing the test case by using the function to be tested in the target platform environment of the migration program to obtain a second test result includes:
according to the code of the transplanting program, packaging the function to be detected to obtain a command file;
compiling the command file to generate a second test program under the FPGA platform;
and calling the second test program to execute the test case to obtain a second test result.
In a possible embodiment, before the generating, for each function to be detected, a test case of the function to be detected according to the function information of the function to be detected in sequence according to an order that the depended function to be detected has precedence over the depended function to be detected, the method further includes:
constructing a tree structure based on the dependency relationship among the functions to be detected, wherein each node in the tree structure corresponds to one function to be detected, and the function to be detected corresponding to each node depends on the function to be detected corresponding to the father node of the node;
traversing each node of the tree starting from a root node of the tree;
arranging each function to be detected according to the sequence of the visited nodes when traversing the tree structure to obtain a function sequence to be detected;
the generating a test case of the function to be detected according to the function information of the function to be detected, sequentially aiming at each function to be detected according to the sequence that the depended function to be detected has precedence over the depended function to be detected, comprises:
and sequentially aiming at each function to be detected in the function sequence to be detected, generating a test case of the function to be detected according to the function information of the function to be detected.
In a possible embodiment, the first test result is represented in the form of a first text file and the second test result is represented in the form of a second text file;
the comparing whether the first test result and the second test result are the same includes:
comparing the text contents in the first text file and the second text file;
if the text contents in the first text file and the second text file are the same, determining that the first test result is the same as the second test result;
and if the text contents in the first text file and the second text file are different, determining that the first test result is different from the second test result.
In a second aspect of the present invention, there is provided a migration program detection apparatus, comprising:
the code analysis module is used for analyzing the codes of the transplanting program to obtain function information of the function to be detected, wherein the function information is contained in the transplanting program;
the case generating module is used for sequentially aiming at each function to be detected according to the sequence that the depended function to be detected has priority over the depended function to be detected, and generating a test case of the function to be detected according to the function information of the function to be detected;
the function testing module is used for executing the test case under the original platform environment of the transplanted program by using the function to be tested to obtain a first test result, and executing the test case under the target platform environment of the transplanted program by using the function to be tested to obtain a second test result;
the result comparison module is used for comparing whether the first test result is the same as the second test result or not;
and the conclusion output module is used for determining that the function to be detected is abnormal if the first test result is different from the second test result.
In a possible embodiment, the code parsing module is specifically configured to traverse a code of a migration program, and obtain one or more of the following information of a function to be detected included in the migration program, as intermediate information of the function to be detected:
function name, function parameters, line number of the starting line of the function in the code, line number of the ending line of the function in the code and return type;
traversing the code of the transplanting program, and determining the calling relationship between the function to be detected and other functions as the structural information of the function to be detected;
and taking the intermediate information and the structural information of the function to be detected as function information.
In a possible embodiment, the original platform of the migration program is a CPU platform, and the function testing module is specifically configured to generate a source program file of the function to be detected under the CPU platform according to the function information;
compiling the source program file to generate a first test program under a CPU platform;
and calling the first test program to execute the test case to obtain a first test result.
In a possible embodiment, the target platform of the migration program is a field programmable gate logic array FPGA platform, and the function test module is specifically configured to package the function to be detected according to a code of the migration program to obtain a command file;
compiling the command file to generate a second test program under the FPGA platform;
and calling the second test program to execute the test case to obtain a second test result.
In a possible embodiment, the code parsing module is further configured to construct a tree structure based on a dependency relationship between the functions to be detected before generating a test case of the function to be detected according to the function information of the function to be detected for each function to be detected in sequence according to a priority order of the depended function to be detected over the depended function to be detected, where each node in the tree structure corresponds to one function to be detected, and the function to be detected corresponding to each node depends on the function to be detected corresponding to a parent node of the node;
traversing each node of the tree starting from a root node of the tree;
arranging each function to be detected according to the sequence of the visited nodes when traversing the tree structure to obtain a function sequence to be detected;
the case generating module is specifically configured to sequentially generate, for each function to be detected in the sequence of functions to be detected, a test case for the function to be detected according to the function information of the function to be detected.
In a possible embodiment, the comparing the first test result and the second test result is specifically configured to determine whether the first test result and the second test result are the same, including:
comparing the text contents in the first text file and the second text file;
if the text contents in the first text file and the second text file are the same, determining that the first test result is the same as the second test result;
and if the text contents in the first text file and the second text file are different, determining that the first test result is different from the second test result.
In a third aspect of the present invention, an electronic device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
a memory for storing a computer program;
a processor adapted to perform the method steps of any of the above first aspects when executing a program stored in the memory.
In a fourth aspect of the present invention, a computer-readable storage medium is provided, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, performs the method steps of any of the above-mentioned first aspects.
The migration program detection method, the migration program detection device and the electronic equipment provided by the embodiment of the invention can carry out automatic detection on the migration program by reasonably setting the detection sequence by taking the function as a unit so as to shorten the time spent on detection and effectively improve the efficiency of program migration. Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart illustrating a migration procedure detection method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a code analysis method according to an embodiment of the present invention
FIG. 3a is a schematic engineering structure diagram of an engineering for transplant procedure detection according to an embodiment of the present invention;
FIG. 3b is a schematic flow chart illustrating a migration procedure detection method according to an embodiment of the present invention;
FIG. 3c is an engineering schematic of a data preparation phase;
FIG. 3d is a schematic diagram of the engineering principle of the function detection stage;
FIG. 4 is a schematic structural diagram of a migration procedure detection apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to more clearly describe the migration program detection method provided in the embodiment of the present invention, an exemplary application scenario will be described below, and the migration program detection method provided in the embodiment of the present invention may also be applied to other application scenarios, which is not limited in this example.
Developers can develop programs using Open Computing Language (OpenCL) based on C/C + + to develop programs that can implement various predetermined functions. The programs are originally designed to run in a CPU platform environment, and for practical needs, the programs need to be transplanted to an FPGA platform environment for execution. Because the CPU platform environment is different from the FPGA platform environment, when the program is transplanted to the FPGA platform environment, part or all of the functions that the program can realize when executed in the CPU platform environment may not be realized, and thus the transplanted program needs to be detected, and potential problems in the transplanted program are discovered and solved in time.
Referring to fig. 1, fig. 1 is a schematic flow chart of a migration program detection method according to an embodiment of the present invention, which may include:
s101, analyzing the code of the migration program to obtain function information of the function to be detected, wherein the function information is included in the migration program.
And S102, sequentially aiming at each function to be detected according to the sequence that the depended function to be detected has precedence over the depended function to be detected, and generating a test case of the function to be detected according to the function information of the function to be detected.
S103, executing the test case by using the function to be detected in the original platform environment of the transplanting program to obtain a first test result.
And S104, executing the test case by using the function to be detected in the target platform environment of the migration program to obtain a second test result.
S105, comparing whether the first test result is the same as the second test result.
And S106, if the first test result is different from the second test result, determining that the function to be detected is abnormal.
It can be understood that, if the first test result is different from the second test result, it may be considered that the function to be detected has a difference when the function to be detected operates in the original platform environment and the target platform environment, where the difference may be caused by a problem that the function to be detected is abnormal, or may be caused by an abnormality in a function that the function to be detected depends on. In the embodiment of the invention, the functions are detected according to the sequence of the dependency relationship, so that the possibility that the functions depended on by the functions to be detected are abnormal to cause difference can be effectively eliminated, and the functions to be detected can be considered to be abnormal in the transplanting process when the first test result is different from the second test result. Therefore, the embodiment can be used for carrying out automatic detection on the program to be transplanted by reasonably setting the detection sequence by taking the function as a unit so as to shorten the time spent on detection and effectively improve the efficiency of program transplantation.
In S101, taking as an example that the migration program is a program developed by OpenCL based on C/C + +, the code of the migration program is represented in the form of a command file (a file with the suffix of cl, hereinafter referred to as a cl file), and the cl file of the migration program may be parsed.
According to different application scenarios, the function to be detected may be one function or a plurality of functions, and the function to be detected may be all functions in the migration program or may be a part of functions in the migration program. It is understood that the code corresponding to one function may be regarded as a description of the function in the form of a computer language, and therefore, the function information may be obtained by parsing the code. The process of resolving the code will be described in detail in the following embodiments, and will not be described herein.
In S102, one function depends on another function, which means that the output of the other function needs to be used during the operation of the one function. For example, assuming that a function B is called in a function a, a return value to an output of the function B needs to be used in a running process of the function a, and thus the function a depends on the function B.
The test cases of the functions to be detected are generated according to the function information, one or more test cases may be generated for each function to be detected, and the number of the generated test cases may be different for different functions to be detected. A test case may be used to specify an environment and an input, and when the test case is executed, a function is caused to process the specified input in the environment specified by the test case.
The number of test cases generated may be different for each function to be detected. For one function to be detected, the more test cases are generated, the more situations can be covered by the test cases, and therefore the function to be detected can be detected more comprehensively. For a function to be detected, the fewer test cases are generated, and the calculation amount consumed by transplanting program detection can be reduced. The number of test cases generated for each function to be detected can be set according to actual requirements or user experience.
In a possible embodiment, the function information may be represented by a tree structure, and each node in the tree structure corresponds to one function to be detected, and the function to be detected corresponding to each node depends on the function to be detected corresponding to the parent node of the node.
In this example, the function sequence to be detected may be obtained by traversing each node of the tree structure from a root node of the tree structure and according to the corresponding function to be detected; and sequentially aiming at each function to be detected in the function sequence to be detected, generating a test case of the function to be detected according to the function information of the function to be detected. It can be understood that, since the function to be detected corresponding to the node in the tree structure depends on the function corresponding to the parent node of the node, the function to be detected depending on other functions to be detected in the sequence of the function to be detected obtained by traversing the tree structure is located behind the function to be detected depending on the function to be detected.
By adopting the embodiment, the dependency relationship among the functions to be detected can be more simply and clearly shown through the tree structure, and the detected sequence of each function to be detected can be completely and accurately determined by traversing the tree structure. It is to be understood that, in other possible application scenarios, the order of the functions to be detected may also be determined in other ways.
The function information can reflect possible operation environment and possible input of the function to be detected to a certain extent, so that a test case can be generated according to the function information of the function to be detected.
In S103, the original platform of the migration program may be the platform where the migration program is located before the migration. Taking the example of transplanting the transplanting program from the CPU platform environment to the FPGA platform environment, the original platform is the CPU platform. It can be understood that the transplanting program should theoretically work normally before the transplanting, that is, the transplanting program executes the test cases under the original platform environment, and the obtained test result theory is accurate.
In S104, the destination platform of the migration program may be a platform to which the migration program needs to be migrated. Still taking the example of transplanting the transplanting program from the CPU platform environment to the FPGA platform environment, the destination platform may be an FPGA platform. It should be understood that fig. 1 is only a flowchart of a migration program detection method provided in an embodiment of the present invention, and in other possible embodiments, S104 may also be executed before S103, or may also be executed in parallel with S103 or executed alternately, which is not limited in this embodiment.
In S105, if a plurality of test cases are generated for one function to be tested, the first test result and the second test result each include a plurality of results of the plurality of test cases. In this case, the first test result is the same as the second test result, which means that the first test result and the second test result of each test case are the same.
For example, assume that 3 test cases are generated for the function a to be detected, and are respectively denoted as test cases 1 to 3. Suppose that the function A to be detected is used to execute the test case 1 under the original platform environment to obtain a first test result 1, execute the test case 2 to obtain a first test result 2, and execute the test case 3 to obtain a first test result 3. And supposing that the function A to be detected is used for executing the test case 1 under the target platform environment to obtain a second test result 1, executing the test case 2 to obtain a second test result 2, and executing the test case 3 to obtain a second test result 3. The first test result is the same as the second test result, which may mean that the first test result 1 is the same as the second test result 1, and the first test result 2 is the same as the second test result 2, and the first test result 3 is the same as the second test result 3.
The comparison may be different according to different application scenarios, and in a possible embodiment, the first test result may be represented in the form of a first text file, and the second test result may be represented in the form of a second text file. The text contents in the first text file and the second text file may be compared, and if the text contents in the first text file and the second text file are the same, it is determined that the first test result is the same as the second test result. And if the text contents in the first text file and the second text file are different, determining that the first test result is different from the second test result.
When comparing the text contents, the character-by-character comparison may be performed, and whether the characters in the first text file and the characters in the second text file having the same sequence are the same or not may be performed. And if the characters with the same sequence in the first text file and the second text file are the same, determining that the text contents of the first text file and the second text file are the same. And if at least one (or at least a preset number of) same-order characters in the first text file and the second text file are different, determining that the text contents of the first text file and the second text file are different.
In 106, if the first test result and the second test result of the function to be detected are different, it may be considered that the function to be detected, which operates in the original platform environment, and the output of the function to be detected, which operates in the target platform environment, are different in the same input in at least one possible application scenario. As described above, the test case is executed by the migration program in the original platform environment, and the obtained test result theory is accurate. Therefore, it can be considered that the function to be detected is abnormal during the migration process at this time.
Referring to fig. 2, a process of resolving a code will be described below, where fig. 2 is a schematic flowchart of a code resolving method provided in an embodiment of the present invention, and the process may include:
s201, traversing the code of the transplanting program, and acquiring one or more pieces of information of the function to be detected included in the transplanting program as intermediate information in the function to be detected.
Wherein the one or more information may refer to one or more of the following information:
function name, function argument, line number of the function's starting line in the code, line number of the function's ending line in the code, return type.
S202, traversing the code of the transplanting program, and determining the calling relation between the function to be detected and other functions as the structural information of the function to be detected.
The code of the first traversal of the migration degree can determine the function name of each function in the migration program, and the calling relation among the functions can be obtained through sorting according to the determined function name. The calling relationship may be represented in different forms, for example, in the form of a tree structure. If a function calls another function, the function is a child of the other function in the tree structure.
And S203, taking the intermediate information and the structure information of the function to be detected as function information.
In this example, the function information of the function to be detected is composed of the intermediate information and the structure information of the function to be detected.
It is understood that, by limiting the accuracy of the tools and/or methods used for parsing the code, the function information obtained by parsing the code may not be accurate enough, or may have a certain deficiency. In view of this, in a possible embodiment, after analyzing the code of the migration program to obtain the function information of the function to be detected, the function information may be displayed in a different manner according to different application scenarios, for example, by displaying the function information in a table form in an xls file. And the developer judges whether to correct or supplement the displayed function information, and can input a modification instruction if the correction or the supplement is needed. And the execution main body changes the function information according to the obtained modification instruction to obtain the changed function information, and then generates the test case of the function to be detected according to the changed function information.
By adopting the embodiment, the developer can manually change the function information to obtain more accurate function information. Based on more accurate function information, more reasonable test cases can be generated so as to improve the accuracy of the detection result.
In order to more clearly describe the migration program detection method provided by the embodiment of the present invention, the migration program detection method provided by the embodiment of the present invention will be described in detail below with reference to an application scenario in which a program developed by OpenCL based on C/C + + is migrated from a CPU platform environment to an FPGA platform environment. The application scenario is only one possible application scenario of the migration program detection method provided in the embodiment of the present invention, and other possible embodiments may also be applied to other application scenarios, which is not limited in this embodiment.
In this application scenario, assuming that a Project (Project) for detecting a migration program is referred to as a vericationproject, a Project directory structure of the vericationproject may be as shown in fig. 3a, where a solid box represents a Project original file, that is, a file that already exists before the Project runs, a dotted box represents a file generated during the Project running process, a thin-framed long box represents a middle file, a short box represents a folder, and a thick-framed long box represents a source code file. In different application scenarios, the naming of each file may be different according to different actual requirements.
In the embodiment shown in fig. 3a, the project may include five folders of data (data), in (input), out (output), share (share), and src (resource). Since the role of the folders is to efficiently manage files, only the role of the files within each folder will be described below. It should be understood that fig. 3a is only a schematic diagram of a possible project directory structure of a project for detecting a migration program according to an embodiment of the present invention, and in other possible embodiments, files with different functions may be merged according to actual requirements, or one file may be split into multiple files for implementing the function implemented by the one file according to actual requirements, which is not limited in this embodiment.
Cl: a file for storing code of the migration program;
ini: the configuration file is used for configuring the operation parameters when the Verificationproject runs;
xls: a form file for presenting function information to a user;
cpp under in file: cpp (c + +) file for saving the code of the vericationproject main function;
makefile: script files for managing each file in the VerificationProject, such as for specifying the compiling sequence of each file, which files need to be recompiled, and the like;
cpp: the cpp file is used for storing codes of the test cases under the environment of the CPU platform;
txt: a text file for storing the test results;
functional name.cl: the command file is used for storing the encapsulation function obtained after kernel encapsulation of the function to be detected;
cpp under the out/fpga/test/host/src folder: cpp file for storing codes of test cases in fpga platform environment
DelareCPuVar. txt: the text file is used for storing the test vector under the environment of the CPU platform;
declervar _. txt: the system comprises a text file used for storing test vectors under the FPGA platform environment;
txt: the text document is used for storing the intermediate information, and the intermediate information can be referred to the related description, which is not described herein again;
txt, subfincinfo: for the text document for storing the structural information, reference may be made to the foregoing related description for the structural information, which is not described herein again.
Py: the system comprises a migration program, a clfile and a clfile, wherein the clfile is used for traversing the in folder to acquire intermediate information of each function in the migration program;
py: the method comprises the steps of acquiring structural information of each function in a transplanting program by combining intermediate information;
py: the device is used for reading the intermediate information in the subfincfo.txt and generating data.xls;
py: the test vector is generated and respectively stored in DelareCpuVar _. txt and DeclareVar _. txt;
py: the CPU is used for generating a cpu Main.
Py: the method is used for performing kernel packaging on the function to be detected in the transplanting program;
py: the test system is used for detecting whether the first test result is the same as the second test result or not and reporting the difference between the first test result and the second test result;
py: for launching each py file;
py: the public function storage module is used for storing public functions, and the stored public functions can be different according to different actual requirements;
py: for traversing the search structure in the migration procedure.
Referring to fig. 3b, the following will describe the working principle of the VerificationProject, where fig. 3b is a schematic flow chart of a migration program detection method provided by an embodiment of the present invention, and the method may include:
s301, traverse the target.cl file, and generate funcinfo.txt which includes information such as a function name, a function shape parameter, a line number of a start line of the function in the target.cl file, a line number of an end line of the function in the target.cl file, a line number of a line where the function name is located, a return type, and the like.
And S302, traversing target.cl again and depending on funcinfo.txt, obtaining the tree structure relationship of the function name according to the called parent-child node relationship among the functions, and storing the tree structure relationship into subfincfo.txt.
It can be understood that since the function name, the line number of the starting line of the function in the target.cl file, and the line number of the ending line are stored in funcinfo.txt, when the target.cl is traversed again, the relation of call between the functions can be determined according to the information in funcinfo.txt. For example, a function with function name "a", the line number of the start line is 101, the line number of the end line is 105, and the function name "B" appears in the line 103, it can be determined that the function with function name "B" is called in the function with function name "a".
And S303, generating data.xls according to subfincfo.txt.
The information in data.xls may have the same meaning as that of the information in subfincinfo.txt, except for the form of representation. Txt is a text file in which information is represented in the form of text, and data.xls is a table file in which information is represented in the form of a table. The subfincfo. txt may be converted into data.xls by using a preset algorithm for converting text into a table.
And S304, displaying the data.
S305, acquiring a modification instruction input aiming at the data.xls, and modifying the data.xls according to the modification instruction.
The developer can input a modification instruction through a program with an xls file editing function so as to modify the data.
And S306, generating a preset number of test cases according to the function information stored in the modified data.
Since the test cases need to be executed in the CPU platform environment and the FPGA platform environment, respectively, generating one test case may be generating two different versions of files, and exemplarily, generating one test case may be generating one declercpu _. Wherein, the mark is used for distinguishing the file of different test cases, the declercpu txt is used for executing the test case in the environment of the CPU platform, and the declerVar txt is used for executing the test case in the environment of the FPGA platform.
Py may be to acquire a function name, a function return type, a function level, a form parameter name, an input/output type of the form parameter, an array offset, and array length information from data.xls by using readdata.
And S307, generating a CPU main source program file of the function to be detected in the CPU platform environment and a main source program file of the function to be detected in the FPGA platform environment according to the function information of the function to be detected, collecting target.cl files, packaging the function to be detected, and generating a funcName.cl file.
The function information may be read from data. xls in S306, and the funcName represents the function name of the function to be detected. Information read by readdata.py from data.xls may be input to createccpumain.py to generate a source program file cpp in the CPU platform environment using createccpumain.py, and information read by readdata.py from data.xls may be input to modifymain.py to generate a source program file main.cpp at host end in the FPGA platform environment using modifymain.py. The method for generating the test case may adopt any method for generating the test case in the related art, and this embodiment does not limit this.
S308, compiling the CPU Main. cpp to obtain a first test program under the CPU platform, calling the first test program to execute DeclarCpu _. txt to obtain a first test result, and storing the obtained first test result in a result.
And S309, compiling main.cpp and funcName.cl to obtain a second test program under the FPGa platform, calling the second test program to execute Deccle _. txt to obtain a second test result, and storing the obtained second test result in a result.txt file.
It is understood that S308 and S309 may be performed in parallel or alternatively.
S310, comparing the first test result and the second test result in the result.txt, and storing the comparison result in the report.txt.
The representation form of the comparison result may be different according to different application scenarios, and in a possible embodiment, if the first test result and the second test result of a function to be detected are different, the function name of the function to be detected, and the line number of the starting line, the line number of the ending line, and the line number of the line where the function name is located in the target. A developer can quickly locate functions with exceptions in the target.cl file by browsing the report.txt file and repair the functions.
For more clearly explaining the working principle of the VerificationProject provided by the embodiment of the present invention, reference may be made to fig. 3c and fig. 3d, where fig. 3c is a schematic diagram of the VerificationProject in the data preparation phase, and fig. 3d is a schematic diagram of the VerificationProject in the function verification phase. The functions of each file may refer to the related descriptions, which are not described herein again, and the thick black lines indicate data transfer and the thin black lines indicate compilation execution.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a transplantation procedure detection apparatus according to an embodiment of the present invention, which may include:
the code analysis module 401 is configured to analyze a code of a migration program to obtain function information of a function to be detected included in the migration program;
a use case generating module 402, configured to sequentially generate, for each function to be detected, a test use case of the function to be detected according to the function information of the function to be detected, according to an order in which the depended function to be detected takes precedence over the depended function to be detected;
a function testing module 403, configured to execute the test case in the original platform environment of the migration program by using the function to be detected to obtain a first test result, and execute the test case in the destination platform environment of the migration program by using the function to be detected to obtain a second test result;
a result comparing module 404, configured to compare whether the first test result is the same as the second test result;
a conclusion output module 405, configured to determine that the function to be detected is abnormal if the first test result is different from the second test result.
In a possible embodiment, the code parsing module 401 is specifically configured to traverse the code of the migration program, and obtain one or more of the following information of the function to be detected included in the migration program, as the intermediate information of the function to be detected:
function name, function parameters, line number of the starting line of the function in the code, line number of the ending line of the function in the code and return type;
traversing the code of the transplanting program, and determining the calling relationship between the function to be detected and other functions as the structural information of the function to be detected;
and taking the intermediate information and the structural information of the function to be detected as function information.
In a possible embodiment, the original platform of the migration program is a CPU platform, and the function testing module 403 is specifically configured to generate a source program file of the function to be detected under the CPU platform according to the function information;
compiling the source program file to generate a first test program under a CPU platform;
and calling the first test program to execute the test case to obtain a first test result.
In a possible embodiment, the target platform of the migration program is a field programmable gate logic array FPGA platform, and the function test module 403 is specifically configured to package the function to be detected according to a code of the migration program to obtain a command file;
compiling the command file to generate a second test program under the FPGA platform;
and calling the second test program to execute the test case to obtain a second test result.
In a possible embodiment, the code parsing module 401 is further configured to construct a tree structure based on a dependency relationship between the functions to be detected before the test case of the function to be detected is generated according to the function information of the function to be detected for each function to be detected in sequence according to an order that the depended function to be detected has precedence over the depended function to be detected, where each node in the tree structure corresponds to one function to be detected, and the function to be detected corresponding to each node depends on the function to be detected corresponding to a parent node of the node;
traversing each node of the tree starting from a root node of the tree;
arranging each function to be detected according to the sequence of the visited nodes when traversing the tree structure to obtain a function sequence to be detected;
the use case generating module 402 is specifically configured to sequentially generate, for each function to be detected in the sequence of functions to be detected, a test case for the function to be detected according to the function information of the function to be detected.
In a possible embodiment, the comparing the first test result and the second test result is specifically configured to determine whether the first test result and the second test result are the same, including:
comparing the text contents in the first text file and the second text file;
if the text contents in the first text file and the second text file are the same, determining that the first test result is the same as the second test result;
and if the text contents in the first text file and the second text file are different, determining that the first test result is different from the second test result.
An embodiment of the present invention further provides an electronic device, as shown in fig. 5, which includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, where the processor 501, the communication interface 502 and the memory 503 complete mutual communication through the communication bus 504,
a memory 503 for storing a computer program;
the processor 501, when executing the program stored in the memory 503, implements the following steps:
analyzing a code of a transplanting program to obtain function information of a function to be detected, which is included in the transplanting program;
according to the sequence that the depended function to be detected has precedence over the depended function to be detected, sequentially aiming at each function to be detected, generating a test case of the function to be detected according to the function information of the function to be detected;
executing the test case under the original platform environment of the transplanted program by using the function to be detected to obtain a first test result, and executing the test case under the target platform environment of the transplanted program by using the function to be detected to obtain a second test result;
comparing whether the first test result is the same as the second test result;
and if the first test result is different from the second test result, determining that the function to be detected is abnormal.
In a possible embodiment, after analyzing the code of the migration program and obtaining the function information of the function to be detected included in the program to be detected, the method further includes:
displaying the function information;
acquiring a modification instruction input aiming at the function information;
according to the modification instruction, modifying the function information to obtain modified function information;
the generating of the test case of the function to be detected according to the function information includes:
and generating a test case of the function to be detected according to the changed function information.
In a possible embodiment, the analyzing the code of the migration program to obtain function information of the function to be detected included in the program to be detected includes:
traversing a code of a migration program, and acquiring one or more of the following information of a function to be detected included in the migration program as intermediate information of the function to be detected: function name, function parameters, line number of the starting line of the function in the code, line number of the ending line of the function in the code and return type;
traversing the code of the transplanting program, and determining the calling relationship between the function to be detected and other functions as the structural information of the function to be detected;
and taking the intermediate information and the structural information of the function to be detected as the function information.
In a possible embodiment, the migrating program is a CPU platform, and executing the test case in the environment of the migrating program by using the function to be tested to obtain a first test result includes:
generating a source program file of the function to be detected under the CPU platform according to the function information;
compiling the source program file to generate a first test program under a CPU platform;
and calling the first test program to execute the test case to obtain a first test result.
In a possible embodiment, the step of executing the test case by using the function to be tested in the target platform environment of the migration program to obtain a second test result includes:
according to the code of the transplanting program, packaging the function to be detected to obtain a command file;
compiling the command file to generate a second test program under the FPGA platform;
and calling the second test program to execute the test case to obtain a second test result.
In a possible embodiment, before the generating, for each function to be detected, a test case of the function to be detected according to the function information of the function to be detected in sequence according to an order that the depended function to be detected has precedence over the depended function to be detected, the method further includes:
constructing a tree structure based on the dependency relationship among the functions to be detected, wherein each node in the tree structure corresponds to one function to be detected, and the function to be detected corresponding to each node depends on the function to be detected corresponding to the father node of the node;
traversing each node of the tree starting from a root node of the tree;
arranging each function to be detected according to the sequence of the visited nodes when traversing the tree structure to obtain a function sequence to be detected;
the generating a test case of the function to be detected according to the function information of the function to be detected, sequentially aiming at each function to be detected according to the sequence that the depended function to be detected has precedence over the depended function to be detected, comprises:
and sequentially aiming at each function to be detected in the function sequence to be detected, generating a test case of the function to be detected according to the function information of the function to be detected.
In a possible embodiment, the first test result is represented in the form of a first text file and the second test result is represented in the form of a second text file;
the comparing whether the first test result and the second test result are the same includes:
comparing the text contents in the first text file and the second text file;
if the text contents in the first text file and the second text file are the same, determining that the first test result is the same as the second test result;
and if the text contents in the first text file and the second text file are different, determining that the first test result is different from the second test result.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, and when the instructions are executed on a computer, the instructions cause the computer to execute any of the migration program detection methods in the above embodiments.
In yet another embodiment, a computer program product containing instructions is provided, which when run on a computer, causes the computer to perform any of the migration program detection methods of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the electronic device, the computer-readable storage medium, and the computer program product embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (15)

1. A migration procedure detection method, comprising:
analyzing a code of a transplanting program to obtain function information of a function to be detected, which is included in the transplanting program;
according to the sequence that the depended function to be detected has precedence over the depended function to be detected, sequentially aiming at each function to be detected, generating a test case of the function to be detected according to the function information of the function to be detected;
executing the test case under the original platform environment of the transplanted program by using the function to be detected to obtain a first test result, and executing the test case under the target platform environment of the transplanted program by using the function to be detected to obtain a second test result;
comparing whether the first test result is the same as the second test result;
and if the first test result is different from the second test result, determining that the function to be detected is abnormal.
2. The method according to claim 1, wherein after analyzing the code of the migration program to obtain function information of a function to be detected included in the program to be detected, the method further comprises:
displaying the function information;
acquiring a modification instruction input aiming at the function information;
according to the modification instruction, modifying the function information to obtain modified function information;
the generating of the test case of the function to be detected according to the function information includes:
and generating a test case of the function to be detected according to the changed function information.
3. The method according to claim 1, wherein the analyzing the code of the migration program to obtain function information of the function to be detected included in the program to be detected comprises:
traversing a code of a migration program, and acquiring one or more of the following information of a function to be detected included in the migration program as intermediate information of the function to be detected: function name, function parameters, line number of the starting line of the function in the code, line number of the ending line of the function in the code and return type;
traversing the code of the transplanting program, and determining the calling relationship between the function to be detected and other functions as the structural information of the function to be detected;
and taking the intermediate information and the structural information of the function to be detected as the function information.
4. The method according to claim 1, wherein the original platform of the migration program is a CPU platform, and the executing the test case by using the function to be tested in the environment of the original platform of the migration program to obtain the first test result includes:
generating a source program file of the function to be detected under the CPU platform according to the function information;
compiling the source program file to generate a first test program under a CPU platform;
and calling the first test program to execute the test case to obtain a first test result.
5. The method according to claim 1, wherein the target platform of the migration program is a field programmable gate array FPGA platform, and the executing the test case by using the function to be tested in the target platform environment of the migration program to obtain the second test result comprises:
according to the code of the transplanting program, packaging the function to be detected to obtain a command file;
compiling the command file to generate a second test program under the FPGA platform;
and calling the second test program to execute the test case to obtain a second test result.
6. The method according to claim 1, wherein before the generating, for each function to be detected, a test case of the function to be detected according to the function information of the function to be detected in an order in which the depended function to be detected is prior to the depended function to be detected, the method further comprises:
constructing a tree structure based on the dependency relationship among the functions to be detected, wherein each node in the tree structure corresponds to one function to be detected, and the function to be detected corresponding to each node depends on the function to be detected corresponding to the father node of the node;
traversing each node of the tree starting from a root node of the tree;
arranging each function to be detected according to the sequence of the visited nodes when traversing the tree structure to obtain a function sequence to be detected;
the generating a test case of the function to be detected according to the function information of the function to be detected, sequentially aiming at each function to be detected according to the sequence that the depended function to be detected has precedence over the depended function to be detected, comprises:
and sequentially aiming at each function to be detected in the function sequence to be detected, generating a test case of the function to be detected according to the function information of the function to be detected.
7. The method of claim 1, wherein the first test result is represented in the form of a first text file and the second test result is represented in the form of a second text file;
the comparing whether the first test result and the second test result are the same includes:
comparing the text contents in the first text file and the second text file;
if the text contents in the first text file and the second text file are the same, determining that the first test result is the same as the second test result;
and if the text contents in the first text file and the second text file are different, determining that the first test result is different from the second test result.
8. A migration procedure detection apparatus, comprising:
the code analysis module is used for analyzing the codes of the transplanting program to obtain function information of the function to be detected, wherein the function information is contained in the transplanting program;
the case generating module is used for sequentially aiming at each function to be detected according to the sequence that the depended function to be detected has priority over the depended function to be detected, and generating a test case of the function to be detected according to the function information of the function to be detected;
the function testing module is used for executing the test case under the original platform environment of the transplanted program by using the function to be tested to obtain a first test result, and executing the test case under the target platform environment of the transplanted program by using the function to be tested to obtain a second test result;
the result comparison module is used for comparing whether the first test result is the same as the second test result or not;
and the conclusion output module is used for determining that the function to be detected is abnormal if the first test result is different from the second test result.
9. The apparatus according to claim 8, wherein the code parsing module is specifically configured to traverse a code of a migration program, and obtain one or more of the following information of a function to be detected included in the migration program as intermediate information of the function to be detected:
function name, function parameters, line number of the starting line of the function in the code, line number of the ending line of the function in the code and return type;
traversing the code of the transplanting program, and determining the calling relationship between the function to be detected and other functions as the structural information of the function to be detected;
and taking the intermediate information and the structural information of the function to be detected as function information.
10. The apparatus according to claim 8, wherein the original platform for transplanting the program is a CPU platform, and the function testing module is specifically configured to generate a source program file of the function to be detected on the CPU platform according to the function information;
compiling the source program file to generate a first test program under a CPU platform;
and calling the first test program to execute the test case to obtain a first test result.
11. The device according to claim 8, wherein the destination platform of the migration program is a field programmable gate logic array (FPGA) platform, and the function test module is specifically configured to encapsulate the function to be detected according to the code of the migration program to obtain a command file;
compiling the command file to generate a second test program under the FPGA platform;
and calling the second test program to execute the test case to obtain a second test result.
12. The apparatus according to claim 8, wherein the code parsing module is further configured to construct a tree structure based on a dependency relationship between the functions to be detected before generating a test case of the function to be detected according to the function information of the function to be detected for each function to be detected in sequence according to a priority order of the depended function to be detected over the depended function to be detected, where each node in the tree structure corresponds to one function to be detected, and the function to be detected corresponding to each node depends on the function to be detected corresponding to a parent node of the node;
traversing each node of the tree starting from a root node of the tree;
arranging each function to be detected according to the sequence of the visited nodes when traversing the tree structure to obtain a function sequence to be detected;
the case generating module is specifically configured to sequentially generate, for each function to be detected in the sequence of functions to be detected, a test case for the function to be detected according to the function information of the function to be detected.
13. The apparatus of claim 8, wherein the result comparing module is specifically configured to compare whether the first test result and the second test result are the same, and comprises:
comparing the text contents in the first text file and the second text file;
if the text contents in the first text file and the second text file are the same, determining that the first test result is the same as the second test result;
and if the text contents in the first text file and the second text file are different, determining that the first test result is different from the second test result.
14. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 7 when executing a program stored in the memory.
15. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
CN202010049678.4A 2020-01-16 2020-01-16 Method and device for detecting migration program, electronic equipment and computer readable storage medium Active CN111240987B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010049678.4A CN111240987B (en) 2020-01-16 2020-01-16 Method and device for detecting migration program, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010049678.4A CN111240987B (en) 2020-01-16 2020-01-16 Method and device for detecting migration program, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111240987A true CN111240987A (en) 2020-06-05
CN111240987B CN111240987B (en) 2024-03-08

Family

ID=70871059

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010049678.4A Active CN111240987B (en) 2020-01-16 2020-01-16 Method and device for detecting migration program, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111240987B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111797009A (en) * 2020-06-22 2020-10-20 北京字节跳动网络技术有限公司 Method and device for detecting code compatibility and electronic equipment
CN111930617A (en) * 2020-07-31 2020-11-13 中国工商银行股份有限公司 Automatic testing method and device based on data objectification

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070011669A1 (en) * 2005-07-06 2007-01-11 International Business Machines Corporation Software migration
CN103530132A (en) * 2013-10-29 2014-01-22 浪潮电子信息产业股份有限公司 Method for transplanting CPU (central processing unit) serial programs to MIC (microphone) platform
CN103729180A (en) * 2013-12-25 2014-04-16 浪潮电子信息产业股份有限公司 Method for quickly developing CUDA (compute unified device architecture) parallel programs
CN105700854A (en) * 2014-11-25 2016-06-22 杭州海康威视数字技术股份有限公司 Method and device for operating application task
CN109710508A (en) * 2018-08-20 2019-05-03 平安普惠企业管理有限公司 Test method, test device, test equipment and computer readable storage medium
CN110554965A (en) * 2019-09-05 2019-12-10 腾讯科技(深圳)有限公司 automated fuzz testing method, related equipment and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070011669A1 (en) * 2005-07-06 2007-01-11 International Business Machines Corporation Software migration
CN103530132A (en) * 2013-10-29 2014-01-22 浪潮电子信息产业股份有限公司 Method for transplanting CPU (central processing unit) serial programs to MIC (microphone) platform
CN103729180A (en) * 2013-12-25 2014-04-16 浪潮电子信息产业股份有限公司 Method for quickly developing CUDA (compute unified device architecture) parallel programs
CN105700854A (en) * 2014-11-25 2016-06-22 杭州海康威视数字技术股份有限公司 Method and device for operating application task
CN109710508A (en) * 2018-08-20 2019-05-03 平安普惠企业管理有限公司 Test method, test device, test equipment and computer readable storage medium
CN110554965A (en) * 2019-09-05 2019-12-10 腾讯科技(深圳)有限公司 automated fuzz testing method, related equipment and computer readable storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111797009A (en) * 2020-06-22 2020-10-20 北京字节跳动网络技术有限公司 Method and device for detecting code compatibility and electronic equipment
CN111930617A (en) * 2020-07-31 2020-11-13 中国工商银行股份有限公司 Automatic testing method and device based on data objectification
CN111930617B (en) * 2020-07-31 2023-08-25 中国工商银行股份有限公司 Automatic test method and device based on data objectification

Also Published As

Publication number Publication date
CN111240987B (en) 2024-03-08

Similar Documents

Publication Publication Date Title
US7945902B1 (en) Detection of non-standard application programming interface usage via analysis of executable code
JP5933762B2 (en) Code coverage rate determination method and system
US9619373B2 (en) Method and apparatus to semantically connect independent build and test processes
US11675575B2 (en) Checking source code validity at time of code update
US20210073107A1 (en) Testing source code changes
US20100199264A1 (en) Pattern inspection system, pattern inspection device, method and pattern inspection program
US10514898B2 (en) Method and system to develop, deploy, test, and manage platform-independent software
US20140208297A1 (en) Validation of revised computer programs
US11481245B1 (en) Program inference and execution for automated compilation, testing, and packaging of applications
CN111240987B (en) Method and device for detecting migration program, electronic equipment and computer readable storage medium
CN112860312A (en) Method and device for detecting item dependency relationship change
Fazzini et al. Apimigrator: an api-usage migration tool for android apps
CN113495728A (en) Dependency relationship determination method, dependency relationship determination device, electronic equipment and medium
CN114116505A (en) Code testing method and device
US10698666B2 (en) Automatically building software projects
US11755458B2 (en) Automatic software behavior identification using execution record
WO2023207973A1 (en) Compiler test method and apparatus, case generation method and apparatus, and instruction storage structure
US11422917B2 (en) Deriving software application dependency trees for white-box testing
US9064042B2 (en) Instrumenting computer program code by merging template and target code methods
CN113094252B (en) Test case generation method and device, computer equipment and storage medium
CN116578282A (en) Code generation method, device, electronic equipment and medium
US11947966B2 (en) Identifying computer instructions enclosed by macros and conflicting macros at build time
CN109284222B (en) Software unit, project testing method, device and equipment in data processing system
US10776255B1 (en) Automatic verification of optimization of high level constructs using test vectors
CN111694729A (en) Application testing method and device, electronic equipment and computer readable 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