DEV Community

Cover image for TestFly Part 8: Flakiness Quarantine Engine & Java SPI Extensibility
Hakan GÜL
Hakan GÜL

Posted on Originally published at hakangul.lovable.app

TestFly Part 8: Flakiness Quarantine Engine & Java SPI Extensibility

Quarantine Engine & Java SPI Extensibility

The final pillar of TestFly is designed for long-term maintainability: Flakiness Quarantine and Java SPI Extensibility.


1. Flakiness Quarantine Engine (testfly-quarantine.yml)

Instead of deleting or commenting out flaky tests, quarantine them cleanly without blocking CI pipelines:

# testfly-quarantine.yml (Project Root)
quarantine:
  enabled: true
  tests:
    - className: io.testfly.examples.PaymentTest
      methodName: testStripeWebhook
      reason: "Waiting for third-party webhook fix (JIRA-4021)"
      owner: "@payment-team"
Enter fullscreen mode Exit fullscreen mode

Quarantined tests are executed in CI, but their failures are flagged as QUARANTINED rather than failing the build.


2. Java SPI Extension Points

Extend TestFly without forking or modifying framework internals:

Extension Point Interface Registration
Custom Driver Provider NamedDriverProvider DriverProviderRegistry.register() or META-INF/services
Report Adapter ReportAdapter ReportAdapterRegistry.register() or SPI
Lifecycle Hook ExecutionHook HookRegistry.register() or SPI
Full Plugin TestFlyPlugin PluginRegistry.register() or SPI

Example: Custom Slack Report Adapter

package io.testfly.examples.plugins;

import io.testfly.reporting.ReportAdapter;
import io.testfly.metrics.ExecutionMetrics;

public class SlackReportAdapter implements ReportAdapter {

    @Override
    public String getName() {
        return "slack";
    }

    @Override
    public void onSuiteFinish(ExecutionMetrics metrics) {
        // Send Slack webhook with pass rate and failed test summaries
    }
}
Enter fullscreen mode Exit fullscreen mode

Summary of the TestFly Masterclass

Across all 8 parts, we explored:

  1. Part 1: Zero-boilerplate setup with BaseTest and testfly.yml
  2. Part 2: Semantic locators (getByRole), BasePage, and WaitEngine
  3. Part 3: CI/CD quality gates (BuildThresholdEnforcer) and parallel execution
  4. Part 4: AI test generation and self-healing with testfly-mcp
  5. Part 5: BDD with Cucumber 7, BaseCucumberSteps, and @retryable
  6. Part 6: Built-in ApiClient, BaseApiTest, and hybrid workflows
  7. Part 7: Bundled axe-core accessibility (accessibility()) and VisualAssert
  8. Part 8: Flakiness quarantine engine and Java SPI extensibility

👉 Explore TestFly on GitHub and build reliable test suites today!

Top comments (0)