VW’s diesel firmware detected when it was undergoing emissions testing and changed the engine tuning to produce 1/40 of its normal toxic output, fooling regulators. But though they’re the only ones who’ve been caught using firmware to game emissions testing, they’re not the only ones with something to hide.
It’s an open secret that manufacturers who’re conducting gas-mileage testing on new cars trick them out in ways that are totally unrepresentative of field conditions, in order to produce sticker-numbers that promise eye-popping (and unattainable) fuel efficiency. These kinds of shenanigans work great in the EU, where auto manufacturers self-certify their efficiency claims and face no real penalties for lying.
Before a car’s fuel efficiency is tested, manufacturers take such steps as removing all extra weight (including the stereo!), removing source of drag like side mirrors, adding special lube to the engine and filling the tires with exotic gases. The alternator is switched off so that the gas goes further (but the battery drains), and the petrol itself is replaced with special, expensive blends not available in the wild. There are even more dirty tricks — taping the seams in the panels to reduce drag, running the cars in high gear and at high temperatures, for example.