My daughter was having this sort of behavior with her kids when the youngest was 4 or 5 and on the advice of a counselor began sending them to their room every time their tone of voice was disrespectful or they refused to do what she said. My daughter pretty much uses this as discipline for nearly everything and it works!
She had a talk with them and let them know this is what would happen. Then each time she would say something like this and then send (at first, take) them to their room. Go to your room until you can be respectful or until you can come back and pick up your toys or whatever. They were also to apologize.
They could do anything they wanted in their room. This gave them quiet time to calm down and to consider their next move. Every once in awhile one of them has fallen asleep. At first they would come out almost immediately but weren't ready to comply and so she'd send them back in.
After a few weeks the routine went smoothly. Every once in awhile, when they are angry one of them will put themselves in the room.
If they get busy playing, my daughter will go to them in about 5-10 minutes and ask if they're ready to come out yet. Usually they say yes, apologize and pick up their toys, etc.
I didn't think this would work but it's worked very well. For one thing, it stops the exchange before Mom gets frustrated and starts yelling. It also gives the child time to rethink what they know they should do. And...if they're mouthing off or not doing something because they're tired it gives them an opportunity to rest. And it's very easy to be consistent.
Being tired and hungry are frequent causes for misbehavior. I also offer a snack when I first notice one of them getting cranky. Sometimes that helps.
Your daughter could be testing you. It is possible that she is harsh and her behavior is increasing because she wants to see how far she can push you. She isn't thinking that she's testing. It's just what kids do.
She could also be cranky because she is needing closer boundaries. She needs you to immediately stop whatever negative is happening. I sometimes have difficulty trying to change the situation, expecting the kid to listen when I explain what is happening and asking them over and over to stop or to start.
I've finally learned that I need to say whatever I'm saying clearly and in just a few words. Explaining or cajoling does not help. I do repeat the request using the same words when it's possible they don't hear or understand. And when it's talking back I do give a warning because they aren't always aware of their tone of voice. Discipline is meant to teach and so they have to know why what they said is inappropriate. But if they argue it's straight to their room.