The invention relates to the technical field of
program testing, in particular to a program
source code testing method and device based on a memory, equipment and a medium. According to the method, the dangerous memory sequence is obtained by analyzing the
memory operation, then the
test case is input into the program
source code, then the memory consumed by the program
source code for completing the
control flow chart, the function call chart and the
memory operation is started to be monitored, and the
code coverage rate is calculated after the operation of the program source code is finished. Dangerous operation coverage is also monitored. And finally, according to the
code coverage rate, the memory consumption and the dangerous operation coverage rate, updating the
test case until the program source code crashes, and obtaining a target
test case. According to the method, the memory consumption is monitored, and the
code coverage rate and the dangerous operation coverage rate are also monitored, so that whether the running of the program source code meets the memory use protocol or not can be monitored more comprehensively, and the memory security
vulnerability type caused by running of the program source code can be tested more comprehensively.