I would be shocked if S&W or any decent firearms manufacturer doesn't test fire a pistol or rifle before it goes out the door. Huge liability issues if they don't, but test firing isn't an accuracy test. Even an accuracy test can be colored to favor the builder. There are no standards in what distance an accuracy test must be conducted, so the builder can claim good accuracy at any distance. It's up to the builder if they want to supply a "test target" to prove accuracy but many times there is no distance noted on the test target, so the test target is worthless. IMHO every firearm should come with a test target regardless of what the firearm is used for. Would it add expense to the price of the firearm? Yes it would, but it would keep the manufacturer honest. And during that test the firearm should perform as expected. If it doesn't it should go back for inspection and rework. Unfortunately this is probably never done and more importantly my guess is many firearms are passed thru that should be sent back for correction.
I recall two firearms I owned that I bought brand new that came with great looking test targets. One was an Anschutz 2013 and another was a Kimber Hunter .22. In all the time I owned both rifles I was never able to come close to duplicating those targets when I shot the rifles. What I never did find out was at what distance were those test targets fired at and with what ammunition as that information was conveniently left off the targets. For all I know those test targets could have been shot at 5 yards. So I put no faith at all in test targets. There really should be some industry standards though for testing a firearm for function before it leaves the factory or builder. It would certainly take care of a lot of problems people encounter.
Rick H.