HAVE YOU EVER DELIVERED A THEME, AN ARTICLE, A BOOK WITHOUT REREADING IT?
OR YOU HAVE EVER PRINTED IT AS IT WAS, HOPING THAT THE READER OR THE PROFESSOR WILL FIND YOUR ERRORS FOR YOU?
IF YOU REREAD IT: HOW OFTEN DO YOU DO IT?
Normally when you write something important, what you do: you wait to have written 300 pages to give a rereading? Or 50? Obviously the answer is the same for everyone: NO.
This is an example that I often give my clients about the theoretical and practical importance of software testing.
Writing software is like writing a book: especially when it comes to rereading it
Let’s take a student, a professional from another field, a journalist, a writer. We can take ourselves as an example, because in life, starting from school desks, we wrote something: when we reread what we wrote?
Well, depending on what we do when we write, without knowing it and even without ever writing a line of code in our life, we have already done a “test”:
- GRAMMARY CORRECTOR: obviously, using any Word Processor you will activate the automatic grammary correction that will find you a good series of trivial spelling errors and you will remove some small problems. This is STATIC ANALYSIS. But is it enough? Obviously not: you are leaving a MOUNTAIN of syntax errors, subjunctions, consecutio temporum, logic, consistency, readability etc. they can not be identified by an automatic checker.
Do you only use static analysis and then release your software or sell your product directly without further testing?
- SENTENCE: do you reread, as almost everyone, a single sentence after writing it? Or at least every 2-3 sentences? Well: this is FUNCTION TEST. In fact, you want to be sure that every single sentence you wrote stands up, right? That it has no gross errors of syntax, punctuation or spelling? Fantastic: it happens, or it should also happen in the software.
Do you test every single function of your code in order to build safe and stable bricks, or do you hope that the errors will settle down later thanks to someone else who finds them for you?
- PARAGRAPH : you write, write, put together a few logical phrases together and at the end you get a paragraph. You are slightly changing argument, you want to close a concept or move on to another event. What are you doing? Reread the sentences, checks that are consistent and linear between them, that the speech is consistent? You are doing UNIT / MODULE TEST to check that all your paragraphs form a coherent whole.
In your life as a developer or manager of a team, after putting together a bit of functions, do you test each module or hope that assembling modules not tested between them, sooner or later they will stand alone by a miracle?
- CHAPTER : Once you’ve written more paragraphs, will you want to check if they’re okay together? If you have once again respected the Consecutio Temporum? If the speech stands, the sentences and paragraphs flow well, there are no gaps, contradictions, unclear passages? If you have exhausted the topic, the event in a complete and exhaustive way? Excellent: you did not know it, but this is SOFTWARE INTEGRATION TEST.
Is your code tested in a Big-Bang manner, crossing your fingers only near the end when everything is ready, or do you anticipate problems by first trying out the behavior of a few elementary modules that interact with each other?
- BOOK : perfect, you have arrived almost at the end. You have completed your article, book, document, whatever it is. What are you doing, you read it from beginning to end? How many times? Are you trying to figure out if you have completed everything to say? Reconstruct the logical thread of each individual character, event, topic that you have treated? Going to look for an overview that is impossible to find by reading only a single chapter? You have done the equivalent FUNCTIONAL / SYSTEM TEST. And often, this is the only activity that is done by 90% of companies not subject to certification or “forced” by the customer.
Is your final product at least tested before being delivered with functional tests? Verifying that the external terminals do what is expected to do? Or are you hoping your client is screaming at the phone for finding the mistakes for you? And as you well know, customers are VERY good at finding the most unthinkable mistakes …
- PROOFREADER: you have certainly heard of him, it is a fairly clear concept even to those who do not take care of writing professionally. A writer struggles to see errors, problems, gaps, lack of coherence, contradictions in his book, because it has been written in such an intense and engaging way that he himself can not abstract himself and see it from the outside, with different eyes and soul. This is why he asks someone else to reread: the proofreader , which is a real profession or can be a friend, a colleague, a relative who do you a favor. They are doing for you the equivalent of the INDIPENDENT TESTING, that is clearly differentiating the role of the writer and the software developer.
Can you differentiate the role of the writer and the software developer, or do you hope to be able to lift yourself completely from your role and be an impartial and efficient judge of your own work?
- REREADING: ok, we understand that we must always reread, sentence by sentence, paragraph by paragraph and so on. But what do you do when you reread a very important text for you to publish? Do you read a word yes and no? Are you missing some piece of a phrase? Do you voluntary miss a paragraph every once in a while? Skip some chapters? Obviously not: you read ALL. To conclude: the percentage of what actually reads or better test in the software field is called COVERAGE.
Do you verify ALL the software you wrote, or leave a piece of it that has never been tested in such a way as to make the customer angry? Above all, do you have any idea how much code you really covered and how much NO ? And how do you measure it?
Now I’ll ask you some final questions that will now be clearer to you:
- Why should you sell software that has never been tested or tested badly?
- How do you plan to offer the customer a software where the individual functions, units, modules have never been individually verified?
- And maybe would you like to market a product that you have only verified at the end putting everything together at the last minute?
Do you know what the FUNDAMENTAL difference is between a book and the software?
That a mistake in the book is boring, so many mistakes are annoying. In the software instead, a serious error:
CAN KILL SOMEONE (SAFETY CRITICAL)
CAN RUIN THE IMAGE OF YOUR PRODUCT (QUALITY CRITICAL)
CAN SEND BANKRUPT YOUR COMPANY (BUSINESS CRITICAL)
Are you sure it’s not worth investing in quality and testing?