How to test analog component before mounting?
It sounds like you have two distinct problems:

1) Incoming inspection 

2) Production testing

Incoming inspection is easy but tedious: you simply test some percentage of the components as they arrive in your facility.  If you are using SMD devices and the components are inexpensive, you simply discard the tested samples afterwards (or put them on eBay as bagged, loose components for prototyping use).

If more than a certain percentage of that batch fails testing, you reject the entire batch.

For example, if you are testing SMT capacitors that arrive on spools, you test parts from every single spool that is part of that batch.

This is painful but if you can't trust your supplier and cost drives your purchasing, it's about the only method that you have.

Production testing is somewhat similar in that you test some percentage of your final production.  

Some companies test 100% of their production - the extra cost is offset by the high reliability that those products require.  Others test only a small percentage of the production run but if there are too many failures, every unit from that production run is tested.

Some companies don't do any testing at all.  These are generally much larger companies that are producing products by the millions.  Instead, they rely upon having quality components and a variety of statistical process measurements.