I presume you would do testing at all stages.
The chips would be tested on the wafer before they're even split up into individual pieces.
Then there would be testing after they have the bonding wires attached (probably after they're encapsulated)
If they require programming then perhaps you test them after programming.
And you would certainly run some tests after the device is built.
The method you use could be any or all of the methods you propose. There is no magic bullet.
You need to determine if the fault is due to
- Design
- Manufacture
- Programming
- Something else
Your simulations should take care of (1), bu note that simulations are not perfect. For errors in manufacture, this will either be systematic (failure of (say) the mask) that might be determined only by examination of the chip under a microscope, or they might be random (in which case only some devices will be affected, and the fauults are likely to differ). If it's a fault in programming then you might have a trivial "hello world" application that you could use to verify that you have the basics working, and beyond that you're into a typical software debugging cycle. If it's (4) (maybe damage due to wrong supply rail, poor anti-static handling, etc) then you need to determine how it's happening and to fix that.