Roman infantry tactics refer to the theoretical and historical deployment, formation and maneuvers of the Roman infantry from the start of the Roman Republic to the fall of the Western Roman Empire.
I've always had an issue with movies that show Greeks, Romans, or anyone else who use an inter-linked shield formation to fight a battle. It's an issue that lends itself to fantasy settings as well, such as the Battle of the Five Armies from the "Lord of the Rings" prequels.
Soldiers using a shield wall, whether it was a phalanx, a testudo, or anything else didn't break ranks to fight individually. You see this common trope in movies, and on TV and it's entirely inaccurate. From a historical perspective, it's wrong. But, from the perspective of it being an action sequence, it looks cool and cool is what sells.
Again, take this scene from "The Hobbit: Battle of the Five Armies." The extended scene shows the use of the Elves' bows and the dwarven cavalry, but the theatrical release only used their infantry formations. What happens is the dwarves move two lines out in front of the Elves to meet the oncoming orcish army, where they form a shield wall with pikes extended. The Elves then run in, leap over the dwarves and.... die at the hands of the Orcs.
Because, again, action sequences look awesome.
In reality, or rather the reality of the setting; the dwarves of Dain Ironfoot were better off left alone as their ranks were more compacted, and very well protected. Having their spears jutting through gaps meant that the orcs would have to either fight through them and most likely be impaled in the attempt, or they would have to go around the sides in a flanking attempt. At which point the dwarves could shift to prevent it with their second line, or the orcs would be cut down by the cavalry.
In an ideal situation, the elves would have been better suited to using ranged weaponry and dropping thousands of arrows onto the advancing orcs, who were not using archers, or even shields. Their numbers would take heavy casualties, and the battle would have ended much more quickly. Yet, as I said, action sequences that look cool beat out what should have been the best tactic.
It really is a common thing in fantasy settings, though. You see it in "Gladiator", "300", and "Troy." To a lesser extent, you see it in HBO's fantastic series 'Game of Thrones" as well. For example, a recent episode showed an army of House Lannister facing off a mounted force. Their shield wall was better suited to defense as they had shields, spears, and archers all acting defensively. Until, of course, a dragon came along and ruined all the fun; causing the show to shift back to the same tired trope of broken rank warfare.
In the real world, there was a purpose to these military formations, and they functioned beautifully. The first rank would block with their shield while stabbing at the enemy with their sword or spear. Then there would be a collective push from the front rank to shove the enemy back, and the soldier in front would switch places with the man behind him who would repeat the process. Multiple ranks meant more waves of shields and weapons to use, so the instances where any individual would be fighting were small, and there would be less fatigue.
Which is another trope that you see, but I will save that for another time. I have a dragon to slay.