Skip to main content

Load Testing Reporting & Dashboards

TestFly automatically collects, correlates, and presents performance metrics across all supported reporting backends: the built-in HTML Report, Allure, and ReportPortal.


1. TestFly HTML Report Dashboard​

When load tests run, the HTML report (target/testfly-report.html) automatically displays a dedicated ⚡ Load Testing & Performance Analysis tab.

Visual Components:​

  • KPI Summary Header: Global requests, aggregate throughput (req/s), overall P95 latency, and system error rate.
  • Interactive Charts (Chart.js):
    • Latency Distribution Bar Chart: Min, Mean, P50, P90, P95, P99, and Max response times. P75 and P90 also appear as tiles on each scenario card. Both engines measure every percentile; a value that was not measured (for example a latency in a run where no request received a response) is shown as n/a, never as 0.
    • Status Code Breakdown Doughnut Chart: One slice per recorded HTTP status code. Requests without a response appear under the -1 key, labelled "No response". If status codes were not measured, the chart shows "Status codes not measured" instead of any slice.
  • Scenario Cards: Shows virtual users (the configured users value, or a workload's planned users; not measured peak concurrency), duration, total requests, throughput, and error rates. A simulation adds one card per scenario and one <simulation> (global) card, labelled Aggregate; the summary KPIs count only the scenario cards.
    • Card status: FAILED when the run had KO requests, any SLA rule failed, or a metric regressed in an assertNoRegression(..) against a baseline. WARN when the run is partial (it also shows a PARTIAL badge; on a partial run every SLA rule fails, so it is usually FAILED) or when a metric regressed in a regressionResults(..) comparison, which does not assert. Otherwise PASSED. A FAILED or WARN badge lists its reasons, for example FAILED (2 SLA, 1 regressed) or WARN (1 regressed). A run whose queue or shuffle feeder ran out shows a FEEDER EXHAUSTED badge (its tooltip says no new iterations were started): a card that would be PASSED becomes WARN (feeder exhausted), a WARN card lists feeder exhausted among its reasons, and a FAILED card is unchanged.
    • SLA table: one row per SLA rule with Scope, Metric, Comparison, Threshold, Actual (n/a when the metric was not measured), Result (PASS or FAIL) and Reason.
    • Regression table: shown when the test compared the run with a baseline (see Regression results). A line names the baseline (scenario, engine, creation time), followed by one row per metric with Metric, Baseline, Actual, Limit, Result (REGRESSED, OK or NOT COMPARED) and Reason. Values that were not measured are n/a.
    • "vs previous run" line: compares P95, throughput and error rate with the most recent earlier run of the same scenario, without a baseline (see Comparison with the previous run).
  • SLA summary: the summary shows how many scenarios have a failed SLA. Aggregate ((global)) entries are not counted, so a failed simulation-level SLA shows only on the Aggregate card (status FAILED).
  • Step Breakdown Table: Detailed request count, successful/failed count, P95 and P99 latency, and error rate per scenario step. A step inside a group is listed under its key, for example Checkout / Pay. A step that never ran (an untaken doIf branch, a randomSwitch branch that was never drawn, a step skipped in a tryMax) is listed with 0 requests, n/a for P95 and P99, and a 0.0% error rate.
  • Direct Gatling Report Link: Clickable button (📊 Open Gatling Report →) opening the full native Gatling report.

Standalone Load Report​

If loadtest.reportEnabled: true is configured, TestFly also generates a focused target/loadtest-report.html highlighting only performance tests.


2. Allure Report Integration​

TestFly automatically enriches Allure 2 JSON outputs in target/allure-results/:

  • Parameters: Adds Load Engine, Virtual Users, Total Requests, Throughput, P95 Latency, and Error Rate.
  • Links: Direct custom report link pointing to the native Gatling HTML report (📊 Gatling Interactive Report).
  • Attachments:
    • ⚡ Load Test Summary (text/markdown): Full Markdown table of percentiles and step breakdowns. Unmeasured P75/P90 values, and the P95 of a step that never ran, are shown as n/a. It also has Partial and Feeder exhausted lines (yes or no), an SLA table when the run has SLA rules, and a Regression section when the run was compared with a baseline.
    • 📋 Gatling Subprocess Log (text/plain): Complete stdout/stderr logs from the Gatling execution run.

Generate and view your Allure report:

allure serve target/allure-results

3. ReportPortal Integration​

When connected to ReportPortal, TestFly emits load testing data while the test item is active:

  • Markdown Summary: Formatted table of virtual users, throughput RPS, latency percentiles, error rate and steps (a step that never ran shows P95 n/a) logged at INFO level, with Partial and Feeder exhausted lines (yes or no), an SLA table when the run has SLA rules, and a Regression section when the run was compared with a baseline.
  • Subprocess Log Attachment: Attaches gatling-subprocess.log as a binary artifact to the ReportPortal item.
  • Failures: If assertions fail (e.g. assertP95Below), the stack trace and full metrics snapshot are attached automatically.

4. Subprocess & CI Logging​

To ensure clean CI outputs without console clutter:

  • Gatling's high-frequency terminal redraw output is redirected to target/loadtest/<run-id>/gatling-subprocess.log by default (loadtest.resultsDir controls the parent directory).
  • High-level progress is logged to standard output:
    [LoadTest] [<run-dir>] Starting Gatling engine: <scenario> (<users> users, rampUp=..., hold=...)
    [LoadTest] [<run-dir>] Gatling execution complete. Parsing results...
    [LoadTest] Gatling results parsed from: target/loadtest/...
    <run-dir> is the name of the run's directory, such as Checkout-1767225600000, so the lines of parallel runs can be told apart. The Gatling native assertions failed line carries the same prefix; logger lines such as Gatling results parsed from do not.
  • TestFly's metrics file testfly-metrics.json and the result file testfly-loadtest-result.json are written to the same run directory (see section 5).
  • If the Gatling process exits with a non-zero code, the run fails with an exception that contains the root error lines of the subprocess log (such as the exception message) followed by its last 20 lines, with credentials masked as ***. Raw log lines are no longer printed to System.err. Two exceptions: exit code 2 when an SLA was registered as native assertions, and a run in which no request could be sent (all requests KO with status -1). See Gatling Run Lifecycle.

5. Run Directory and Result Files​

Every run creates its own directory, <resultsDir>/<name>-<millis>/ (by default target/loadtest/<run-id>/), where <name> is the scenario or simulation name with every character other than letters, digits, _ and - replaced by _. JDK runs get one too.

FileEngineContent
testfly-metrics.jsonGatlingTestFly's own metrics, recorded inside the Gatling run: per request name the attempts, OK and KO counts, status codes and a millisecond latency histogram. Every declared step has an entry, also one that never ran (attempts 0). LoadTestMetrics is built from this file only.
testfly-loadtest-result.jsonBothThe run's key metrics in the baseline format. In a simulation with more than one scenario it holds the global metrics.
testfly-loadtest-result-<scenario>.jsonGatling (simulation with several scenarios)One result file per scenario. If two scenario names give the same file name, the later one gets -2, -3, … and a WARN is logged.
gatling-subprocess.log and Gatling's HTML reportGatlingThe child JVM's output and Gatling's own report. The log contains a line with the child's effective resources, [TestFly] Gatling child JVM: maxMemory=<bytes> availableProcessors=<n> (see Gatling child JVM).
.testfly-runBothAn empty marker that identifies a run directory created by TestFly 1.1.0 or later. Run retention only deletes directories that have it or a TestFly file. A run in progress keeps it locked.

The result file is written on a best-effort basis: a write failure logs a WARN and never fails the run, and a partial run writes none. To use a run as a baseline, copy its testfly-loadtest-result.json into your repository.

Disk usage

By default TestFly keeps every run directory. Each run adds one small directory (a JDK run only its result file; a Gatling run also the Gatling report and log), so resultsDir grows with every run. Set loadtest.retention to delete old run directories after each run, clean resultsDir in CI, or keep it under target/ so that mvn clean removes it.

The suite-level target/testfly-metrics.json, which feeds the HTML report, is a different file with the same name. Its load-test entries also carry partial, aggregate (true for a simulation's global entry) and sla: one entry per SLA rule with scope, metric, comparison, threshold, actual, passed and reason. The HTML dashboard shows these fields on the scenario cards (see section 1); in code, read SLA results with slaResults(). An entry compared with a baseline also carries regression (see Regression results).

These entries also carry feederExhausted: true when a queue or shuffle feeder ran out (LoadTestMetrics.feederExhausted()). The HTML card, Allure and ReportPortal show it as described above; to fail the test on it, use assertFeederNotExhausted(). A run whose feeder ran out is not partial, so it still writes testfly-loadtest-result.json, in the same format and without this flag. LoadBaseline.of(..) accepts such metrics but logs a WARN that the run stopped early, so its figures may not represent the full load.

Regression results​

When a test calls regressionResults(baseline, tolerance) or assertNoRegression(baseline, tolerance) on a run's LoadTestAssert, the comparison is recorded for that run and appears in the reports:

  • the HTML report card gets a Regression table. When a metric regressed, the card is FAILED after assertNoRegression(..) and WARN after regressionResults(..); the badge says N regressed;
  • the Allure ⚡ Load Test Summary and the ReportPortal Markdown summary get a Regression section with the baseline line and the same table;
  • the run's entry in the suite testfly-metrics.json gets a regression block.
"regression" : {
"baselineScenario" : "Checkout",
"baselineEngine" : "gatling",
"baselineCreatedAt" : "2026-10-25T10:15:30Z",
"tolerancePercent" : 15.0,
"errorRateDelta" : 0.005,
"asserted" : true,
"results" : [
{ "metric" : "p95", "baseline" : 100.0, "actual" : 120.0, "limit" : 115.0, "regressed" : true, "reason" : "120 is above the limit 115" },
{ "metric" : "p99", "baseline" : null, "actual" : 180.0, "limit" : null, "regressed" : false, "reason" : "not compared: not measured" }
]
}
  • results holds one row per metric in the order p95, p99, mean, errorRate, throughput. baseline and actual are null when not measured; limit is the exact limit of the comparison, and null on a row that was not compared. reason is null for a metric within tolerance.
  • asserted is true when the comparison came from assertNoRegression(..) and false when it came from regressionResults(..).
  • Result REGRESSED means regressed is true; NOT COMPARED means the reason is not compared: not measured; any other row is OK.
  • If a run is compared more than once, the latest comparison is shown. A run that is never compared has no regression block and no Regression table.
  • assertNoRegression on partial metrics fails before comparing, so nothing is recorded.
  • Recording never changes the outcome of the assertion: if it fails, a WARN is logged and the assertion runs as usual.

Comparison with the previous run​

Without any baseline, each scenario card in the HTML report shows a line such as:

vs previous run (2026-10-30T14:05:12.345): P95 100 → 120 ms (+20.0%) · Throughput 40 → 38 rps (−5.0%) · Error rate 0.00% → 1.00%
  • Source. Every time the suite metrics are exported (ExecutionMetrics.exportToJson), TestFly writes testfly-metrics.json and a timestamped copy in metrics-history/ under the reports directory (target by default, or testfly.reports.dir). The copy is named testfly-metrics-yyyyMMdd-HHmmss-SSS.json; if that name is taken, a -1, -2, … suffix is added, so exports never overwrite each other. Files with the older testfly-metrics-yyyyMMdd-HHmmss.json name are still read.
  • Retention. After each export TestFly keeps the newest flakiness.historyRuns copies (default 10; 30 when the configuration is not loaded) and deletes the older ones. "Newest" is decided by the timestamp in the file name, the same order the report uses.
  • Run identity. Every exported load-test entry carries a runId, one per JVM. Entries carried over in merge mode (reporting.mergeRuns or -Dtestfly.merge=true) keep their own runId.
  • Which run. The report reads the history files newest first and uses the first non-aggregate entry with the same scenario name that belongs to an earlier run:
    • entries with the same runId are the same run and are skipped, so several exports or suites in one build, or merge mode, never compare a run with itself;
    • an older history entry without a runId is used unless it is identical to an entry of the current report;
    • files that cannot be read, are not valid JSON or have no loadTests list are skipped.
  • Time. The time in brackets is the timestamp of the oldest history file that contains the previous run.
  • Values. P95 and throughput show the previous and current value with the relative change; the error rate is shown in percent. The change is marked + for an increase and − for a decrease, and has no sign when unchanged. It is left out when the previous value is 0; a side that was not measured shows n/a.
  • The line is informational: it does not change the card status. Aggregate ((global)) cards and scenarios with no earlier run have no line.

Percentiles: TestFly vs. Gatling's report​

On Gatling, TestFly computes p50, p75, p90, p95 and p99 exactly from its millisecond histogram, with linear interpolation (the method the JDK engine uses), over requests that received a response. Gatling's HTML report estimates percentiles with a t-digest, so its values can differ from TestFly's, most visibly for high percentiles on small samples. Request totals can differ too: TestFly counts a request that could not be built as KO, while Gatling's report leaves it out. TestFly's figures are the ones used by assertions, SLAs, baselines and TestFly's reports. When TestFly's SLA verdict and Gatling's native assertions disagree on the same rules, a WARN names both.