AvrelDocs

Test results

Import the result files your test runners already write, so they count in the release decision. Each file is kept as a test run for the build it tested, and it counts in two places:

  • the release gate: check HIL-TESTS-01 blocks a build while the latest imported run of any suite for that build has a failed or errored case;
  • the verification matrix: each requirement the run covers gets one piece of test evidence, with the build, the unit tested and the measurements with their limits.

Formats#

FormatWritten by
JUnit XMLpytest (--junitxml), CTest, Robot Framework (--xunit), Jenkins and GitLab test reports, and most hardware-in-the-loop rigs and test runners that export JUnit.
NI TestStand XML reportTestStand's XML report option. Every step with a pass, fail, error or skipped result is a case. Action steps (Done) and sequence calls are left out; the steps inside a sequence call are kept. Numeric limit and multiple numeric limit steps keep their value, limits and units.
ATML test resultsTestStand and other tools writing IEEE 1636.1 test results. Each test with an outcome is a case, with its measured values and limits.

Avrel tells the format from the file. Files are up to 6 MB; split larger ones by suite. XML with a DOCTYPE or entities is refused; a <!DOCTYPE inside CDATA or a comment (HTML captured in test output) is fine. A time with no time zone is read as UTC.

If your HIL tool writes another format, export JUnit XML from it, or record results directly with record_test_result (see AI assistants).

Import in the app#

On Release gate, select Import results under Test results, choose the file and the build it tested. You can name the run (by default, the suite name in the file) and the unit tested, when the file does not say. Select a run to see every case, its failure message and measurements, and the evidence it added.

Import from CI#

python3 avrel_ci.py test-results report.xml --release v1.4.2 --sha "$GIT_SHA"

Run it after your tests, before gate, so the gate sees the results. See Release checks in CI. With a Propose key the evidence waits for a member to accept it; with an Operate key it counts at once.

The release gate#

HIL-TESTS-01 Imported test results pass for this build looks at the release now recorded, or at a candidate when CI checks one with its sha. It takes the latest import of each suite (by run name) on each unit for that build:

ResultWhen
Fail (blocks the release)Any of those runs has a failed or errored case, or a case with no pass, fail, error or skipped result.
PassThey all passed. Skipped cases do not count either way.
SkippedNo results are imported for the build, or every case was skipped. It is never passed without results.

To clear a failure, fix what the failing cases found, run the suite again on the same build and import the new results under the same run name. Earlier imports stay on record.

Give each import the build it tested with --sha (or --release). A run without a build is kept, but the gate cannot use it.

Requirements a case covers#

A case covers a requirement when:

  1. the file says so: a JUnit <property> on the case (or its suite) named requirement, requirements, req, verifies or covers, with one or more refs separated by commas or spaces; or a TestStand step's requirement links, when the report includes them; or
  2. the case names no requirement and its name or class contains the requirement's ref as a whole word. Case and -, _ and . are not told apart, so test_pwr_001_bus_voltage covers PWR-001. Turn this off with match_names: false.
<testcase classname="power.rails" name="test_brownout_recovery" time="4.0">
  <properties><property name="requirement" value="PWR-002"/></properties>
  <failure message="rail recovered in 410 ms, limit 250 ms"/>
</testcase>

For each requirement (and each unit tested), Avrel adds one piece of test evidence: fail if any covering case failed or errored, pass if they passed, inconclusive if all were skipped. A pass with a measurement outside the limits the file gives is recorded as inconclusive, with a note. The evidence's build is the sha (or release), so it appears on the release it tested. Refs the file names but the matrix does not have are listed in the reply as not recorded.

The unit tested comes from TestStand's UUT serial number, ATML's UUT serial number, or a JUnit property named serial, item, uut or dut.

Everything is recorded#

A run is never edited or deleted. Importing the same file for the same build again adds nothing. Each import is in the audit log with who did it, the format, the build, the counts and the file's SHA-256 hash, not its content.