Skip to main content

Auto-healing broken tests

Some heuristics to implement an auto-healing mechanism for broken tests.

Status: Planned4 comments

Log in to comment and vote

Comments4

  • Brian Batt

    •

    Jan 3, 2025

    I would love to see this feature implemented in bugbug. We have a lot of tests and the maintenance for the tests is growing by the week. I’ve been researching other tools and

    stably.ai offers this feature. They call it “auto maintenance”

    • Paweł Bylina

      Team•

      Jan 6, 2025

      @Brian Batt

      Have you tried stably.ai? Many tools have "great" marketing, but the value they offer is rather low.

      Self-healing is a challenging thing. Theoretically, if your application has changed in a big way, it should fail the test. That's the expected behaviour.

      If you use proper selectors and for example data-testid attribute for your elements, tests will be stable, otherwise you will have to fix them all the time. The basic recommendation is to add data-testid in your application to let BugBug capture better selectors (this is a basic test automation recommendation, not tool related).

      We have some plans here, but in general we recommend preparing your app for test automation first, and not expecting test automation to automatically fix this gap, if you know what I mean.

  • Marius COJOCARIU

    •

    Jun 19, 2024

    This sounds very interesting, @Paweł Bylina could you put this in more simple terms what benefits this would bring?

    Are there already solutions out there that "auto-heal" broken tests? And what would this imply? For example, if a step fails, BugBug would be capable of knowing and suggesting to replace "current selector" with an "updated selector" it detected?

    • Paweł Bylina

      Team•

      Jun 24, 2024

      @Marius COJOCARIU

      We can implement a lot of different mechanisms here. I'm sure some of our competitors have auto-healing, but I'm not sure which ones.

      In general, when BugBug detects that the element doesn't exist, it could try to find an alternative element. If the probability is more than 90% that the found item is the correct one, BugBug could fix the selector automatically and continue execution.