1) set a test rig - you need to recirculate fluid, measure relevant pressures and flow, and power at pump shaft in varying conditions
2) set ctiteria for cavitation (is it incipient, such as formation of first bubble - to be detected visually or by stroboscope, or you will detect loss of power or head drop as a sign of developed cavitation)
never done this, but seens to me like a serious task; try consulting books and standards