Earlier quoted context omitted.
The tests weren't the problem. VW made it so the car only passed during the tests. A test should be somewhat reproducible and that conflicts with not being able to cheat the test. The solution would be to throw some people in jail. Your suggestion that it was even mandatory for companies to behave this way is so weird that I cannot respond to that.
Your first two sentences seems to contradict one another. The assumption was the cars would behave the same in tests versus how they are driven by real drivers, but THAT WASN'T IN THE TEST! Test it! Randomly give them an 4 hour driving profile including resistance and acceleration generated from a model of drivers, fail if it diverges by X% from the reproducible baseline. This is what people are complaining about (la…
We have an example in Apple that does exactly this, with a CEO that makes statements during quarterly earnings summary calls openly admitting exactly this, and there is no lawsuit. This is also how capitalism works.