Skip to content

Releas v3.0.0 TestRail Integration

Latest

Choose a tag to compare

@bshakhov-testlum bshakhov-testlum released this 22 Oct 12:35
· 1 commit to main since this release

Release Notes

Changes since v2.0.0.

New Features

TestRail integration

Testlum can now send scenario results to TestRail when a test run finishes.

  • New <testRailReports> section in the global config (<report> → <extentReports>):
    <testRailReports enabled="true" addScreenshotForFailure="true">
        <username>your_email@example.com</username>
        <apiKey>${TESTRAIL_API_KEY}</apiKey>
        <url>https://yourdomain.testrail.io/</url>
        <projectId>1</projectId>
        <caseMatchKey>custom_automation_id</caseMatchKey>             <!-- optional -->
        <defaultRunName>Auto Test Run</defaultRunName>                 <!-- optional -->
        <defaultRunDescription>Run generated automatically</defaultRunDescription> <!-- optional -->
    </testRailReports>
  • New <testRail> element in the scenario <overview>:
    <testRail enabled="true" testCaseId="91,94" testRailRunId="1"/>
    • testCaseId: a single case ID or a comma-separated list. The result is reported once per case, and duplicate IDs are reported only once.
    • caseMatchKeyValue: another way to find a case. Testlum looks the case up by the value of the TestRail field named in caseMatchKey. Set exactly one of testCaseId / caseMatchKeyValue; scenario validation fails if both or neither are set.
    • testRailRunId (optional): reports to an existing run. If it is not set, Testlum creates a new run in projectId using defaultRunName / defaultRunDescription.
  • When addScreenshotForFailure="true", screenshots of failed steps are uploaded to the TestRail result as attachments.
  • At the end of the run, the console shows two summary tables: cases that reached TestRail, and cases that did not, with the reason for each.
  • A TestRail reporting error is logged but never fails the run.
  • testRailReports now counts as a report generator, so a config where only TestRail is enabled passes the "at least one report generator" check.
  • Full documentation: engine/src/main/java/com/testlum/testing/framework/report/testrail/README.md.

Environment variables in configuration

  • ${ENV_VAR} placeholders are now resolved from system environment variables in:
    • the global config, including the config used to evaluate integration conditions;
    • the scenario <testRail> element;
    • credential files used by Basic, JWT and Custom auth.
  • The XSD now accepts ${...} placeholders for URLs (url, urlWebsocket and the extended URL type), browserWindowSize, integration/device/browser alias (new configAlias type), the TestRail projectId, testCaseId and testRailRunId.

Screenshot on "element not found"

  • If a UI command cannot find an element (after auto-healing has also failed), a screenshot is taken and attached to the step result, provided screenshots are enabled.
  • assert attribute now handles lookup and comparison errors as a step failure and attaches a screenshot.

Bug Fixes

  • SMTP: implicit SSL is now enabled automatically for port 465 (mail.smtp.ssl.enable).
  • SMTP: the misspelled mail.smtp.connectiontimout property was corrected to mail.smtp.connectiontimeout, so the connection timeout now actually applies.
  • UI – select options: the visibility check for <option> / <optgroup> elements now checks the parent <select> instead of the option itself, because options inside a closed dropdown are usually not visible. This fixes assert checked and other commands on select options.
  • Step numbering: include commands no longer count as a separate step, so step numbers in reports and screenshot names are no longer shifted (this applies to scenarios, repeat blocks and included scenarios).
  • Reports: a missing htmlReportGenerator no longer causes a NullPointerException in report validation and configuration.

Improvements & Refactoring

  • New ScreenshotUtil component: screenshot logic was moved out of UiUtil, and all web/mobile/native executors now use it.
  • New shared RestTemplate bean with timeouts (connect 5 s, read 10 s). CustomAuth now uses it instead of creating a new RestTemplate with no timeouts for every call.
  • WebElementFinder.find(...) / UiUtil.findWebElement(...) now take a CommandResult parameter so a screenshot can be attached when the lookup fails.
  • SMTP configuration: removed a redundant null check for the port.

Docker & CI/CD

  • The Docker image publishing workflow (docker-image.yml) was rewritten:
    • manual trigger with inputs for the image tag (defaults to the pom version), overwrite (allow re-publishing an existing tag) and push_latest (move :latest);
    • Linux image built for linux/amd64 and linux/arm64, plus a Windows image (windows-2025);
    • both platforms package the same built JAR;
    • OCI labels added so GHCR links the package to the repository;
    • a publish summary is added to the job output.
  • Dockerfile:
    • the APP_VERSION build arg was removed, and the JAR is picked up by wildcard (testlum-*.jar);
    • the runtime image is now eclipse-temurin:17-jre-jammy (was JDK);
    • the build stage runs on $BUILDPLATFORM.
  • Dockerfile.windows: now based on eclipse-temurin:17-jre-nanoserver-ltsc2025 and copies a pre-built build-artifacts/testlum.jar. The APP_VERSION arg was removed.
  • New .dockerignore (excludes target/, .git, .github, IDE files, *.md).
  • build.yml: the Maven build now runs unit tests (-DskipTests removed).
  • run-tests.yml: the Docker build no longer passes APP_VERSION.

Documentation

  • README: updated run instructions (-c/--config, -p/--path, optional -s/--scenarios), Docker build without APP_VERSION, and steps to build the Windows image.
  • New TestRail integration guide (see above).

Breaking / Migration Notes

  • Docker build: --build-arg APP_VERSION=... is no longer used. Build with docker build -t testlum:<tag> ..
  • Windows image: build the JAR first and copy it to build-artifacts/testlum.jar before running docker build -f Dockerfile.windows ....
  • Docker runtime image is now a JRE, not a JDK. JDK tools (e.g. javac, jcmd) are no longer available inside the container.
  • ${...} in config and credential files is now resolved from environment variables. If a referenced variable is not set, Testlum fails with an error. Make sure every ${VAR} used in the global config or in auth credential files is defined in the environment.
  • API change for extensions: UiUtil.takeScreenshotAndSaveIfRequired / putScreenshotToResult moved to ScreenshotUtil, and WebElementFinder.find / UiUtil.findWebElement take an extra CommandResult argument.

Tests

  • New unit tests for TestRail (service, case-ID resolver, case-list deserializer, summary logger, URL formatter), SMTP configuration, ScreenshotUtil, ElementCheck (select options), ResultUtil (include numbering), BasicAuth / JwtAuth env injection, ScenarioCollector, and TestResourceInfrastructureInitializer.
  • Existing UI executor tests updated for the new ScreenshotUtil and CommandResult parameters.

Full Changelog: v2.0.0...v3.0.0