skip to content

Result Consolidation

What a finished run leaves behind and what is done with it: the files it writes, the report built from them, and how a wall of red becomes a decision. An unread report is not a signal.

on this pageshow

explore

questions

95 · 5 sections

In the JUnit-XML result file Maven Surefire writes, how is a passing test case recorded, and which children of `<testcase>` mark a case that did not pass?

level: juniorimportance: must knowfreq 68%
basics
~10 s

A pass is written as a <testcase> element carrying no outcome child at all. Only <failure>, <error> and <skipped> mark a non-pass, so a reader concludes a case passed from their absence.

open as a page

In the JUnit-XML result file Maven Surefire writes, a re-run test case can appear with `<flakyFailure>` children, or with a `<failure>` followed by `<rerunFailure>` children. What does each of those two shapes say about how the case ended?

level: juniorimportance: must knowfreq 44%
basics
~10 s

<flakyFailure> records a failed attempt of a case that eventually passed, so the build stays green. A <failure> plus <rerunFailure> records a case that failed on every attempt, so the build goes red.

open as a page

In a JUnit-XML result file written to the Maven Surefire report schema, which attributes does a `<testcase>` element require, which are optional, and what does a reader have to work with when it needs to tell two cases apart?

level: juniorimportance: must knowfreq 56%
basics
~20 s

A <testcase> requires only @name and @time; @classname, @group and @timestamp are optional. The identity the file declares is therefore @classname plus @name - and a writer may legally omit the @classname half of that pair.

open as a page

JUnit 5's `LegacyXmlReportGeneratingListener` writes a `@hostname` attribute on `<testsuite>` that the Maven Surefire report schema never declares. Why does that not break the tools reading the file, and what else differs between the two writers?

level: middleimportance: must knowfreq 52%
basics
~20 s

Nothing validates these files. JUnit 5's legacy writer emits hostname unconditionally, falling back to the literal <unknown host>; the Surefire schema declares no such attribute, so the file fails that schema and readers, which never validate, consume it anyway.

open as a page

The Maven Surefire report schema `surefire-test-report.xsd` declares `<testsuite>` as its only root element, yet many JUnit-XML result files use a `<testsuites>` root holding several suites. What is going on, and what must a reader of these files do about it?

level: middleimportance: must knowfreq 60%
basics
~20 s

No single official schema governs this format. The only published one, surefire-test-report.xsd, has a single root, testsuite, and declares no testsuites wrapper; other writers emit that wrapper anyway, so readers dispatch on whichever root they find.

open as a page

In an Allure results directory, what does a `-container.json` file hold, and how does it relate to the `-result.json` files beside it?

level: juniorimportance: must knowfreq 62%
basics
~10 s

A -container.json file holds Allure's TestResultContainer: setup in befores, teardown in afters, and a children list naming by uuid the results it wraps. The test bodies themselves live in separate -result.json files.

open as a page

In an Allure results directory, where do the bytes of an attached screenshot or log actually live, and what does the matching `Attachment` entry inside a `-result.json` file hold?

level: juniorimportance: must knowfreq 62%
basics
~20 s

The bytes live in a file of their own in the results directory, named with a random UUID, the suffix -attachment, and the file's extension. The JSON entry beside the test holds only a pointer: name, source and type.

open as a page

In an Allure run, what is the difference between `allure.properties` on the test code's classpath and an `environment.properties` file in the results directory?

level: juniorimportance: must knowfreq 58%
basics
~20 s

allure.properties is a classpath resource the test run reads to configure Allure's writer. environment.properties is a file dropped into the results directory that only the report generator reads, to display name and value rows about the run.

open as a page

Allure stores fixtures in a container rather than in the test result, so how does the generated report end up showing setup and teardown on an individual test case's page?

level: middleimportance: must knowfreq 55%
basics
~20 s

The reader joins on uuid. Every container's befores and afters are folded onto each child uuid it names, so the report's test result gains beforeStages, testStage and afterStages built from those fixtures plus the case's own steps.

open as a page

On a test result in an Allure 2 report, what do the `retriesCount` and `retriesStatusChange` fields say, and what does `retriesCount` deliberately not include?

level: juniorimportance: must knowfreq 50%
basics
~20 s

retriesCount is how many earlier attempts were folded into this result, so it excludes the attempt on screen; a test executed twice reads one. retriesStatusChange is true when any earlier attempt ended in a different status.

open as a page

An Allure 2 report is regenerated on every CI build, yet its trend chart always shows a single point and each test case page shows only the current run. What is missing, and where does Allure 2 get trend data from?

level: juniorimportance: must knowfreq 58%
basics
~20 s

The previous report's history directory is missing. Allure 2 keeps no database: it builds trends only from a history folder already present in the results directory it reads, so you copy that folder in from the last report before generating.

open as a page

In Allure's result model, `io.qameta.allure.model.Status` has exactly four values and none of them is flaky, so where does a result's flaky mark actually live and what writes it?

level: juniorimportance: must knowfreq 68%
basics
~10 s

Flakiness is a boolean on StatusDetails, set with setFlaky(...), not a status value. The result keeps one of Status's four values - FAILED, BROKEN, PASSED or SKIPPED - and the flag rides alongside it.

