Cheating on tests and quizzes is a sin.
If you’re asking about a person planning to commit a sin and stopping short of actually doing the sin, that’s a different story.
For instance, if I plan to murder somebody, and go out and buy a big shiny knife and drive to their house, and on the way there have an attack of conscience and change my mind about the murder, I’m generally innocent (although I prolly have to confess that I let anger rule me for that amount of time.)
However, if I get to their house and they’re not at home, and I leave with the plan to come back later and finish the deed, I’m still guilty of plotting another person’s death.
Or if I drop dead of a heart attack, with this plan still in my mind and unrepentance in my heart, I’m still guilty of this sinful anger and sin against the fifth commandment.