摘要 |
<p>The embodiments of the invention disclose a code coverage testing method, device and system. In an embodiment of the invention, a binary file and a symbol table generated after source codes are complied are acquired; the binary file is parsed by using the symbol table to determine a position of function defined by each source code; then when the binary file is loaded into a memory and not yet executed, a debug point is set for a map of the binary file that is loaded into the memory according to the position of the function; a code basic block that has been executed is determined according to the debug point, and relevant information of the code basic block that has been executed is recorded in the memory; finally, the relevant information of the code basic block is converted into code line information by using the symbol table, to obtain code lines that the test covers. This solution can improve reliability of test.</p> |