Automatic testing and assembly unit