In this paper, a unitary method for the solution of transient cavitating flow in viscoelastic pipes is proposed in the framework of the method of characteristics (MOC) and a Z-mirror numerical scheme (MOC-Z model). Assuming a standard form of the continuity equation allows the unified treatment of both viscoelasticity and cavitation. An extension of the MOC-Z is used for Courant numbers less than 1 to overcome a few cases with numerical instabilities. Four viscoelastic models were considered: a Kelvin–Voigt (KV) model without the instantaneous strain, and three generalised Kelvin–Voigt models with one, two, and three KV elements (GKV1, GKV2, and GKV3, respectively). The use of viscoelastic parameters of KV and GKV models calibrated for transient flow tests without cavitation allows good comparisons between experimental and numerical pressure versus time for transient tests with cavitation. Whereas for tests without cavitation, the mean absolute error (MAE) always decreases when the complexity of the model increases (from KV to GKV1, GKV2, and GKV3) for all the considered tests, this does not happen for tests with cavitation, probably because the decreasing capacity of parameter generalization for the increasing complexity of the model. In particular, in the examined cases, the KV model performs better than the GKV1 and the GKV3 models in three cases out of five, and the GKV2 model performs better than the GKV3 model in three cases out of five. Furthermore, the GKV2 model performs better than the KV model only in three cases out of five.