Added testing-mode to invoke undo on a cmd