You mean in production? Digital logic is easy, use scan/ATPG:
https://en.m.wikipedia.org/wiki/Scan_chainBasically chain all the logic together in a special test mode.
Analog blocks get tests written specifically for them and either tested via external test hardware or linked internally.
For example, if you have a DAC and and ADC, provide a link internally and drive the ADC from the DAC to test both. You can also test comparators etc from using a combination of the DAC and ADC, trim bandgaps etc.
If you’re real smart, you do this at probe (wafer), massively in parallel.