OxygenOS is a feature-rich take on Android, and one of those features, a more verbose and useful hardware test menu than what's found on Android by default, is thankfully quite easy to get to. Just pop open your dialer app of choice and enter "*#808#", sans the quotes, of course. You may or may not have to hit the dial button after inputting the code. Once the code is entered successfully, you'll find yourself in a menu full of handy diagnostic tests that let you check on everything from the touch screen to the Bluetooth module. Just about every feature of the phone's hardware is able to be put to the test in this menu, and as a bonus, replacing the second 8 in the dialer code above with a predefined number for a testing suite will bring you directly to that test.
The tests that can be found in that menu include tests for the phone's gyrometer, earphone port, storage, NFC, GPS, and light sensor, just to name a few. It should be noted that the full gamut of tests isn't exclusively accessible through the dialer menu. In apps that let you mess around with activities inside individual apps, like Nova Launcher and Tasker, you can find the tests under the EngineerMode heading. This means that you can make shortcuts to these tests on your home screen or within other activities. This feature works on any device that ships with OxygenOS, such as Oppo and OnePlus devices, and even some devices that have unofficial ports of OxygenOS, such as Motorola's Nexus 6.
The wide range of tests available is not the same suite of tests available on most Android phones, though most devices out there have a fairly comprehensive testing menu. For the most part, these menus can all be reached with dialer codes, which can differ between devices, OS versions, and manufacturers. Samsung's Galaxy flagship lineup, for example, can be kicked into testing mode by entering *#0*#, while Huawei's phones have a test mode that can be accessed by enabling the hidden app HwMMITest. Some of these menus allow you to not only test things, but to change some hidden settings. *#*#4636#*#* is one very common dialer code that allows users to run a few basic tests, and change their network settings to try and get more signal or higher speeds.