We study the problem of testing isomorphism (equivalence up to relabelling of the variables) of two Boolean functions f, g : {0, 1}n → {0, 1}. Our main focus is on the most studied case, where one of the functions is given (explicitly) and the other function may be queried. We prove that for every k ≤ n, the worst-case query complexity of testing isomorphism to a given k-junta is Ω(k) and O(k log k). Consequently, the query complexity of testing function isomorphism is eΘ(n). Prior to this work, only lower bounds of Ω(log k) queries were known, for limited ranges of k, proved by Fischer et al. (FOCS 2002), Blais and O’Donnell (CCC 2010), and recently by Alon and Blais (RANDOM 2010). The nearly tight O(k log k) upper bound improves on the eO(k4 ) upper bound from Fischer et al. (FOCS 2002). Extending the lower bound proof, we also show polynomial query-complexity lower bounds for the problems of testing whether a function can be computed by a circuit of size ≤ s, and testi...