The martingale hypothesis is commonly tested in various time series, including the financial and economic data. In practice, there exists a variety of martingale processes and not all of them are nonstationary like the random walks. In particular, some martingales are stationary processes with heavy-tailed marginal distributions. These martingales display local trends and bubbles, and can feature volatility induced "mean-reversion". The aim of our paper is to develop tests of the martingale hypothesis, which are robust to the type of martingale process that generated the data, and are valid for nonstationary as well as stationary martingales.