I always test the motor first before stripdown. If it seems to run ok i.e. no sparking when running (a little at startup is normal) and no unusual noise ill assume for the moment its ok and put it to the side.
When it comes to the stripdown, once I've attended to the rest of the Dyson i'll take a proper look at the motor. If the commutator looks quite worn or very black ill just chuck it and sticka new motor in, they are cheap enough anyways.
If the commutator looks ok, not too worn and not too black, ill clean it up a bit, check brushes length and usually I stick some new brushes in, then rebuild and test motor again.
With post filter cover off, looking for no sparking when running, no unusual sounds, no smells and leave it running for a while to get it 'up to temp' (warm it up basically and test when hot as itll warm up in normal use) and leave it running to just make sure it runs sound and bed the new brushes in.
Done it this way for a few years and never had an issue, if motor does seem on its last legs by getting too hot, sparking, commutator looks worn or is very black, smells a bit 'hot' or 'electrical' or is making unusual sounds, or was already blown when I got it, i'll just replace with a Quаltex.
As I say, I haven't had an issue doing it this way. *Yet* there will always be once or twice something does fail prematurely on a customer even if tested totally brilliant at first.
Warranty wise, I don't mind if in the first few months someone comes back and says its blown up, Ill sort them out. I had a good mate the once I sold a DC07 to, motor failed 6 months later, he messaged me asking how much itll be so I said ill just drop a new motor in as it hadn't lasted as long as it should have.