Software Testing: The Basic Guide that I wish I had before

Jesús Lagares
CodeX
Published in
5 min readAug 30, 2022

This last summer I started to search for a job in the Computer Engineering market. In February I will finish my Computer Science Degree (or that’s what I think right now) and I’ve started to search for a job as Computer Engineer.

I could take part in some interviews with recruiters and tech challenges. During these interviews, the recruiters asked me a lot of questions, tech, and nontech questions. And always I finished and send a tech problem the interviewer told me:

“Okay, the problem is solved but I don’t see any test, where do you put them?”.

To this question I responded with a:

“I didn’t develop any test, I didn’t learn it at my Degree”.

Is it incredible, don’t you think? Something as important as testing is requested from me in every interview and I have zero ideas about it because anybody teaches me at University (if you want to know what I learned at University check my article: “4 years of a Computer Science Degree in 5 minutes”. You’re going to love it).

For this reason, I wrote this article, to give you the simple guide that I would have liked to have had before my first interviews. A short, clear, and easy-to-understand guide that covers the basics of testing.

Do you want to avoid what happened to me? Then let’s start.

Testing? What is testing?

If you search on the Internet you will find some complex definitions of testing. However, only by observing the word, you could imagine your meaning. A simple definition that I love is…

Testing in the software industry is a process to check if the software that we’ve developed matches the expected requirements and has no errors or bugs.

Testing our software allows us to deliver the required software without any errors. So we can reduce costs, and time of coding, and give our users the experience that they wanted.

Image from JavatPoint

Why do we have to learn about testing?

Imagine that you buy a new microwave, but when you start it doesn’t work. You go to the shop and notify the problem. The person in the shop tells you that he will not refund your money because you ask for a microwave, not for a specified working microwave. Wouldn’t this be frustrating?

Of course it will be! And that is because you don’t have to request a working microwave, working and error-free is the minimum you should expect when buying a product. For these reasons is important to learn about testing and to test the software that we’re developing.

It’s important to learn about testing because testing is an elemental part of the process of software development. With testing, we can identify defects and bugs in our program, increase the quality of the code (if we find a bug before we deliver the code, it will be an increment in the quality of the code), and we could be sure that our software does what it was created to do.

Do you understand now why it is important? Perfect! But… How can we do this process?

How can we test our web, app…?

I bet you’re thinking right now that for testing your app you have to try manually all the inputs and all the combinatorics that your software has. But, I’m sorry to tell you this but… You’re wrong. Unless you want to spend all your time with manual and terrible repetitive work, manual tests are not an option.

Instead, we have automated tests. Automating these repetitive tasks can be a game changer in our life as software developers. Imagine you want to make some changes to your GUI. If you created GUI tests previously you make any changes, you could change anything you want and ensure that everything keeps working properly.

The code that we have to write to create our tests will change depending on the programming language that we’re using. Generally, there are some libraries or frameworks to generate automated tests for our program. I encourage you to search on the Internet for something like: “testing in JavaScript”.

Anyway, here you have a few resources:

Again, I bet that now you’re thinking something like this:

“Okay, I’m going to automate my test, but what order do I have to follow? My app has an API, a GUI, a login, a lot of cool features…”.

There’s no absolute answer to this question, but there are some methodologies designed to provide a “correct” order to the testing process. For example, a well-known way of doing our test is following the Test Pyramid.

Test Pyramid

The Test Pyramid is a graphic metaphor introduced by Mike Cohn in his book “Succeeding with Agile” for the order, and importance that we have to take into account when we’re coding our tests. Nevertheless, it’s not a perfect formula. There are a lot of people that struggle to put into practice this pyramid properly.

Figure from MartinFowler

However, there's not a perfectly defined way to test our software. So you can follow the one that fits you best. The important aspect is that you must test the code you’re developing.

Final thoughts

Software has become an essential part of the world we live in. We use apps and websites every day, and we expect them to work properly. But we not only are consumers, but we’re also producers of the software. We are developers or simply we love the tech industry and we code for fun. In any case, the code that we develop must fulfill exactly the purpose for which it was created without bugs or errors. If we want to achieve this goal, we have to test our software.

The way to write our tests will depend on the language that we’re going to use. But we know that we’re going to develop automated tests using a methodology designed to give the process a logical order. Testing is a vital part of our role as a software developers and we have to give it the importance that it has. An approach that I love so that the testing process doesn’t get boring is to think about how I can break the software I just created.

Did you know about testing before? Do you write tests in your job?

Conclusions 👋

Thank you! Thank you so much for reading the article. I’d love to know your opinion about it, so don’t dude write it in the comments, I’ll read you.

In turn, if this article has helped you remember that you can give it a clap and share it with your comrades. And don’t forget to follow me if you don’t want to miss any of my articles.

About author🤓

My two passions are technology and communication, so I take every opportunity I can get to talk or write about technology.

Want to connect? 📲

📩 jesuslagaresgalan@gmail.com

📸Instagram

💼LinkedIn

📹 Youtube

🐦Twitter

¡Thanks! ❣️

--

--

CodeX
CodeX

Published in CodeX

Everything connected with Tech & Code. Follow to join our 1M+ monthly readers

Jesús Lagares
Jesús Lagares

Written by Jesús Lagares

Backend Software Engineer @ Nova | Tech Content Creator @ AlpacaTech | Writing about software development and technology 💻✨.