An operational framework is developed for testing stationarity relatively to an observation scale, in both stochastic and deterministic contexts. The proposed method is based on a comparison between global and local time-frequency features. The originality is to make use of a family of stationary surrogates for defining the null hypothesis of stationarity and to base on them two different statistical tests. The first one makes use of suitably chosen distances between local and global spectra, whereas the second one is implemented as a one-class classifier, the time-frequency features extracted from the surrogates being interpreted as a learning set for stationarity. The principle of the method and of its two variations is presented, and some results are shown on typical models of signals that can be thought of as stationary or nonstationary, depending on the observation scale used.