Techniques for determining rock properties include exerting a compressive load with a test apparatus across a rock sample that includes a specified length-to-diameter ratio; measuring, with a strain gauge, a strain on the rock sample during the compressive loading; determining, based at least in part on the compressive load, a mechanical property of the rock sample; and determining, based at least in part on the measured strain and the compressive load, an elastic property of the rock sample.