It seems that doping scandals are still very much a part of big sporting events. There are the recent news about the Russian team at the Olympics, the Tour de France scandals, and I'm sure there are more. In the Russian case, for example, we're finding - years after the event - officials that are testifying to the widespread use of doping, including by gold medalists, and we're finding evidence that the analysis lab (run by Russian officials) was falsifying results.
I do not understand why this is still a part of sports. It seems that there's a simple solution: just test every participant in a sporting event, right on the day of the event, in a uniform/standardized way, by the same independent laboratory, with supervisors from the public (perhaps even broadcast to the public), instead of just selective testing by country-specific secretive and closed labs as seems to be the case now.
If for some reason the tests are prohibitively expensive, then make it a rule that tests will always be taken from people who score one of first 3 places in a given competition. Or run basic tests on every participant, and very extensive/thorough tests on the winners.
Why is this type of thing not done to put an end to doping once and for all? Or am I misunderstanding something?