What is the System Under Test? A tale from Gallic Wars

Marcin Gryszko
7 min readOct 31, 2020
By Ssolbergj — Own work, CC BY 3.0, https://commons.wikimedia.org/w/index.php?curid=2992630

September, 52 BC, Alesia, Gaul

Julius Caesar was waging wars in Gaul for six long years. He thought he had conquered Gallia for the glory of Rome, but in 52 BC a young, ambitious, and charismatic chieftain, Vercingetorix, managed to unify the Gallic tribes and revolted against Romans. Caesar pursued Vercingetorix and his fellow soldiers. Vercingetorix retreated to Alesia[1], a large fortified settlement, together with his ca. 80.000 fellowmen.

Caesar decided to siege Alesia and to starve out the defenders. He encircled Alesia with 16 km long fortifications to protect his troops from sorties and enforce the blockade. Vercingetorix called for support from other Gallic tribes. To prepare for an attack from outside, Caesar commanded to build an outer circle of fortifications, enclosing his own legions with a 20 km system of trenches, palisades, and turrets. He was preparing to be besieged by the Gallic relief forces.

Sketch of the Battle of Alesia, drawn by Muriel Gottrop

The Gallic reinforcements discovered a place in the outer ramparts where the terrain was not favorable to construct strong defenses. They attacked the weak spot. At the same time, the besieged Gauls attacked the Roman inner fortifications. The legions were forced to fight on two fronts. The imperial forces defending the outer walls were on the brink of defeat; Caesar’s personal, last-moment relief boosted the morale of the legionaries who smashed the Gaul troops assaulting the outer fortifications. Brave Alesia defenders trying to break the inner fortifications were compelled to retreat into the city.

The battle was over. The Romans suppressed the last point of resistance. Vercingetorix was in an impossible situation. He decided to surrender himself to appease Caesar and save the lives of Gauls gathered in Alesia. Our story begins here…

Vercingetorix’s surrender

Caesar is going to receive Vercingetorix personally in his headquarters. He is aware of the desperate situation of the Gallic hero. Envoys sent by Gauls already negotiated the conditions of surrender. The next day, Vercingetorix should go to the camp and lay down his arms.

Caesar doesn’t trust the Gaul commander and prefers to take extreme precautions. Vercingetorix is known as a gifted leader knowing when to apply ruthless discipline and when to be politically savvy. No one in the past was able to put divided Gallic tribes under a single command. He fears a trick, maybe even a desperate attempt on his life. He plans to prepare himself for a possible unfolding of events.

Caesar is going to consider all possible outcomes of the surrender. To train himself, he’s going to replace his busy generals with their doubles (smart legionaries he personally selected for the task). Titus Labienus and Brutus are too occupied with their cohorts watching over Gauls. Caesar fully trusts them and knows that any question or order will be followed diligently. Labienus and Brutus doubles can learn very quickly how to behave like their counterparts and play their roles. Another legionary will be Vercingetorix.

What could happen? In the most probable scenario, Vercingetorix apparently will announce surrender and drop his weapons. Really? Caesar will ask Labienus, in charge of military intelligence, what is the situation of Gauls. If they are exhausted and ready to surrender he will offer Vercingetorix a fair and respectful treatment. But one doesn’t become the first emperor of Rome by being upright — Caesar will send a command to Brutus to raid Alesia and enslave their inhabitants. If Labienus answers that Gauls are making preparations for the last desperate attack, he will offer Vercingetorix food, wine, and a bit of gossip. Meanwhile, he will send a message to Brutus to prepare Roman troops for the final battle.

There could be an alternative development of events. Vercingetorix will change his mind and won’t surrender. In that case, he will be captured and treated like any common prisoner. As in the main scenario, Caesar will ask Labienus about the military situation. If the relief forces regroup and receive reinforcements, Brutus will get a message to leave the outer defenses and prepare for an open field battle. If there are no signs of any support coming, Alessia will be raided (another command to Brutus).

There could be an exceptional situation where Vercingetorix will try to attempt Caesar’s life. Caesar’s personal guards will kill him immediately and Brutus will be ordered to wipe out the city of Alesia. This scenario is quite improbable but Caesar is cautious. The stakes are high; after this decisive battle the Roman triumph, the dream of every general, is awaiting him.

Ancient Rome and modern testing

I told this story to introduce an analogy between human interactions and the world of software testing (though wars and prisoner taking are nowadays are much rarer than 2000 years ago). What relationship do the main story characters have with the components of an automated test? Caesar is our System Under Test — something that we will be testing and checking. We will send him stimuli (Vercingetorix) and we will watch his reactions to them — what will be the final Vercingetorix state and which interactions will Caesar have with his subordinates (Labienus and Brutus).

Vercingetorix throws down his arms at the feet of Julius Caesar. Painting by Lionel Royer.

Vercingetorix is the direct input, a thing that will invoke the SUT activity. In our case, the Gaul himself, his arrival, and words will trigger the behavior of Caesar.

Labienus is the indirect input — Ceasar’s subordinate, a dependency. Caesar will query him and his answers will influence Julius’ decisions. The real person in the test is replaced by a test double — a stub because firstly, we cannot use the actual informant networks of Labienus (the information is not yet there and it could be unpredictable), and secondly, Labienus presence is costly — if he rehearses together with Caesar, he won’t not with his troops.

Brutus is the indirect output — another dependant commander. The interaction with him is different compared to Labienus (indirect input). Caesar will give him commands. He will check in the test that the command passing happens. The (side) effects of the message to Brutus (e.g. burning Alesia to the ground) either will be checked in a separate test, or the verification will be dropped (maybe it’s too difficult or impossible). Caesar will replace the real Brutus with another double — a mock object. The double won’t provide any answer to Caesar but he will register the command and verify if the expected message was sent to him (and how many times).

Notice that Labienus (query) and Brutus (command) are our test boundaries, limits of the testable design. We (Caesar, SUT) don’t care how Labienus gets the information about the movement of the enemy or how the Roman cohorts will perform their military operations under Brutus. This is the sole responsibility of their commanders. Caesar doesn’t bother about it; there is a relationship of trust right now (Brutus and Labienus don’t conspire against Caesar yet, they will do in 44 BC during the Ides of March). We are just checking what questions are asked and which orders are given, not how they are conveyed and executed.


What happened between Julius Caesar and Vercingetorix in real life? Caesar in his “Commentaries on the Gallic War” is very laconic about the event and doesn’t describe the ceremony.

On the contrary to Caesar, Plutarch in The Parallel Lives describes a theatrical scene:

And the leader of the whole war, Vergentorix, after putting on his most beautiful armour and decorating his horse, rode out through the gate. He made a circuit around Caesar, who remained seated, and then leaped down from his horse, stripped off his suit of armour, and seating himself at Caesar’s feet remained motionless, until he was delivered up to be kept in custody for the triumph.

After the siege of Alesia, the war in Gallia was effectively over. Vercingetorix was brought to Rome. He spent in prison six years until he was exhibited in Caesar’s first triumph. After the parade (held in 46 BC), politically useless for Caesar, he was executed.

R.I.P., brave Vercingetorix!



Marcin Gryszko

Enduring software engineer and long-distance cyclist