testjam-client
Python SDK + Robot Framework listener + testjam command-line client for the Testjam REST API. One package, opt-in extras for the listener and the CLI.
Install
# SDK only (Python integration)
pip install -e .
# SDK + CLI (the `testjam` binary)
pip install -e ".[cli]"
# SDK + Robot Framework listener
pip install -e ".[robot-listener]"
# Everything
pip install -e ".[all]"
Or pin from a local checkout:
dependencies = ["testjam-client @ file:///path/to/testjam-client"]
Quick start
from testjam_client import TestjamClient
with TestjamClient("http://localhost:8000/api/v1") as client:
client.login("admin", "admin123")
project = client.projects.find_or_create("My Project")
version = client.versions.find_or_create(project["id"], "master-abc1234")
suite = client.suites.find_or_create(project["id"], "Smoke Tests")
case = client.cases.find_or_create(suite["id"], "Login flow")
client.cases.replace_steps(case["id"], [
{"action": "open page", "expected_result": "form visible"},
{"action": "submit credentials", "expected_result": "redirect"},
])
execution = client.executions.create(
project["id"],
title="CI build #42",
type="automatic",
test_case_ids=[case["id"]],
version_id=version["id"],
)
Authentication
# Bearer token (preferred for CI)
TestjamClient(url, token="eyJ...")
# Per-project API key
TestjamClient(url, api_key="tjk_...")
# Username + password (interactive / dev)
client = TestjamClient(url)
client.login("user", "pass")
CLI quick start
The [cli] extra installs a testjam binary backed by Typer + Rich.
pip install "testjam-client[cli]"
testjam config set url https://testjam.example.com/api/v1
testjam login --username alice # password prompt (hidden)
testjam config set default_project "Web" # avoid repeating --project
testjam project list
testjam case create "Login" --suite 17 --steps -
testjam case import cases.csv # one row per case; exit 1 on row errors
testjam run start "Nightly" --plan 5 --type automatic --yes
testjam run tail 91 --timeout 3600 # exit 0/1/2/3/4 = passed/failed/aborted/timed out/server unreachable
testjam run rerun 91 --not-passed --yes # new run with the cases that did not pass
# Pipeline-friendly output:
testjam --json bug list --status open | jq '.[].title'
Drop the args to enter the REPL:
$ testjam
testjam> project list
testjam> --json bug list --severity high
testjam> :exit
Full reference: docs/manual/cli.md.
Resource modules
Responses are plain dicts described by TypedDict classes in
testjam_client.models (the package ships py.typed), and status values
live in testjam_client.statuses.
client.projects— list, create, delete,find_or_create.client.suites— hierarchy:descendants,parent_chain,path,case_ids_recursive,find_or_create.client.cases— CRUD, steps (list_steps,add_step,update_step,delete_step,reorder_steps,replace_steps,delete_steps_by_type), archive (archive,unarchive), bulk reconciliation (reconcile(suite_id, specs)),import_csv.client.versions— CRUD +find_or_createkeyed by name.client.environments— CRUD +find_or_create.client.executions— CRUD,reopen,rerun,list_results(filter byassigned_to_id),bulk_results,import_junit/import_robotframework,export_xlsx/export_html,upload_attachment/list_attachments.client.results—get,create,update,assign,upload_attachment/list_attachments.client.step_results—start,update,append_log.client.bugs— CRUD,get_by_number,change_status, comments, watchers (watch/unwatch/list_watchers), links, activity, attachments,context,download_report,download_release_notes.client.plans— CRUD test plans plusadd_cases.client.webhooks— CRUD,test,list_deliveries(create returns the secret; subsequent reads omit it).client.tokens—list_user_tokens/create_user_token/rotate_user_token/delete_user_token, plus the*_project_tokenequivalents for project-scoped API keys.client.integrations— provider catalogue, project integrations, bug external links,report_from_result.client.public_reports—create,list,revoke,fetch_html.client.users—me. Generates anonymous share tokens for bug or execution reports.
Errors
Every non-2xx response raises a subclass of TestjamError:
from testjam_client import NotFound, Conflict, ValidationError, Unauthorized
try:
client.projects.get(99999)
except NotFound as exc:
print(exc.detail)
try:
client.projects.create("Existing")
except Conflict:
pass
Tests
Tests live in testjam-client/tests and run against the real FastAPI app via
fastapi.testclient.TestClient with SQLite in-memory:
make test-client
Metadata
Release files for testjam-client 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| testjam_client-1.1.2.tar.gz | 63.3 kB | With provenance | Details for testjam_client-1.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| testjam_client-1.1.2-py3-none-any.whl | Python 3 | none | any | Details for testjam_client-1.1.2-py3-none-any.whl |
Total release size: 125.5 kB
Release files / testjam_client-1.1.2.tar.gz
| Download URL | testjam_client-1.1.2.tar.gz |
|---|---|
| Size | 63.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59a5ede52286a916d820129ab5c3a246c81c7724af5b6c5977c7ea3336905187
|
|
BLAKE2b-256 checksum How to use checksums |
67ad7e36220ab2131231e6402b734284c13d79d183b0c194f1707178497edbfe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logRelease files / testjam_client-1.1.2-py3-none-any.whl
| Download URL | testjam_client-1.1.2-py3-none-any.whl |
|---|---|
| Size | 62.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b4b3958435119abf4657df7046a58507b5c09da8b5415d2cbe26abfe81daf33b
|
|
BLAKE2b-256 checksum How to use checksums |
1b081c88bd5a927fb24f7c46e13f7c41dfd9772cabe9036cbb5c9d12053366fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logSecurity for testjam-client 1.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for testjam_client-1.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.