I mean, I can tell you first hand how easy it is to trick an OBDII emissions test just by messing with the ground wires associated to the O2 sensors and bam, you have different values being report by O2...
The state testing in most states now is ‘make sure the ECU is reporting “READY” and has no emissions-related codes set.’
Since the advent of OBD2, it’s become rare for a state inspection to run the vehicle live for the purpose of emissions testing. Plugging in the OBD2 scanner is way faster, cheaper, more convenient, safer, and easier (albeit slightly) on the car than using a dyno.