This application provides a KNN-based method and apparatus for
software test scope assessment. The method includes: acquiring information on each first call chain affected by a code modification of a target
software platform; determining information on the second call chains for each automated test
scenario corresponding to each interface
test case of the target
software platform; and using the KNN model to determine all automated test scenarios corresponding to the code modification to generate a test scope assessment report for the code modification of the target software platform. This application can effectively improve the
automation and intelligence of software test scope assessment, and can effectively improve the accuracy and validity of the software test scope assessment results, thereby improving the reliability and efficiency of testing based on the software test scope assessment results.