The invention relates to the field of
software development, and discloses a
test case completion method and
system and electronic device.The
test case completion method comprises the steps that a
source code of
software to be tested is analyzed, and a method calling relation
library is obtained;
code coverage analysis is carried out on the to-be-tested
software, coverage codes and uncovered codes of the to-be-tested software are obtained, and the uncovered codes at least comprise the conditions that code lines and code branches are not covered respectively; calling the relation
library based on the method to query to obtain a parameter association
relation graph of a complete calling link, and generating a use case
complementation suggestion of an uncovered code; and perfecting an
executable test case of the to-be-tested software based on the case completion suggestion, and covering uncovered codes in the to-be-tested software. According to the method, trial case design blind spots are reversely speculated through the
code coverage condition, information such as links and parameter association is called through the method, and uncovered code test case supplementary suggestions are provided in combination with an intelligent auxiliary
programming tool, so that the test cases are effectively supplemented, and the problems of design insufficiency and low
code coverage rate are solved.