Passed or Failed?

This lesson is about how to know, whether the software passed or failed the test. You will understand why this can be quite difficult to say.

Learning Objectives

You will understand the concept of oracles in software testing and the challenges and limitations associated with them. It emphasizes the importance of making judgments when determining if a program passed or failed a test and the fallibility of heuristic oracles. The video also addresses the implications of these challenges for automating tests.

 

Core Topics and Takeaways

  • Passed or Failed?

  • Specification of the expected result

  • Specification of the test environment

  • Specified and unspecified test conditions

  • Inputs and outputs

  • Heuristics

Video Highlights

Topics

Key Concepts

Video Location

Topics

Key Concepts

Video Location

The lecture discusses the concept of Oracles in software testing and the challenges in determining whether a program has passed or failed a test.

  • Oracles are tools used by testers to determine if a program passed or failed a test.

  • Oracles can include mechanisms such as specifications or reference programs.

  • Different implementations can depend on the same wrong algorithm or misunderstanding of the algorithm.

  • Traditional Oracles often don't exist, and heuristic Oracles are used instead.

00:01

Test specifications typically include input conditions and expected results, but rarely specify details such as versions of memory resident programs or system configuration.

  • Test specifications should include all input conditions and the test environment.

  • Memory resident programs running in parallel with the program under test can affect its behavior.

  • Test specifications often leave out details such as versions of memory resident programs, free memory, free hard disk space, and specific run times.

01:47

The section discusses the challenges of reproducing bugs and the limitations of monitoring all relevant aspects in testing.

  • Bugs can be hard to reproduce if they depend on unknown or seemingly irrelevant factors.

  • Automated tests often overlook important variables such as time, memory usage, and system state changes.

  • Comparisons between programs become more complex when considering factors like memory usage and execution time.

  • It is not feasible to monitor every potentially relevant aspect of input or output, so we rely on observing behavior in ways we think are important.

03:33

Heuristics are fallible but useful decision support tools, and oracles are heuristics that can lead to errors in test evaluation.

  • The more diagnostics we run after a test, the more the subsequent ones look at the state of the system after the diagnostics instead of the test.

  • Heuristics can contradict each other and lead to incorrect conclusions, but they allow progress on problems with no authoritative solutions.

  • Treating heuristics as rules instead of guidelines is a common mistake in test evaluation.

  • Using a heuristic oracle can result in two types of errors: misses (program appears to pass but actually fails) and false alarms (program appears to fail but behavior is actually okay).

  • Reliance on heuristic oracles constrains the automation of tests, which is a significant problem not acknowledged by many proponents of test automation.

05:23

Learning Highlights

In this section you have learned whether a program has passed or failed a test. The main reading, "Testing Without a Map" by Michael Bolton, introduces the concept of Oracle heuristics.

 

Recommended reading for this chapter is Testing Without a Map. You can find it here.

 

Traditionally, oracles are tools to assess whether a program passed or failed, but the paper argues that real oracles are challenging to achieve. The complexity arises from the variability in reference programs, making comparisons difficult. The discussion emphasizes the importance of judgments in testing and the fallibility of test data. Doug Hoffman's insights on monitoring relevant aspects and the limitations of heuristics in automation are highlighted, stressing the need for a nuanced approach.

 

Â