Design for test - What the different ways in which this is done
I have designed test accessibility into several boards that have gone into manufacture and are being tested automatically.  Usually these tests take place at the board level, before the case and any other external components (keyboard, LCD, speaker etc.) are added.

Things are simpler if you can enlist an on-board microcontroller, that eventually will be used to run the application code, to be able to run most of your test code.  This however is not absolutely necessary however if you add enough external access points to allow external testing.  If you use an on-board microcontroller, you may want to get one with more GPIO or ADC pins then needed for your application code (e.g. a 100-pin instead of 64-pin device) to allow for extra test inputs.

The next step depends if you have any external access to a UART on the on-board microcontroller.  This can then be used to provide access to the external test equipment.  The latter can either be a dedicated test box, which may be connected to a PC for initiating a test script and logging results, or just a UART-USB interface to talk with a PC program directly.

If you do not have an external UART, it is most like you have a programming interface of some sort.  Say it has four wires: VCC monitor, clock, data, and ground.  Assuming the VCC monitor is tied to VCC on the board through a resistor, say 100 ohms, you can add another 100 ohm resistor and make the external VCC to be VCC/2 by grounding the external pin.  This can then be sensed by a comparator added to the board, and used to enable a mux that switches the programming data and clock leads over to the TX and RX leads of the UART.  So you have access to the board without adding any extra pins.

With the VCC monitor, you can check if the VCC on the board is correct, either 3.3v or 5.0v for example.  If so, you can then program the on-board controller with test code.  The next thing to do is probably check all of the voltage rails, using the ADC built into the microcontroller.  I had one project that had 12 different rails (!), half of them dedicated to an LCD.  So if you have only a 10 channel ADC, for example, you may have to add a mux to switch between inputs and let your ADC do double duty.  The ADC inputs can also be used to check any other analog outputs, such as op-amps.

Additional tests to be run include all of your buses and the peripherals they are connected to, such as I2C, SPI, UARTs and USB.

If you don't have a on-board microcontroller, or don't want to use it for running test code for some reason, then you can add any number of test pads which can be accessed via pogo-pins, and connect to an external test box that performs the same tests as described above.

Once all of your tests have been completed, you can then flash the production code into the device and connect the case and other external components as mentioned earlier.