The number of wrapper cells which need to be added to SoCs for modular testing can be reduced by grouping modules so that they share wrappers. Such grouping may often increase test volume, which can be reduced by redesigning scan-chains and selectively eliminating some wrappers from the input and output ports of grouped modules. In experiments on benchmark circuits, an average of 61% of wrappers were removed when the increase in test time was constrained not to exceed 20%.