Although not a perfect test, your senses are usually the most reliable instruments to tell if it butter has gone bad.
Spoiled butter will begin to appear pale, may possibly grow mold and will be either too soft or too hard and difficult to spread. In addition, spoiled butter can smell stale, cheesy or decomposed.