Consider a setting where N players, partitioned into K observable types, form a directed network. Agents’ preferences over the form of the network consist of an arbitrary network beneﬁt function (e.g., agents may have preferences over their network centrality) and a private component which is additively separable in own links. This latter component allows for unobserved heterogeneity in the costs of sending and receiving links across agents (respectively out- and in- degree heterogeneity) as well as homophily/heterophily across the K types of agents. In contrast, the network beneﬁt function allows agents’ preferences over links to vary with the presence or absence of links elsewhere in the network (and hence with the link formation behavior of their peers). In the null model which excludes the network beneﬁt function, links form in-dependently across dyads in the manner described by Charbonneau (2017). Under the alternative there is interdependence across linking decisions (i.e., strategic interaction). We show how to test the null with power optimized in speciﬁc directions. These alternative directions include many common models of strategic network formation (e.g., “connections” models, “structural hole” models etc.). Our random utility speciﬁcation induces an exponential family structure under the null which we exploit to construct a similar test which exactly controls size (despite the the null being a composite one with many nuisance parameters). We further show how to construct locally best tests for speciﬁc alternatives without making any assumptions about equilibrium selection. To make our tests feasible we introduce a new MCMC algorithm for simulating the null distributions of our test statistics.