Lamp Test circuit for LEDs with an Arduino
The most effective Lamp test is a momentary button, where you scan for an input to activate all, in firmware, or activate momentarily by some sequence on Power On Reset (POR) with no switch.

Diode OR power switches may serve one purpose for a test in case of dead UC but then Design for Testability ought to be learned as quickly as possible by new designers. (Search DFT for system level)