I'm curious: Given it's great size, it seems that a century of properly drilled troops, equipped with Scutum are almost invulnerable, as the testudo would enable them to survive ranged attack (asides from siege engine such as ballista and the like) and in melee they would prevent a solid wall of shield, robbing the enemy any chance of getting at that sweet Roman flesh.
I'm sure I'm wrong, because the Romans did suffer defeats. But why?
The Scutum was used for roughly 550 years, from about 250 BC to 290 AD. I can only think of 3 major defeats in this era.
The first and most significant was the battle of Cannae in 216 BC where the Carthaginian general Hannibal defeated a superior Roman force. There are two main reasons for this defeat: first, Hannibal's brilliance, and second, the Romans had poor strategy.
The Romans simply massed their infantry force in a phalanx and marched head on into Hannibal's center force. This is exactly what Hannibal wanted - not only were the Romans all facing and attacking in one direction, but they also began to fight in a very loose unordered manner because they believed they were winning. The Romans began to push Hannibal's much smaller force back.
Meanwhile, Hannibal's cavalry, deployed on the flanks, routed the Roman cavalry. This is when the rest of Hannibal's army (African mercenaries) emerge from hiding and attack from the two flanks. Because the Romans were deployed in a phalanx, and were very tightly packed facing the front, they were completely unprepared for an assault on their two flanks so they were absolutely crushed. Excellent video about this battle:
https://www.youtube.com/watch?v=CQNCGqfjaBc
The second defeat was Roman-on-Roman with Ceasar versus Pompey, so that doesn't really count. In this case the superior general defeated Pompey's superior numbers.
The third was Crassus' failed attack on the Parthian Empire, in which case he was defeated by effective use of ranged and heavy cavalry.
This was a very interesting battle which showcased some very brilliant tactics by the Parthians. What they did was harass the Romans with mounted archers, and as soon as the Romans formed the testudo they would withdraw and instead have the heavy cataphracts charge the roman infantry. This was done repeatedly so you would have legionaries dying, or being severely injured by arrows when they weren't in the testudo formation, and as soon as they changed their formation back into the testudo, they would be charged.
And since the testudo doesn't work very well against a cavalry charge, they were basically slowly bled and harassed in such a way that they couldn't respond. Furthermore, the Parthians had the home advantage - they were well supplied and could afford to have this very slow, indirect sort of battle, whereas the Romans were obviously on a clock because they were far from home.
edit: this is mostly what I remember from a university course on history of warfare.
double edit: fixed some dating issues I was wrong about.