We introduce generalized probability-probability (P-P) plots in order to study the one-sample goodness-of-fit problem and the two-sample problem, for real-valued data. These plots, that are constructed by indexing with the class of closed intervals, globally preserve the properties of classical P-P plots and are distribution-free under the null hypothesis. We also define the generalized P-P plot process and the corresponding, consistent tests. The behaviour of the tests under contiguous alternatives is studied in detail; in particular, limit theorems for the generalized P-P plot processes are presented. By their structure, the tests perform very well for spike (or pulse) alternatives. We also study the finite sample properties of the tests through a simulation study.