At the battle of the Somme the British bombarded the Germans for seven days. They fired over 1.5 million shells. But most of these shells were shrapnel shells. These shells failed to cut and eliminate the defenses most importantly the barbed wire. Why didn't the British test on an artillery range the effects of shells on trench warfare defenses? Did any power test how shelling effected defense lines?
Both sides did quite a lot of testing pre-war. That's why they had detailed tables that showed that X shells in Y hours would destroy anything. As it turned out, though, all this testing turned out to be irrelevant to the actual battlefield conditions of the Trenches.
The problem is that in a war with your troops at risk, countries are far more willing to exert themselves than anyone is between wars for a test. The Germans build steel-reinforced concrete shelters, buried deep underground all over the front. It is certain that nobody in England built one to test shellfire before the war.
It is easy to look back and see where mistakes were made. It is harder to look forward to the future.
Although, as you note, millions of shells were fired before the larger battles, the damage done by these shells was largely incidental and known to be so. Of much greater significance leading up to an assault was the suppression of enemy fire while friendly troops were in No-Man's Land, and a further shock-induced delay after the barrage lifted before hostiles reacted and manned the guns. (Given the horrific firepower cast by these defences, even a few extra seconds meant many saved lives.) High Explosive shrapnel was fired because it was the most effective in suppressing enemy fire.
Unfortunately, barrels heat up and expand when fired rapidly, causing the walking barrage to back up onto friendly troops. This prospect terrified the soldiers and both interfered with their need to keep close to the barrage, and caused significant friendly fire casualties.
While numerous attempts had been made to calibrate this effect by (artillery) battery, based on estimated gun age, this effect varied widely from gun to gun for many additional reasons. Major General Currie in the months leading up to Vimy Ridge had every gun in the barrage individually calibrated for barrel expansion and the consequent range change by number of shells fired. Combined with providing every NCO as well as officer with a detailed schedule of the barrage's advances, the Canadian Corps was successful in keeping the entire first wave within 60 seconds of the barrage, with very light friendly fire casualties. On Easter Monday, April 9 1917, the Germans for the first time emerged from their bunkers after the barrage to find large numbers of Allied troops already in their trenches.