Debugging and testing robot programs