How about:
- Weigh the weapons individually with the compensators installed.
- Make some sort of an easy carriage to hold the weapons. It has to be able to hold the rifle firmly and repeatably.
- Add weight to the carriage with each individual weapon so that the weights of the carriage+weapon are all the same.
- This is the hard part: The carriage+weapon could be suspended on a wire (making a pendulum,) the weapon fired (somehow,) and the distance the carriage+weapon moves back (due to recoil) measured. Or, the carriage+weapon could be placed on a table that's abutted at its rear by a max-force recording (weight) scale. As long as the test set-ups are the same,
and the process is repeatable, the result can be trusted. The answer will be nothing more than 'compensator A is better than compensator B,' but, the result would be trustworthy.
I used to be a bonified 'rocket scientist.' I designed a test stand for a rocket (3.6
million pounds thrust) and the test procedure and design just needs to be catered to testing impulse (recoil...heavy forces but short-lived, like hammer blows) instead of thrust. If all you want is 'which one is better,' the answer can be obtained with very high confidence with clever redneck-engineering.