<img alt="" src="https://secure.wauk1care.com/164394.png" style="display:none;">

'It's only logical thinking, Captain'

Posted by Tony Simms on 29/11/2021
Find me on:

Introduction: Exploring the Power of Logical Thinking

Being a tester requires a whole mix of skills. Nowadays, it requires as many soft skills as it does technical skills. For example, a tester should not just have the ability to find defects, they should also have the ability to present their findings and ability to solve problems.

One incredibly important attribute a tester must have an aspect of logical thinking or an ability to think logically. 

1-Nov-29-2021-09-33-34-48-AM

To learn a new skill or to improve your logical skill, here is a little exercise. Take a bit of time to think about your answer as it requires deep thought and concentration. Then when you are done with your thought process, read on as I talk through the logic and explain how this sort of thinking might impact testing . You might find playing music in the background might help to ensure that the stress levels are manageable. 

'LOGICAL THINKERS' EXERCISE

The university is holding a technical recruitment fair for its students, with a number of companies attending, with jobs on offer for both developers and testers. In order to help the students, the university has prepared a set of information packs.

Logic Image
One box contains information & a keyring labelled ‘Tester’, second box is labelled ‘Developer’ and the final box has information for both, ‘Tester’ and a ‘Developer’. 

The problem is that, the Student Guidance Councillor has mixed up the contents.

Each set of boxes contains the same set of information and keyrings but no set of boxes contains the set listed on the box, i.e.

  • The boxes labelled “TESTERS” do not contain tester information and keyrings.
  • The boxes labelled “DEVELOPERS” do not contain developer information and keyrings.
  • The boxes labelled “DEVELOPERS/TESTERS” do not contain information and both keyrings!

All boxes labelled “TESTERS” contain the same set of contents, likewise the boxes labelled “DEVELOPERS” and the boxes labelled “DEVELOPERS/TESTERS”. 

Using your logical deduction powers, please comment below what is the least number of boxes you need to open and in what order do you need to open them, to determine the contents of each set of boxes.

No cheating!

=============================================================

When you have your answer, read on: 

As a tester, the first thing we need to do is review the available information so that we understand what we are looking at. Indeed, how can we test if we don’t know what it is we are testing and what we are testing for? 

In this case, we have a fair bit of information to go on. We know that there are three groups of boxes, (Developers, Testers, Developer/Testers) and that each group of boxes contains a set of items (information and keyrings).

We know that the set of items, each box contains is not the set stated on the box.
So first of all, we can determine what is NOT in each box.

  • Set A is labelled Testers, so cannot contain JUST tester keyrings.
  • Set B is labelled Developers, so cannot contain JUST developer keyrings.
  • Set C is labelled Developers/Testers, so cannot contain BOTH developer & tester keyrings.

A chart of contents might look like this: 

Logic Table 1

Having drawn the chart, it is now easier to see what might be in each box.

As box C can ONLY contain a Tester or Developer keyring, (and not both). We can see that if we open box C first, we can determine what it actually contains.

It does not matter what it contains, the logic works regardless. So for the sake of this exercise, let's say we open it and it contains a Developer keyring. We can then redraw the chart with this new information: 

Logic Table 2
Having established the box that only contains Developer information and keyrings, it's an easy task to see what is in the other boxes without the need to open any more.

If box C has the Developer content, then box A cannot! So let’s redraw the chart: 

Logic Table 3
If not only Tester or only Developer, then Box A must contain both sets of information and keyrings. Which means that Box B has the Tester content.

Logic Table 4
This was a simple exercise but it does illustrate some important points regarding testing. 

The ability to be able to follow a logic trail, often scattered across different sections of a document or ever across documents is very important. For example, spotting a contradiction in requirements where the specification has separate requirements that individually make sense but when looked at as a whole, it cancels another one out.

Particularly, if the conflict exists in different design documents, worked on in isolation, spotting the logic error in the review stage can save a lot of costly regression and remediation work, later in the process.

Another test-related lesson from the exercise is the need to maximise the effect of your effort. With testing time often being squeezed due to late delivery, over testing is a luxury few can afford. Why spend time running two tests (like opening two boxes) when a single test can provide you with the results you need. Being able to follow the logic and explain why you only need to run X number of tests rather than Y can help mitigate the fears of risk adverse organisations who are stuck running unnecessary exhaustive test, simply because it makes them “feel” safer.

The final lesson for testing that I want to comment on is the need to allow time to reflect on the subject under test. In the exercise, the immediate reaction of may (including myself) is to say, let's just open two boxes - it's quick, it's easy and it gives me the answer I need and in truth, sometimes that would the expedient answer.

However, without allowing enough time to contemplate the test, review the approach and approach problems, important elements of the system can be overlooked. In the long term, hundreds of needless tests could be written and executed. Easier time focusing in preparation often can pay dividends in terms of more accurately forecasting the time required for testing and more efficiently executing the required test.

So, the rational conclusion is testing requires logic - how did you do on the test?

nFocus SDET Academy

Topics: Software Testing, Software Testing Techniques, Tech Roles

nFocus Blog

Welcome to the nFocus software testing blog. As thought leaders and technical innovators, we created this blog to distil our thoughts, ideas and musings on improving software quality.

Fill out the form below to receive future communications from nFocus including our latest:

  • Blog articles
  • White Papers
  • and plenty more!

Follow us

Follow us on LinkedIn to see our latest content!

Subscribe Here!

Recent Posts

Posts by Topic

see all

Posts by Topic

see all