An automatic method for measurement of the resonant frequency and Q-factor of an X-band cavity microwave resonator is described. Results obtained, under computer control, for cavities with a Q-factor of up to 8000 are presented, and values of permittivity and conductivity measured on a number of materials are reported.