You need to find out if your phone is in good condition. It may be a used phone that you just bought, or you want to sell an old device and make sure it works properly. Whatever the reason, you can subject your phone to a series of diagnostic tests.
For certain Android phones, you can access an integrated diagnostic tool by tapping a specific code. However, the App Store and Google Play also offer third-party diagnostic tools. Apps like TestM, Phone Diagnosis, Phone Check (and Test), and Phone Doctor Plus can do tests to check the touch screen, audio, video, camera, microphone, sensors, and other components of your phone. That is how they work.