Simple Explanation Of Heuristics And Oracles For Testers — Tentamen Software Testing Blog

Karlo Smid
2 min readSep 30, 2020
Image by balancepft from Pixabay

TL;DR

Now that we explored Neil Boyd’s example of session-based testing. The Charter is to find in the fifteen-century, a new route from Europe to India via sea; we will try to give a simple explanation for heuristics and oracles with examples. Katrina had already done an excellent explanation with examples of those two concepts. This is a part of the Exploratory Testing Pathway. Many thanks to Marcel, who sublimed this great resource on his blog, That’s the buffet table.

Heuristics And Oracles

As Katrina pointed out, Heuristics and Oracles are two scary words! What those two had to do with testing? Well, those two words are essential for Critical Thinking skill:

Critical thinking is the analysis of facts to form a judgment [source].

Software testers are doing analysis of application under test. Note here that analysis is a complex task, and it is not checking. In checking, you know the expected result of your test. In testing, you do not know the expected result. You can only assume what could be an expected result.

Heuristics are simply experience-based techniques for problem-solving, learning, and discovery. [source].

Oracle is a special kind of heuristic that helps us to identify do we have a problem (a bug) here.

Example

The new version of the web application is deployed in the testing environment. My heuristic is that I need to load the home page and hit browser refresh. Application is a Single Page Javascript Application (SPA) that access the REST JSON API. Doing that, I will remove the previous version of the SPA from the Browser cache.

Hmm, experience-based, but what if I do not have testing experience? How do I learn my heuristics? Learn from testers that have experience. Read their books or blog posts. Katrina listed a few of them.

Oracle

Oracle is a heuristic that helps us to identify do we have a problem here. From the previous SPA example, let’s say that I found that one UI component does not show data. My oracle is if any of the REST API calls in the Chrome Developer tools network tab is red (error HTTP code), then we have an issue in the SPA part of the application, unhandled error code from backend.

Remember

Software testing is a critical thinking analysis of application under test. Heuristics and oracles are essential tools for that activity.

Originally published at https://blog.tentamen.eu on September 30, 2020.

--

--