Propositional Logic

Propositional Logic Application In Software Testing

If you have heard about various types of logic and how they are helpful in Computer Science, it should be naturally obvious to you that these logic can be used while testing software too! In this blog, let us take a look at what Propositional Logic is and how it can applied while doing Software Testing.

Propositional Logic

Propositional Logic is based on declarative statements. They have a definitive outcome of the computation as a truth value (True or False), and that outcome is a fixed value (unvarying). Here are some propositional logic examples:

  • 2 +2 equals 4 (True)
  • The Sun rises in the East direction. (True)
  • USA is in African continent (False)

When we know something as True or False, it is helpful to guide us on further course of action during Testing. I will cover two instances where propositional logic can be useful while testing:

During Test Orchestration

When we are doing testing, and mind you, this is not just ‘exploratory testing’, we need to have these declaratives handy to direct us on the course of testing. When we definitely know that a specific path cannot be taken (and this could be because it is impossible for such a path to be taken in that context), we direct our testing in other paths. Likewise, contextual parameters (current value of a variable, constants, etc.) might dictate how the testing should progress.

Selection of automation checks to run

Automated checks aid in the process of testing. Based on the context as explained in the above topic, there might be situations where a specific set of automated checks that need to be done to help get results for the testing. What automated checks need to be run can be decided based on the context based on the results obtained, contextual parameters, etc. The logic can act as a very handy tool in picking the checks to run.

Those two above are very pretty simple examples of how the logic can be used for Software Testing. There are many other areas and scenarios in which it can be put to use. In fact, many of us may be unconsciously applying the logic.

Hope you found the topic interesting. If your organisation is looking for devising a testing strategy for your product using various techniques like propositional logic, feel free to contact me. Glad to help!

1 thought on “Propositional Logic Application In Software Testing”

  1. Pingback: Predicate Logic In Software Testing - Venkat Ramakrishnan

Leave a Comment

Your email address will not be published. Required fields are marked *