This paper proposes a statistical test of the martingale hypothesis. It can be used to test whether a given time series is a martingale process against certain non-martingale alternatives. The class of alternative processes against which our test has power is very general and it encompasses many nonlinear non-martingale processes which may not be detected using traditional spectrum-based or variance-ratio tests. We look at the hypothesis of martingale, in contrast with other existing methods which test for the hypothesis of martingale difference. Two different types of test are considered: one is a generalized Kolmogorov-Smirnov test and the other is a Cramer-von Mises type test. For the processes that are first order Markovian in mean, in particular, our approach yields the test statistics that neither depend upon any smoothing parameter nor require any resampling procedure to simulate the null distributions. Their null limiting distributions are nicely characterized as functionals of a continuous stochastic process so that the critical values are easily tabulated. We prove consistency of our tests and further investigate their finite sample properties via simulation. Our tests are found to be rather powerful in moderate size samples against a wide variety of non-martingales including exponential autoregressive, threshold autoregressive, markov switching, chaotic, and some of nonstationary processes.