You charge it up and check the voltage half an hour later. It should be close to what you measure on the charger except some LiFePO4 batteries drift down a bit.
You connect a wattmeter between the battery and controller, and then go out for a long ride until the battery is flat. Unfortunately, on some bikes the battery BMS trips at a higher voltage than the controller. If yours is like that, the wattmeter will go off too and you'll lose the results, so it's a good idea to check the wattmeter frequently as your battery runs down to empty.The main result of concern is the amp-hours, which should correspond with its specification. If it turns out short on capacity and the battery goes off before the controller, you could check the cut-off voltage. If it's higher than 31v, the battery could be out of balance for whatever reason.
To be honest, it's best not to check unless you've got a money-back guarantee. I've never had a duff new battery yet.