open as a page

In an Allure `-result.json` file, a test result carries both a `historyId` and a `testCaseId`. What does each of those keys identify, and what goes wrong if a tool treats them as interchangeable?

level: juniorimportance: must knowfreq 58%
basics
~20 s

testCaseId identifies the logical test case - one value for a method however many rows it runs. historyId identifies one trend series: that case plus the parameter values it ran with. Two rows share testCaseId but not historyId.

open as a page

In an Allure 2 report, a results directory holds several `-result.json` files for the same test from one run. How does `RetryPlugin` group them, and which attempt does the generated report show?

level: middleimportance: must knowfreq 58%
basics
~20 s

RetryPlugin buckets every parsed result by the retry hash it derives, keeps the attempt with the newest start time as the visible one, hides the rest, and hangs them off the survivor as a retries block.

open as a page

In ReportPortal, a launch's generated error clusters are returned as `ClusterInfoResource` objects. What do the `index`, `message`, `matchedTests` and `launchId` fields on one of them tell you?

level: juniorimportance: must knowfreq 58%
basics
~20 s

message is the shared failure text the group formed around, matchedTests counts the test items in it, index is the identifier the analyzer gave the group, and launchId scopes the cluster to a single launch.

open as a page

In ReportPortal, a failure's issue can carry a set of `externalSystemIssues`. What does a single `ExternalSystemIssue` entry hold, and what does attaching one change about that failure?

level: juniorimportance: must knowfreq 62%
basics
~10 s

One externalSystemIssues entry records where a tracker item lives: ticketId, btsUrl, btsProject, a direct url, plus submitDate and pluginName. It carries no ticket status. Attaching one labels the failure without changing its defect type.

open as a page

In ReportPortal, every failed test item's issue carries a defect group from `TestItemIssueGroup`. What does `TO_INVESTIGATE` mean beside `PRODUCT_BUG`, `AUTOMATION_BUG`, `SYSTEM_ISSUE` and `NO_DEFECT`, and which group does a brand-new failure land in?

level: juniorimportance: must knowfreq 66%
basics
~10 s

TO_INVESTIGATE is ReportPortal's undecided defect group, and every new failure is filed there automatically. PRODUCT_BUG, AUTOMATION_BUG, SYSTEM_ISSUE and NO_DEFECT each record a decision already taken, by a person or by the auto-analyzer.

open as a page

In an Allure results directory, what is `categories.json`, and what does one `Category` entry in it hold?

level: juniorimportance: must knowfreq 60%
basics
~20 s

categories.json is a rule file placed in the Allure results directory. Each entry names one bucket and lists the conditions a result must meet to land in it: a message pattern, a trace pattern, matched statuses and a flaky flag.

open as a page

ReportPortal's `CreateClustersRQ` carries only `launchId` and `removeNumbers`. What does `removeNumbers` change about the clusters you get back, and how does each setting fail?

level: middleimportance: must knowfreq 52%
basics
~10 s

removeNumbers strips digits from failure messages before they are compared. Left off, ids and counts split one problem into many clusters; turned on, failures whose only difference was a numeric code merge into one.

open as a page

A CI job consolidates several suites into one Allure report and then has to decide whether the build passes. What is a report-level quality gate, and where in Allure is that verdict computed?

level: juniorimportance: must knowfreq 58%
basics
~20 s

A report-level quality gate is a threshold checked against the whole aggregated report, not against one runner's outcome. Allure computes it in the 3.x line only, through its quality-gate command, which exits non-zero when a rule is breached.

open as a page

In a CI job that runs an Allure-instrumented suite, what does the `allure.results.directory` property control, and why must the step that uploads the run point at the same directory?

level: juniorimportance: must knowfreq 60%
basics
~20 s

allure.results.directory names the local folder the Allure adaptor writes its per-test result files into during the run; it defaults to allure-results. The upload step is a plain directory copy, so if it reads a different path it pushes nothing.

open as a page

In Allure, what does `allure generate` produce from a results directory, and why does the generated `index.html` show nothing when you open it straight from the file system?

level: juniorimportance: must knowfreq 74%
basics
~20 s

allure generate turns a results directory into a static report directory, by default allure-report, whose entry point is index.html. That page loads its data over HTTP, so opened as a local file it renders empty; serve the directory instead.

open as a page

In a report generated by Allure 2, the overview page's panels are not computed in the browser from the raw results. Where does the generator put each panel's numbers, and what does `widgets/summary.json` hold?

level: juniorimportance: must knowfreq 62%
basics
~20 s

Allure 2 writes one JSON file per panel into the generated report's widgets directory at generate time. The file widgets/summary.json holds the report name, a five-status statistic with a derived total, and a time block for the run.

open as a page

Allure 2's `widgets/summary.json` reports a run's time as both a `duration` and a `sumDuration`. What is each one computed from, and which of the two does the report's duration-trend tile plot?

level: middleimportance: must knowfreq 54%
basics
~20 s

In Allure 2, duration is the run's wall-clock span, the latest stop minus the earliest start. sumDuration adds up each counted result's own duration. The duration-trend tile plots the wall-clock span, not the summed test time.

open as a page