“Irreproducible bugs are a formidable challenge for software professionals. However, with the right mindset, techniques, and tools, you can navigate this complex aspect of your work and bring these elusive creatures into the spotlight.”
“Irreproducible bugs” are bugs that are difficult or practically challenging to reproduce. Usually, we consider a bug as “irreproducible” if it cannot be reproduced consistently, even after multiple attempts. Irreproducible bugs are a nightmare for software testers and developers. They emerge and survive best in chaos and confusion, making it notoriously challenging to track down and fix.
The difference between a professional and an amateur development team is the ability to tame such scenarios.
In this article, I’ll discuss various ways to break through the barriers and common excuses preventing the resolution of these unreproducible bugs. We'll delve into the art and science of debugging these elusive issues with tools, techniques, and a healthy dose of determination.
Why Do These Irreproducible Bugs Matter?
Irreproducible bugs haunt testers and developers alike. They are like mysterious creatures that no one wants to waste time investigating, debugging, or reproducing.
Most developers resist fixing them for two primary reasons:
- They can't replicate the failure (“it does not exist on my machine”)
- It requires too much analysis (“we are already short on time”)
- There is no helpful heuristic (a set of reliable principles or guideposts, like a checklist) to aid us in root-causing the problem. Keep reading for some suggestions!
But do these bugs matter?
Consider them the tip of the iceberg.
Irreproducible bugs are warning signs of issues hiding beneath the surface. Addressing them can prevent more significant problems down the line.
Issues that may underlie irreproducible bugs are:
- Hidden problems: Problems that are not in the conscious frame of the tester debugging the irreproducible bug
- Operating system dependencies: These include OS updates, patches, registry settings, system defaults, and the like, which are often ignored while debugging such issues
- Third-party library mismatches: Applications often rely on a collection of various third-party libraries. A version mismatch could trigger mysterious behaviors, leading to unreproducible bugs
- User configurations: These are settings specific to each user of the application. Variations in configuration settings can result in unexpected behavior
- Unknown problems or unexpected consequences: Problems arising outside the direct focus area of the application
Debugging Irreproducible Bugs: Creating A Reliable Heuristic
When faced with an irreproducible bug, don’t we all feel puzzled and confused? How do we even begin to think about tackling the problem?
However, it's essential to keep cool and follow a structured approach to get to the root cause. After a few tries, you and your team might even be able to come up with a set of principles, such as a checklist, for investigating bugs that can’t easily be reproduced. These sets of principles are also known as heuristics.
The Basics Of Elusive Bug Sleuthing
Report irreproducible failures, but do it with extra care: Even if you can't replicate a bug, report it. Careful reporting is the first step towards finding a solution. Here’s how you report any unreproducible bug:
- Mark the issue as irreproducible: Clearly label the bug as irreproducible to avoid confusion
Describe the failure precisely: Provide a detailed account of what happened. Include screen captures, screen recordings, console logs, API calls, basically anything that might be helpful
- Pro Tip: Always record your actions when doing exploratory or scripted test execution. This will enable you to add relevant evidence when you report such bugs.
- Identify variables that matter: Note any specific conditions that could be relevant. This includes factors such as platform, browser, OS version, third-party library version used, hardware devices and peripherals (if applicable). Include information like error messages, error codes, screen changes, other messages, and any relevant factors
- Describe your reproduction attempts: Explain how you tried to recreate the failure. This will acquaint the developers with the various attempts you have already made and allow them to plan their work accordingly
- Preserve application state and the steps taken to get there: Document the steps you've taken, as they might be crucial to the issue
- Look for configuration dependence: Consider whether different system configurations might be contributing to the problem. An unexpected version of an operating system, Java runtime, or browser can sometimes make a huge difference.
- Look for follow-up errors: It’s tempting to report the issue the moment you find it. However, do some follow-up work first. Experiment with different data, behaviors, options, settings, software, and hardware environments. Sometimes, an unreproducible bug can reveal itself when you vary something outside the immediate application you’re testing.
Seek help: Nothing will help if you cannot seek help. Don't hesitate to reach out for assistance from your team and beyond. Collaborate with programmers and inspect the code. Consult with experts in technical marketing, support, documentation and training, network administration, or power users such as the sales team. Ask questions like:
- How many people might encounter such a scenario
- How serious is such a failure?
- Has the customer reported similar issues in the past?
- Have we noticed similar problems in any other similar product of our organization?
Tips From Personal Experience
Having devoted almost half a decade of my career to this area, I would like to share these tips that have helped me become good at reporting and advocating for irreproducible bugs. Here are a few things from my experience to help you excel at this craft:
- Write down everything: Document every detail about the issue. Don’t assume that anything is unnecessary
- Note system state before testing: Record the state of the system before conducting tests, including the defaults and preconditions
- Check your existing bug-tracking system for similar issues: Look for patterns or similar failures from the past. You never know if someone else has already seen such a thing before. This will help you strengthen your case
- Preserve the test machine's state: Save the configuration of your test environment. In case you are using a virtual machine or container, create a duplicate image immediately
- Vary the timing for interactions: Experiment with timing to uncover hidden bugs. Timing is often the most ignored factor while testing. Vary your pace of steps through the application
- Assign resolution codes in the bug tracker: Even if you have to close down some unreproducible bugs, assign them a specific resolution code or tag for easy reference in case you find them in the future
Put Testability And Observability To Work
There is a lot that happens in the background even when a simple test or test step gets executed. Understanding the underlying conditions is crucial when dealing with irreproducible bugs.
Here is a depiction of various factors in a system before and after the test.
Leverage the testability and observability of your system to focus on the following:
- Preconditions and postconditions: Document what happened before and after the occurrence
- Program state and relevant data: Save the system's state, including data that are critical to the issue
- System state: Record the overall system state, as it might be connected to the problem
- Intended inputs: Document what your inputs were and your expected outcomes
- Configuration and system resources: Analyze the hardware and software environment
- Associated processes, clients, and servers: Check for interactions from external sources, resources, and processes
Some Helpful Tools
To aid in your bug-hunting expedition, consider using these common tools:
- Bird Eat Bugs: Capture and report bugs in real time
- Support Details: Collect system information for better troubleshooting
- Wink: Create screen captures to document unexpected behavior
- Yattie: Exploratory testing assistant. Learn more about it in my article for Ministry of Testing
- Rapid Reporter: A tool tailored for testers to report issues efficiently
- Greenshot: Capture screenshots quickly
- Win + R > dxdiag: A handy command line tool to get detailed information about your Windows system
- BareTail - Free tail for Windows: Real-time log monitoring tool
- Wireshark · Go Deep: Tool to track your network traffic.
- Licecap: Record images to capture subtle changes.
- Sysinternals - Sysinternals | Microsoft Learn: Collection of powerful micro-utilities.
- Dev Tools (F11 in the browser): Explore developer tools for web applications.
- Task Manager: Monitor system resource usage.
To Wrap Up
Irreproducible bugs are a formidable challenge for software professionals. However, with the right mindset, techniques, and tools, you can navigate this complex aspect of your work and bring these elusive creatures into the spotlight.
Do encourage your fellow testers to share and discuss their own bug investigation stories, and create collective wisdom for bug investigators within your organization and project.
Here's a quick recap of important pointers on how to deal with irreproducible bugs:
- Report them with care
- Vary parameters and settings to uncover hidden issues
- Seek help from developers, experts, and colleagues
- Leverage debugging, recording, testability, and observability tools
- Document preconditions, postconditions, and relevant data
- Preserve system states and test machine configurations
- Look for existing and similar patterns in your bug-tracking system
- Experiment with timing for interactions
- Assign specific resolution codes or tags when closing unreproducible bugs
For More Information
- Software Testing Heuristics: Mind The Gap!, Richard Bradshaw and Sarah Deery
- What would you change and/or add to the Test Heuristics Cheat Sheet?, forum post by Simon Tomes
- I'm Hunting Sasquatch: Finding Intermittent Issues Using Periodic Automation, Paul Grizzaffi