Did you shake the bulb when you tried it directly to the battery?
Did you check the terminals and sockets of the bulb?