mnemonic-techniques

What are Test Oracles and Test Heuristics

mnemonic-techniques

In the world of testing, we frequently hear the words Test Heuristics and Test Oracles, however what are they and how we can execute them into our day by day testing activities?

Test oracle is a mechanism that determines whether a given sequence is acceptable or not. Put another way, it’s determine the outputs of the system as your’s expected results. Oracle may be an existing system (used as a standard), other software, a user manual or personal knowledge, but should not be the code. What belongs to individual’s specialized knowledge may be failed and tester can be confused the test result with other similar systems and roles.

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

And all oracles are heuristic, but not all heuristic are orcales. An oracles is a heuristic, but it’s special kind of heuristic

Refer to: A Rapid Introduction to Rapid Software Testing by Paul Holland

Therefor, oracles helps us recognize a problem like decide whether there’s problem in the product we’re testing, but it’s not a method for sloving a problem, or for making a decision. And oracles can fail too, so an oracle’s not different from a heuristicoracles and they are the same.

Let’s look at the examples of heuristics and oracles to learn more about them.

  • Example 1: Suppose you are testing an e-commerce website. Most e-commerce websites’ cart contains products as well as quantity and attributes . Through years of experience testing e-commerce websites, I have come to learn that Adding products to the cart and fixing the number of products are likely to reveal bugs like incorrect total calculation. Therefore, on my next project, I intuitively will test some scenarios related to update the number of products in the cart and calculate the total cost. It’s a Hueristic
  • Example 2: You are standing at the checkout screen. First, you might check all the information is correct, then click on agree to payment and expect to see either a redirect to the payment screen successfully. However, after you attempt to payment, you see an error 500 response, you know that something has gone wrong. It’s a Oracles

Why are they important for testing?

Both Test Oracles and Test Heuristics in Agile are vital when it comes to exploratory testing in an agile environment. When we don’t have enough time to explore product, construct test cases and the product is continuously evolving to keep the reliease schedule, we just have to use our domain knowledge (Test Oracles) and previous testing experience (Test Heuristics) to be able to quickly design and execute tests at the same time while also learning about the product.

But in normal state, interaction with the test oracle is better done at the nearly stages of the project and particularly the test execution phase  to clearly define the functional outcome.

However, Oracles and Hueristics are dificult for new tester for to try use it because it base on user’s experience.

If you want to complete it perfectly, you should apply three capabilities belows:

  • A generator, to provide predicted or expected results for each scenario
  • A comparator, to compare predicted and obtained results.
  • An evaluator, to determine whether the comparison results are sufficiently close to be a pass.

Oracle give you the answer, and you can use it to compare with the result the product, so if there’s a difference between the oracle’s answer and the product’s result, there’s a problem. You must using your own heuristics and that can lead to mistakes when evaluate the actual results.

But they are enormously helpful tools for critical thinking if we can capture it.

How can we apply them?

Here are three well-known test heuristics used by software testers:

  • Goldilocks – Elisabeth Hendrickson – “too big, too small and just right”. In this method you must try to testing with too big and too small data.
  • RCRCRC – Karen N. Johnson – “Recent, Core, Risky, Configuration, Repaired and Chronic”. Those key will help you to think up ideal for your’s scenario.
  • FEW HICCUPPS – James Bach and Michael Bolton – “Familiar, Explainability, World, History, Image, Comparable product, Claims, User Expectations, Product, Purpose, Standards, and Statutes”. Some context, specification is missing or contains inadequate information, you can use this method to support you with identifying problems in your product.

Post a Comment