10/10

Article thumbnail

Software testing

2m
frontend
testing
quality

Intro

We will go through the basics of software testing. We will find out what the magic tests are, when to use them and what we can achieve with them.

Prelude

In order to understand what application testing looks like, we need to learn the concepts from which testing is derived.

Question

Imagine a situation in which you are talking to a powerful AI. It's the year 2137, and all you have to do is ask a good question.... Exactly, but what does good mean?

In my opinion, it's a question that is short and specific. The kind you are currently asking in the GPT chat room. After all, by asking an overly complicated question before you get an answer, you have to ask more questions. It is much easier to ask one.

Of course, some problems are too complicated to be solved by a single question, so the problem should be broken down into smaller parts and to each of them ask a simple question - the divide and conquer methodology.

That's what software testing is. You should divide the problem if it is complicated into n parts, then ask specific questions and find answers to them.

Answer

People have been looking for answers forever. It's the same with testing. You look for answers to the questions you ask. Is the table flat? Is the earth flat? What will be the answers to these questions?

Of course, the table is flat, and the earth is not. However, if you go into the details, the table is not "perfectly flat" and the earth is not "perfectly round".

Here you can see the erroneously asked question. So the answer was also convoluted. Instead of hearing yes or no in the answer itself we had to resolve the doubts of the question...

As you can see the answers are dependent on the questions, not vice versa so before you start looking for them make sure that the question is the right one.

Divide and conquer

Let's suppose you work in a restaurant and teach a colleague to make pizza. How do you determine that your friend is making pizza the right way. The obvious thing is that you need to ask some questions and find answers to them ¯\_(ツ)_/¯.

  • Is the cake brown?
  • Is the cheese melted?
  • Is the pizza warm?
  • Isn't the pizza plate dirty?
  • Did the pizza taste good for 90% customers?

The answer to each of them is actually yes or no. If all the answers are positive, it means that our colleague is "good enough" pizzerman.

Well, let's check it

We already have the questions so let's now look for the answers - let's play the role of the tester. To each question we will add a corresponding icon suggesting yes (✔️) or no (❌).

  • Is the cake brown? ✔️
  • Is the cheese melted? ✔️
  • Is the pizza warm? ✔️
  • Isn't the pizza plate dirty? ✔️
  • Did the pizza taste good for 90% customers? ❌

During testing, it turned out that the pizza tasted good to only half of the customers, so our colleague needs training. We gave him a few days and we ran the same tests again.

  • Is the cake brown? ✔️
  • Is the cheese melted? ✔️
  • Is the pizza warm? ✔️
  • Isn't the pizza plate dirty? ✔️
  • Did the pizza taste good for 90% customers? ✔️

All questions have a positive answer, so our colleague can start work.

Summary

This particular questions and answers are mythical tests. So, we can say that testing is nothing more than posing clear questions that can have only two possible answers (yes, no) and checking which answer it is.

If you enjoyed it, be sure to visit us on Linkedin where we regularly upload content from programming.

I create content regularly!

I hope you found my post interesting. If so, maybe you'll take a peek at my LinkedIn, where I publish posts daily.

Comments

Add your honest opinion about this article and help us improve the content.

10/10

created: 10-04-2023
updated: 10-05-2023