My guess would be a test program would be wrote to check everything is working. For example you can check the joypad, buttons, keys, touchscreen with an on screen representation, press the buttons and they light up. then do some hardware checks like dead/stuck pixels, speakers, memory, SD check...