We present a novel approach for improving the accuracy of the magnetic-field integral equation (MFIE) and the combined-field integral equation (CFIE) by using numerically designed testing functions. The compatibility of the MFIE and CFIE systems with the corresponding one derived from the electric-field integral equation (EFIE) is used to determine testing weights in given templates of testing directions. The designed testing functions lead to more accurate solutions in comparison to the standard discretizations of MFIE and CFIE with the Rao-Wilton-Glisson functions. While providing significant improvements, the proposed approach is easy to implement without needing fundamental modifications in the existing implementations. A straightforward procedure is presented, where the testing weights that are determined directly at a frequency is used for frequency sweeps.