Cars need to pass crash tests before pre season testing. This was introduced a few years ago I think.
Other than that, I don't think it has to be rules compliant otherwise it would be impossible to run most of the aero sensors on the car due to the bodywork rules.