Hey folks,
Blizzards Cheat Detection seems to be surprisingly fair. As long as no other Players are in the same Game as you, you can use the Trainer without getting banned. (Well, that's at least what I can say from using the Trainer in SC2 for 6 Months by now)
This means you can also use it during Coop Missions if the other Player has left the game.
@joshp519: Any game against the AI is no problem. Like said, just make sure no other Players than you are in the Match.
@eduswd: That's because the Trainer only affects Player 1. If you on position 2 in the Coop Mission, Cheats affect only the Troops and the Buildings of the Player who did left.
Again: That's only my experience so far, no guarantee from my side that you won't get banned at all. If you will be 100% save, only use it in the Campaign.