Sounds like you need to have your timing adjusted.They need to check at certain rpm's unless your engine cuts outs sputters basically run bad the rpms will not cause the fail.Your car is putting out bad emission at that rpms rate could be the timing being off.
Things I do before a rest
1.Tune up
2.adjust timing
3.oil change
4.replace gas cap (they will fail you for a bad cap)
5.put a bottle of guarantee to pass in the tank (run until empty)
6.refill tank with high octane gas and put in an octane booster additive higher the octane the cleaner the engine burns.