What is the difference between EMC testing (Electromagnetic compatibility) and EMI testing (Electromagnetic interference)
Electromagnetic Interference is a radiated or conducted signal that is unwanted that you are trying to avoid.
Electromagnetic Compatibility encompasses the standards and testing of equipment so that it can generally be expected to function properly in a shared environment. This involves testing devices to make sure that the EMI produced is under some limit, and testing to ensure that the susceptibility is above some threshold where most complying devices won't disturb it (or damage it, depending on the standard).
Additionally EMC susceptibility testing can check for immunity to environmental factors such as static discharge (ESD) and line transients that can occur in normal use.
EMC testing generally refers to both emissions and immunity testing. However some engineers refer to immunity testing as EMC testing and emissions testing as EMI testing.
Electromagnetic interference (EMI) generated by electronic products can be an issue both internally and externally to the product. Regulatory agencies such as the FCC put limits on the amount of electromagnetic radiation that a product can emit, either radiated (through the air) or conducted (through the power power supply). But also, even without the regulatory considerations, EMI can still be an issue for hardware manufacturers.
A product may negatively affect another product for instance through interference. The 4 electromagnetic coupling mechanisms are capacitive (e-field), inductive (B-field), radiated (EM field) or conducted.
Immunity testing (often called EMC testing) involves subjecting a product to several electromagnetic phenomena to verify that the product performs at a performance level (called performance criteria) set by a standard during and after the phenomena. Typical immunity tests include ESD, EFT, surge, conducted immunity and radiated immunity.
EMI is what you're putting into the environment, EMC is how vulnerable you are to the environment.
Edit per comment: EMI is tested by measuring what your equipment emits as conducted and radiated signals. That means putting your equipment in an anechoic chamber, hooking it up to all of its cables and accessories and pointing broadband antennae at it to pick up radiated emissions and attaching a CRO and/or spectrum analyser to all the cables (including power supply) to measure the conducted emissions.
EMC is measured by stimulating your equipment to see if it malfunctions or gets damaged. So the test starts by blasting radio at it across a range of frequencies, then putting electrical noise and glitches on its inputs and outputs, cranking the power supply voltage up and down a bit and finally by zapping any accessible contacts with a few kV to see if anything breaks.
The harshness of these tests depend on the jurisdiction doing the testing, e.g. proper CE EMC tests are more violent than FCC testing, especially with the 4kV contact and 8kV through-air discharges.