Test Management (JTM)

Repository: github.com/0if0/JTM

CI

Lightweight test management inside Jenkins: test cases, suites, test runs, quality gates, pipeline steps, HTML/PDF exports, and optional JUnit import. Data lives under $JENKINS_HOME/jtm/.

Features

  • Web UI at /jtm/ — dashboard, test cases, test runs, per-run detail and matrix
  • Pipeline steps — publishJTMResults, enforceQualityGate, updateTestCase
  • Imports — CSV / structured text, JUnit XML (post-build recorder)
  • Reports — single-run and multi-run flat export (HTML + PDF) with optional branding
  • Permissions — View / Execute / Edit / Admin (matrix-friendly)
  • REST-style API for automation (see plugin UI and JtmApiAction)

Screenshots

Dashboard — project scope, quality overview KPIs, and insights.

JTM dashboard — quality overview

Charts and recent activity — status mix, failure trend over time, recent test runs, and run progress.

JTM dashboard — status mix, trends, and runs

Run progress — pick a run, see outcome counts and pass-rate donut for that build.

JTM run progress panel

Requirements

  • Jenkins 2.541.3 or compatible (see pom.xml)
  • Java 17+ for building the plugin

Quick start

Build the plugin

mvn clean verify
# HPI: target/jtm.hpi

Run Jenkins locally with the plugin

mvn hpi:run
# Open http://localhost:8080/jtm/

Install on a real controller

  1. Build target/jtm.hpi
  2. Manage Jenkins → Plugins → Advanced → upload the HPI → restart if prompted
  3. Grant JTM permissions under Manage Jenkins → Security

More detail: BUILD.md (permissions, pipeline example, data layout).

Pipeline steps

All three steps are available from Jenkins' Pipeline Syntax / Snippet Generator. publishJTMResults reads a workspace-relative JSON file, stores a JTM test run, and returns its run ID.

  • publishJTMResults: required resultsFile; updateTestCases (default true), failOnParseError (default false), and createMissingTestCases (default false).
  • enforceQualityGate: optional runId (otherwise the build's published run or JTM_RUN_ID); minPassRate (default 95), maxFailures (default -1, unlimited), blockOnBlocked (default false), blockOnCritical (default true), and blockOnFailure (default true).
  • updateTestCase: required testCaseId and status (PENDING, PASSED, FAILED, BLOCKED, SKIPPED, or FALSE_POSITIVE); optional comment, durationMs (default -1), and failOnNotFound (default false).

The results JSON contains runName, release, branch, commitId, environment, and a results array. Each result has testCaseId, status, durationMs, and optional comment, errorMessage, and stackTrace.

Repository layout

Path Purpose
pom.xml, src/ Jenkins plugin (Maven project at repository root, .hpi in target/)
docs/images/ README screenshots
e2e/ Playwright tests against a running Jenkins (optional CI)
scripts/ Helper scripts used by GitLab deploy jobs (optional)

End-to-end tests (e2e/)

Optional. Requires a reachable Jenkins with JTM installed and credentials.

cd e2e
npm ci
npx playwright test

Set JENKINS_BASE_URL (and optionally JENKINS_USER / JENKINS_PASSWORD) as in e2e/playwright.config.ts.

Continuous integration

  • GitHub Actions: .github/workflows/ci.yml — mvn verify on a JDK matrix (21/25), plus optional Playwright smoke if Jenkins secrets are configured
  • GitLab CI: .gitlab-ci.yml — build, optional deploy to Jenkins, optional Playwright (if you still use GitLab)

mvn verify runs SpotBugs from the Jenkins plugin parent and fails the build on findings (spotbugs.failOnError=true).

Contributing

See CONTRIBUTING.md.

License

MIT (see also pom.xml).

Publishing metadata

pom.xml lists this repository as home (<url> and <scm>). If you fork to another GitHub org or user, update those entries and the CI badge above to match.