CI Flaky Test Trend API avatar

CI Flaky Test Trend API

Pricing

$1.00 / 1,000 inspected test results

Go to Apify Store
CI Flaky Test Trend API

CI Flaky Test Trend API

Analyze JUnit evidence across exact commits and environments. Separate retries, skipped outcomes and independent flaky candidates without executing tests.

Pricing

$1.00 / 1,000 inspected test results

Rating

0.0

(0)

Developer

AFK Digital

AFK Digital

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

11 days ago

Last modified

Categories

Features

Limited permissions

Share

Analyze JUnit XML reports across CI runs without connecting a repository or executing customer code. Identify mixed pass/fail evidence on the same commit and environment, inspect retry effort, and export reviewable results.

Quick start

Run with an empty input for the built-in 12-result demo (normally seconds). For your own reports supply junitFiles: [{name: "run1.xml", xml: ""}] and runsManifest: [{file: "run1.xml", run_id: "build-1", commit: "full-commit-sha", attempt: 0, environment: {platform: "linux", runtime: "3.12"}, parameters: {}}]. Alternatively provide reportsZip: {base64: "..."} with matching manifest entries for every XML member. Reports are inline file contents/base64, not URLs. No CI/repository credentials needed. Do not include access tokens in metadata.

Identity and comparisons

The test_id is a deterministic SHA-256 based ID from classname, complete test name (parameters retained), testcase properties, manifest parameters, file attribute and suite ancestry. File and suite inclusion can be disabled explicitly using testIdentityRules.includeFile/includeSuite; class/name/properties/parameters are always preserved. IDs are hashed to protect names; locate the test by applying the same identity to your source report, then use evidence_runs run_id and attempt to inspect original evidence. Ambiguous repeated identities within a report are rejected. Preserve parameter labels in JUnit names/properties or manifest parameters. Each row is one test, commit and exact environment object. environmentDimensions specifies REQUIRED keys, never discarded keys. Include platform, OS, browser, runtime, dependency and relevant config versions. Unknown commit or environment is rejected rather than pooled.

Each independent run has a unique run_id and attempt=0. Retries use the SAME run_id and explicit attempt>=1. Shards of one attempt share the run_id/attempt and have separate manifest file mappings. Retry attempts cannot inflate comparable_runs. Surefire flakyFailure/flakyError describe failures before the final passing testcase; rerunFailure/rerunError describe failures after the initial failing testcase. Both preserve their distinct duration semantics. Overlapping embedded and separate manifest retries for a test/run are rejected; choose one representation. Other vendor retry formats are unsupported; normalize those into separate manifest attempts. Missing tests do not imply pass or skip. An orphan retry cannot supply independent evidence.

Candidate statuses

  • stable_pass / stable_fail: at least minComparableRuns (default 3) non-skipped independent initial outcomes all agree, within supplied scope.
  • flaky_candidate: both passed and failed independent initial outcomes, with enough non-skipped evidence. A candidate is not causal proof of flakiness.
  • retry_instability_candidate: pass/fail variation within a retry chain; separate from independent-run proof.
  • insufficient_evidence: too few comparable non-skipped observations.
  • skipped_only: independent initial observations are all skipped.

passed_runs, failed_runs and skipped_runs count initial outcomes only. comparable_runs includes skipped observations; the evidence threshold uses non-skipped observations. Skipped is never successful. Commit changes are presented as separate rows, never evidence of same-code flakiness. This tool does not determine why a test is unstable or compare branch performance causally.

Output and trend summary

Default Dataset: JSON and CSV exports. Each row contains test_id, commit, environment_group, comparable_runs, passed_runs, failed_runs, skipped_runs, candidate_status, retry_duration, retry_results and evidence_runs. Key-value records RESULTS, RESULTS.csv and SUMMARY provide complete exports and counts by status across supplied groups. No chronological ordering is inferred from opaque run IDs or commits. The summary describes the supplied cross-run evidence and per-commit rows; supply repeated windows to monitor trends. No test history is fetched externally. retry_duration is the sum of reported retry test durations in seconds only when ALL retry durations are available; otherwise null. No retry also yields null. Initial attempt duration is excluded. This is neither CI wall-clock time nor a billing/savings estimate: parallel tests and runner overhead prevent that interpretation.

Privacy and safety

redactFailureMessages=true by default omits all failure messages and traces. Set false ONLY to expose up to 1000 characters from each failure message/body. system-out/system-err are never returned. Metadata commit/environment/run_id is customer supplied and retained; sanitize it before submission. Reports may contain sensitive data and are uploaded to Apify as Actor input subject to your Apify retention policy. No customer code or tests are executed. defusedxml rejects DTDs and external/internal entities. ZIP members are read in memory; no filesystem extraction, absolute paths, traversal, links or non-XML files. Limits: 500 files/members, 32 MiB total expanded XML, 32 MiB compressed archive, 100000 unique outcomes, 100000 total XML nodes and depth 64, soft analysis limit 120 seconds plus hard wrapper limit 150 seconds. Actor default timeout is 240 seconds. UTF-8 XML only in ZIP. Reject over-limit/invalid inputs before result-event charging.

Pricing

USD 1 per 1000 unique inspected test outcomes ($0.001 each), exactly prorated; an initial outcome and every retry outcome are counted, including skipped. Not per output row. Duplicated reports/results for the same run/attempt/test are counted once; identical reports from distinct independent run IDs remain distinct evidence. Deduplication is within one Actor run, not across separate customer invocations. The price is USD 1 per 1000 unique inspected outcomes, with no startup fee or extra Dataset item fee. Platform compute is included in the event price. Charging runs only after complete validation. The complete event budget is preflighted before charging; an insufficient budget is rejected with no test-result event charge. A rare concurrent platform limit change can still prevent complete charging; no partial analysis is published. Set an adequate maximum charge before starting. Production requires configured pay-per-event pricing and rejects a missing result event.

Development

Python 3.12+, pip install -r requirements.txt; python -m unittest discover -s tests -v. Docker runs python -m src. Version 0.1.0. Product NEWAPI94, AFK Digital.