A computer-implemented method for assigning levels of priority to a plurality of selected functions, the method comprising: identifying a plurality of selected functions that call other functions defined in source code of a subject snapshot of a code base, wherein the plurality of selected functions comprise testing functions for testing the source code of the subject snapshot; obtaining data representing a call graph of the source code of the code base, wherein the call graph has nodes and directed links, each node representing a function in the source code, and wherein each link between each pair of nodes represents that a first function of the pair calls a second function of the pair; identifying a plurality of subject functions in the subject snapshot that are reachable from one or more of the selected functions according to the call graph, comprising determining which functions have changed in the subject snapshot relative to a previous snapshot of the code base; assigning respective levels of priority to each of the selected functions using the call graph, comprising: identifying, for each subject function of the plurality of subject functions, one or more selected functions in the subject snapshot from which each of the subject functions are reachable along paths of length N or less; computing, for each selected function and each identified subject function, a respective relatedness score that is based on 1) the lengths of the paths from the selected function to the subject function, and 2) a number of identified paths from the selected function to the subject function; computing, for each selected function, a respective priority score based on the relatedness scores computed for the selected function; and assigning the selected functions a level of priority based on the priority scores; and executing the selected functions in an order determined by the assigned levels of priority. identifying a plurality of selected functions that call other functions defined in source code of a subject snapshot of a code base, wherein the plurality of selected functions comprise testing functions for testing the source code of the subject snapshot; obtaining data representing a call graph of the source code of the code base, wherein the call graph has nodes and directed links, each node representing a function in the source code, and wherein each link between each pair of nodes represents that a first function of the pair calls a second function of the pair; identifying a plurality of subject functions in the subject snapshot that are reachable from one or more of the selected functions according to the call graph, comprising determining which functions have changed in the subject snapshot relative to a previous snapshot of the code base; assigning respective levels of priority to each of the selected functions using the call graph, comprising: identifying, for each subject function of the plurality of subject functions, one or more selected functions in the subject snapshot from which each of the subject functions are reachable along paths of length N or less; computing, for each selected function and each identified subject function, a respective relatedness score that is based on 1) the lengths of the paths from the selected function to the subject function, and 2) a number of identified paths from the selected function to the subject function; computing, for each selected function, a respective priority score based on the relatedness scores computed for the selected function; and assigning the selected functions a level of priority based on the priority scores; and identifying, for each subject function of the plurality of subject functions, one or more selected functions in the subject snapshot from which each of the subject functions are reachable along paths of length N or less; computing, for each selected function and each identified subject function, a respective relatedness score that is based on 1) the lengths of the paths from the selected function to the subject function, and 2) a number of identified paths from the selected function to the subject function; computing, for each selected function, a respective priority score based on the relatedness scores computed for the selected function; and assigning the selected functions a level of priority based on the priority scores; and executing the selected functions in an order determined by the assigned levels of priority.