I don't know the testing procedures, no. Generally a casing is essentially 2 steel pipes of different diameters, with concrete poured in between. They have to go to a certain depth, supposedly measured to be the bottom of the water table, i.e. anything below that will not end up in groundwater or streams. But that depth is different everywhere, so someone has to make a decision. I assume that decision is based off of a core sample or something similar, but I don't really know, and I assume they add a nice safety cushion.
Most failures occur by either not taking the casing deep enough, or else a cracked casing, allowing pressurized frackwater/gas/oil to pass. Generally these cracks can be prevented with higher grades of steel and/or cement, they're a combination of pressure and corrosion. But as anything else, its a cost trade-off. If going with cheaper stuff saves more money than the expected fines for the expected failure rate, well..... Thats why I want ridiculously steep fines, they should use the best stuff available, you wanna make it the cheap option. And yes, if I have any personal agenda, it's this, as my company is one of several that makes the steel and we like selling the more expensive stuff. But I do believe it personally from an environmental standpoint as well.
There are also surface failures, where the cap on the surface busts open and you end up with a geyser of nasty stuff, which soaks into the surrounding ground. You can also have surface spills, which can be due to carelessness, pipes failing, tanks failing, pool liners failing, etc. Many of these can be prevented simply by being careful, i.e. standard operating procedures, and monitoring pressures and such. But many are also related to material choices, just like the well casings. Generally, though, because they're on the surface, these leaks are temporary and obvious, in that everyone knows there was a leak well before a homeowner finds it in their water supplies.