That's not cheating; that's called "lying." Big difference.
Anyway, white lies are fine as long as they don't hurt anyone. Major lies are bad, they'll catch up to you sooner or later. Cheating is an entirely different story. Whether it is on a test or in a relationship there is never any excuse.