  The degrees are a classical and relevant way to study the topology of a
network. They can be used to assess the goodness-of-fit for a given random
graph model. In this paper we introduce goodness-of-fit tests for two classes
of models. First, we consider the case of independent graph models such as the
heterogeneous Erd\"os-R\'enyi model in which the edges have different
connection probabilities. Second, we consider a generic model for exchangeable
random graphs called the W-graph. The stochastic block model and the expected
degree distribution model fall within this framework. We prove the asymptotic
normality of the degree mean square under these independent and exchangeable
models and derive formal tests. We study the power of the proposed tests and we
prove the asymptotic normality under specific sparsity regimes. The tests are
illustrated on real networks from social sciences and ecology, and their
performances are assessed via a simulation study.
