Hard Tests
Or, "If Charles Dickens observed the state of modern-day software testing".
CHAPTER I: The One Thing Needful
'Now, what I want is, Test Cases. Teach these boys and girls nothing but Test Cases. Test Cases alone are wanted in life. Plant nothing else, and root out everything else. You can only form the minds of reasoning animals upon Test Cases: nothing else will ever be of any service to them. This is the principle on which I bring up my own children, and this is the principle on which I bring up these children. Stick to Test Cases, sir!'
The scene was a plane, bare, monotonous vault of an exam room, and the speaker's square forefinger emphasized his observations by underscoring every sentence with a line on the schoolmaster's sleeve. The emphasis was helped by the speaker's square wall of a forehead, which had his eyebrows for its base, while his eyes found commodious cellerage in two dark caves, overshadowed by the wall. The emphasis was helped by the speaker's mouth, which was wide, thin, and hard set. The emphasis was helped by the speaker's voice, which was inflexible, dry, and dictatorial. The emphasis was helped by the speaker's hair, which bristled on the skirts of his bald head, a plantation of firs to keep the wind from its shining surface, all square shoulders--nay, his very neckcloth, trained to take him by the throat with an unaccommodating grasp, like a stubborn test case, as it was--all helped the emphasis.
'In this life, we want nothing but Test Cases, sir; nothing but Test Cases!'
The speaker, and the exam provider, and the third grown person present, all backed a little, and swept with their eyes the inclined plane of little vessels then and there arranged in order, ready to have imperial gallons of test cases poured into them until they were full to the brim.
CHAPTER II: Murdering the Innocents
Isaac Techuebee, sir. A man of realities. A man of test cases and verification. A man who proceeds upon the principle that two and two are in the same equivalence class, and nothing else, and who is not to be talked into allowing for anything else. Isaac Techuebee, sir--peremptorily Isaac--Isaac Techuebee. With a rule and a pairwise test, and the decision table always in his picket, sir, ready to weigh and measure any parcel of software nature, and tell you exactly what it comes to. It is a mere question of figures, a case of simple metrics. You might hope to get some other nonsensical belief into the head of Gerald Techuebee, or Aaron Techuebee, or James Techuebee, or Michael Techuebee (all supposititious, non-existent persons), but into the head of Isaac Techuebee--no, sir!
In such terms Mr. Techuebee always mentally introduced himself, whether to his private circle of acquaintance, or to the public in general. In such terms, no doubt, substituting the words 'boys and girls', for 'sir', Isaac Techuebee now presented Isaac Techuebee to the little pitchers before him, who were to be filled so full of facts.
Indeed, as he eagerly sparkled at them from the cellarage before mentioned, he seemed a kind of cannon loaded to the muzzle with test cases, and prepared to blow them clean out of the regions of childhood at one discharge. He seemed a galvanizing apparatus, too, charged with a grim mechanical substitute for the tender young imaginations that were to be stormed away.
'Girl number twenty,' said Mr. Techuebee, squarely pointing with his square forefinger. 'I don't know that girl. Who is that girl?'
'Sissy Jupe, sir', explained number twenty, blushing, standing up, and curtseying.
'Sissy is not a name', said Mr. Techuebee. 'Don't call yourself Sissy. Call yourself Cecilia.'
'It's father as calls me Sissy, sir', returned the young girl in a trembling voice, and with another curtsey.
'Then he has no business to do it', said Mr. Techuebee. 'Tell him he mustn't. Cecilia Jupe. Let me see. What is your father?'
'He belongs to the exploring, if you please, sir.'
Mr. Techuebee frowned, and waved off the objectionable calling with his hand.
'We don't want to know anything about that, here. You mustn't tell us about that, here. Your father breaks software, don't he?'
'If you please, sir, when they can get any that's already broken, they do break assumptions in the ring, sir.'
'You mustn't tell us about the ring, here. Very well, then. Describe your father as a software breaker. He reports software bugs, I dare say?'
'Oh yes, sir.'
'Very well, then. He is a bug reporter, a documenter, and a software breaker. Give me your definition of a test.'
(Sissy Jupe thrown into the greatest alarm by this demand.)
'Girl number twenty unable to define a test!' said Mr. Techuebee, for the general behoof of all the little pitchers. 'Girl number twenty possessed of no facts, in reference to one of the commonest of artifacts! Some boy's definition of a horse. Ceeteeful, yours.'
The square finger, moving here and there, lighted suddenly on Ceeteeful, perpaps because he chanced to sit in the same ray of sunlight which, darting in at one of the bare windows of the intensely white-washed room, irradiated Sissy. For, the boys and girls sat on the face of the inclined plane in two compact bodies, divided up the centre by a narrow interval; and Sissy, being at the corner of a row on the sunny side, came in for the beginning of a sunbeam, of which Ceeteeful, being at the corner of a row on the other side, a few rows in advance, caught the end. But, whereas the girl was so dark-eyed and dark-haired, that she seemed to receive a deeper and more lustrous colour from the sun, when it shone upon her, the boy was so light-eyed and light-haired that the self-same rays appeared to draw out of him what little curiosity he ever possessed. His cold eyes would hardly have been eyes, but for the short ends of lashes which, by bringing them into immediate contrast with something paler than themselves, expressed their form. His short-cropped hair might have been a mere continuation of the sandy freckles on his forehead and face. His skin was so unwholesomely deficient in the natural tinge, that he looked as though, if he were cut, he would bleed white.
'Ceeteeful', said Isaac Techuebee. 'Your definition of a test.'
'Artifact. Manuscriptivorous. Multiple levels, namely test policy, test strategy, test plan, test procedure, test cases. Written down first; executed later, sometimes more than once, too. Expectations hard and fast, but requiring step-by-step instructions. Value known by quantity.' Thus (and much more) Ceeteeful.
'Now girl number twenty,' said Mr. Techuebee. 'You know what a test is.'
She curtseyed again, and would have blushed deeper, if she could have blushed deeper than she had blushed all this time. Ceeteeful, after rapidly blinking at Isaac Techuebee with both eyes at once, and so catching the light upon his quivering ends of lashes that they looked like the antennae of busy insects, put his knuckles to his freckled forehead, and sat down again.
领英推荐
The third gentleman now stepped forth. A mighty man at cutting and drying, he was; a board officer; in his way (and in most other people's too), a professed pugilist; always in training, always with a syllabus to force down the general throat like a bolus, always to be heard of at the bar of his little Public-office, ready to fight all LinkedIn. To continue in fistic phraseology, he had a genius for coming up to the scratch, wherever and whatever it was, and proving himself an ugly customer. He would go in and damage any subject whatever with his right, follow up with his left, stop, exchange, counter, bore his opponent (he always fought All LinkedIn) to the ropes, and fall upon him neatly. He was certain to knock the wind out of common sense, and render that unlucky adversary deaf to the call of time. And he had it in charge from high authority to bring about the great public-office Millennium, when Test Managers should reign upon earth.
'Very well', said this gentleman, briskly smiling, and folding his arms. 'That's a horse. Now, let me ask you girls and boys, Would you test an edge case far from the happy path?'
After a pause, one half of the children cried in chorus, 'Yes, sir!' Upon which the other half, seeing in the gentleman's face that Yes was wrong, cried out in chorus, 'No, sir!'--as the custom is, in these examinations.
'Of course, No. Why wouldn't you?'
A pause. One corpulent slow boy, with a wheezy manner of breathing, ventured the answer, Because he wouldn't test it at all, but would monitor.
'You must test it', said the gentleman, rather warmly.
'You must test it', said Isaac Techuebee, 'whether you like it or not. Don't tell us you wouldn't test it. What do you mean, boy?'
'I'll explain to you, then', said the gentleman, after another and a dismal pause, 'why you wouldn't test an edge case far from the happy path. Would you ever see users straying from the happy path in reality--in fact? Do you?'
'Yes, sir!' from one half. 'No, sir!' from the other.
'Of course no', said the gentleman, with an indignant look at the wrong half. 'Why, then, you are not to see anywhere, what you don't see in fact; you are not to have anywhere, what you don't have in fact. What is called Theory, is only another name for Fact.' Isaac Techuebee nodded his approbation.
'This is a new principle, a best practice, a great best practice', said the gentleman. 'Now, I'll try you again. Suppose you were going to write an end-to-end test. Would you use an end-to-end test that allowed for variations upon it?'
There being a general conviction by this time that 'No, sir!' was always the right answer to this gentleman, the chorus of No was very strong. Only a few feeble stragglers said Yes: among them Sissy Jupe.
'Girl number twenty', said the gentleman, smiling in the calm strength of knowledge.
Sissy blushed, and stood up.
'So you would write an end-to-end test--or an acceptance test, if you were a grown woman and had an end user--with allowance for variation, would you?' said the gentleman. 'Why would you?'
'If you please, sir, I am very fond of variation', returned the girl.
'And is that why you would give up repeatability and reproduceability, and have people taking whatever paths they please with them?'
'It wouldn't hurt them, sir. They wouldn't be any the worse for wear, if you please, sir. They would be opportunities for creativity and expression, and I would fancy--'
'Ay, ay, ay! But you mustn't fancy', cried the gentleman, quite elated by coming so happily to his point. 'That's it! You are never to fancy.'
'You are not, Cecilia Jupe', Isaac Techuebee solemnly repeated, 'to do anything of that kind.'
'Test cases, test cases, test cases!' said the gentleman. And 'Test cases, test cases, test cases!' repeated Isaac Techuebee.
'You are to be in all things structured and disciplined,' said the gentleman, 'by test cases. We hope to have, before long, a board of test cases, composed of commissioners of test cases, who will force the people to be a people of test cases, and of nothing but test cases. You must discard the word Fancy altogether. You have nothing to do with it. You are not to have, in any object of use or ornament, what would be a contradiction in test cases. You don't vary from a pathway in fact, you cannot be allowed to vary from test cases. You don't find that heuristics and oracles come and perch upon your software; you cannot be permitted to use heuristics or oracles upon your software. You never meet with users straying far from the happy path; you must not look for edge cases that are far from the happy path. You must use', said the gentleman, 'for all these purposes, combinations and modifications (in seven principles) of test techniques which are susceptible of repeatability and demonstration. This is the new discovery. This is fact. This is theory.'
The girl curtseyed, and sat down. She was very young, and she looked as if she were frightened by the matter-of-test-cases prospect the world afforded.
'Now, if Mr. M'Borumchild', said the gentleman, 'will proceed to give his first lesson here, Mr. Techuebee, I shall be happy, at your request, to observe his mode of procedure.'
Mr. Techuebee was much obliged. 'Mr. M'Borumchild, we only wait for you.'
So, Mr. M'Borumchild began in his best manner. He and some hundreds other testmanagers, had been lately turned at the same time, in the same factory, on the same principles, like so many pianoforte legs. He had been put through an immense variety of multiple-choice exercises, and had answered volumes of head-breaking certification questions. Organizational test strategy, equivalence partitioning, syntax, and PRISMA, black-box testing, appropriateness recognizability, GUI testing, and generic test automation architecture, the sciences of combinatorial testing, alpha testing, linear scripting and level of intrusion, value-based quality, and Defect Detection Percentage, were all at the ends of his ten chilled fingers. He had worked his stony way into Her Majesty's most Honourable Privy Council's Schedule B, and had taken the bloom off the higher branches of math testing and phase containment, fault seeding, metamorphic testing, Capability Maturity Model Integration, and Wideband Delphi. He knew all about all the V-models of all the world (whatever they are), and all the histories of all the projects, and all the names of all the KPI's and metrics, and all the dashboards, graphs, and gates of all the companies, and all their interfaces and integrations on the two and thirty points of the compass. Ah, rather overdone, M'Borumchild. If he had only learnt a little less, how infinitely better he might have taught much more!
He went to work in this preparatory lesson, not unlike Morgiana in the Forty Thieves: looking into all the vessels ranged before him, one after another, to see what they contained. Say, good M'Borumchild. When from thy boiling store, thou shalt fill each jar brim full by-and-by, dost thou think that thou wilt always kill outright the robber Fancy lurking within--or sometimes only maim him and distort him!
This has been a parody of the first two chapters of "Hard Times", by Charles Dickens, which is in the public domain. I likely mixed some metaphors and arguments from different camps as I tried to fit the original but I hope it's still both amusing and insightful. For the original text (it may be more amusing to read the original first), see https://www.gutenberg.org/files/786/786-h/786-h.htm.