you can test the starter motor itself by applying 12v to it (+12v to the terminal, negative to the body) or by shorting the starter relay contacts (bridge the two fat contacts on the relay with big red wires, not the 2 with smaller wires) I tend to use a pair of needle-nosed pliers cos they won't melt with the high current. If it turns over then the starter motor is fine. if not.. starter motor issue. If the starter runs fine when out of the bike but won't turn over with this method in the bike - then look for a physical issue - e.g. somethgin jammed/preventing it from turning - e.g. remove the centre cap frmo the flywheel cover and see if you can rotate the engine freely by hand with a socket (anti-clockwise).
if the starter turns over when you short the big contacts and the relay is clicking when you hit start then your starting "logic" is fine (i.e. all the switches and whatnot to try and get the bike to start are in order, power is getting to the relay) but it's still not starting then it's most likely the starter relay has melted internally.
if the starter relay is not clicking but the starter motor turns over when you short the big contacts, then look at your starting logic - page 8-7 in the service manual has a diagram which applies to gen1 but gen2+ will be similar.
If all is working (turns over when you short big contacts, starter relay clicks when you hit go) but starters/relays keep melting - have you perhaps got a 180 kit on with a replacement cam which doesn't have the decompression mechanism fitted? That is known to melt starters.
hopefully that helps a bit...