Beware of cheating

Is it called cheating -if you copy from somebody during a test? -if you break the rules of a game?