Originating in the early 20th century, ultrasonic testing has found increasingly extensive applications in medicine, industry, and materials science. Achieving both a high signal-to-noise ratio and high efficiency is crucial in ultrasonic testing. The former means an increase in imaging clarity as well as the detection depth, while the latter facilitates a faster refresh of the image. It is difficult to balance these two indicators with a conventional short pulse to excite the probe, so in general handling methods, these two factors have a trade-off. To solve the above problems, coded excitation (CE) can increase the pulse duration and offers great potential to improve the signal-to-noise ratio with equivalent or even higher efficiency. In this paper, we first review the fundamentals of CE, including signal modulation, signal transmission, signal reception, pulse compression, and optimization methods. Then, we introduce the application of CE in different areas of ultrasonic testing, with a focus on industrial bulk wave single-probe detection, industrial guided wave detection, industrial bulk wave phased array detection, and medical phased array imaging. Finally, we point out the advantages as well as a few future directions of CE.