EMI is measured in special rooms called "RF anechoic chambers" There are strict regulations regarding unwanted electromagnetic emissions, and all commercially-produced electronic devices must pass emission certification, to meet FCC and other international standards. This is true for all developed countries.
The anechoic chambers serves two porposes, (1) they shield the test environment from outside emissions from broadcasting stations, TV and radio, and (2) provide clean space with no reflections (no echo), to determine real emissions from a tested device, emission spectrum, amplitude, direction, and polarization. These are pretty expensive facilities equipped with carefully calibrated antennas, rotating test tables, and highest-quality measuring instruments. Every serious electronic corporation has these rooms, and there are certified laboratories who rent these rooms (with equipment and RF engineers) on hourly/daily basis, for a hefty price.
However, before taking the actual EMI test, design engineers usually conduct preliminary testings of their products with a set of near-field probes, aka "sniffers", connected to less-expensive spectrum analyzers in an ordinary lab. These small antenna-sniffers allow to locate a component or area that is the main source of EMI, and do something about the source, bypassing, filtering, smoothing signal edges, shielding, etc. Alternatively, the sniffers are employed only when a final product has some design flaw (board level, enclosure, etc.) and failed final certification test at a customer's site.
Theoretically, all EMI emissions could be calculated with modern 3-D simulation technology, but modeling all geometrical complexity is really resource consuming. RF engineers are some special people who got to know details of antenna theory and developed a sense of which electro-magnetical elements will emit what and how, without solving Maxwell Equations. This is still an art of black magic, even more than the art of high-speed design.