An electronic device includes a medical testing unit. The medical testing unit includes a medical processor, a number of medical testing modules, and a number of testing subunits. Each testing subunit is electrically coupled to a corresponding medical testing module, the medical processor is electrically coupled to the medical testing modules. The medical processor is used for controlling the testing subunits and the medical testing modules to test physiological parameters of users, and acquire, process, and analyze the physiological parameters to generate health data.