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.
There were tests before the war and before some offensives of WW1. But there was two points with the battle of the Somme:
- First artillery shellings were aimed mostly at the first trenches of the global defense system of the Germans, which was built in depth (in depth as military significance, which is far from the front line, not under the ground. Those trenches were effectively destroyed with losses in German sides, but trenches behind first ones were not destroyed, as well as most of German artillery batteries and support positions.
- Second, Germans had built bunkers deep in the ground, with concrete and steel so that they were able to resist to the artillery shelling
These two issues explain why the Germans had the possibility to fire against British troops, with machine guns as well as artillery, as soon as the infantry attack began.
I remember to have read in Ernst Jüngers "In Stahlgewittern", the English translation is called Storm of Steel, that Jünger felt, that the churned up soil near the front lines dampened the effect of artillery shells. Furthermore, he also wrote, that the Germans felt quite safe in their bunkers.
So, to add another point, although admittedly poorly sourced: the soil around the frontlines was softened up by the constant artillery fire. Thus, when one side launched an offensive, the shells of the initial barrage penetrate the loosened soil further, thus limiting the effect of the blast. Since the same amount of explosive in the shell needs to move a larger mass of soil if the sheel penetrates further, the area affected by the shell's blast is smaller.
Note, that this does not apply to Shrapnell shells, which are supposed to burst above ground.