Depends where you are and what is the purpose of the generator that is Code required emergency use or just stand by back up power.
For the USA and where NFPA is followed, NFPA 110 spells out requirements for testing emergency power systems and also for standby systems.
Health care facilties comply wiht NFPA 99 but I beleive its generator systems still have to comply with 110.