Auto device detection for test purposes