In this paper we propose to generalize the recent works of [4] and [3] on the comparison of the marginal distributions of two strictly stationary processes. Our aim is to test the equality the whole distributions of two such processes. For that task, we compare all possible d dimensional joint distributions of both processes. Our procedure consist in expanding their densities in a multivariate orthogonal basis and comparing their k rst coecients. The number d of dimensions to consider and the number k of coecients to compare in view to perform the test can growth with the sample size and are automatically selected by a two step data driven procedure. The method works for possibly paired, short or long range dependent processes. A simulation study shows the good behavior of the test procedure. In particular we apply our method to compare ARFIMA processes. Real data sets also illustrate this approach.