In reply to VK_18:
This is a very broad topic. JTAG is just another interface to your DUT, just like SPI or AHB is, but specific to boundary scan architecture. How those scan chains are implemented is very design specific. Usually the tools the insert these scan chains have tools and testbenches the come as part of their package.