Skip to main content

pytest plugin for Nijam — captures test runs and ships them to the Nijam API.

Project description

pytest-nijam

pytest plugin for Nijam — captures your test runs and ships them to the Nijam dashboard so you can track what failed, why, and where (error log + failing line), across CI runs and over time.

pytest has no traces, so — unlike the Playwright reporter — runs won't include a trace viewer. Everything else (failures, error output, the failing line, durations, and your test source) is captured.

Install

pip install pytest-nijam

The plugin auto-activates once installed (via pytest's pytest11 entry point).

Configure

Add your project ID to pytest.ini (or pyproject.toml), and provide the ingest API key via an environment variable (it's a secret — keep it out of source control):

# pytest.ini
[pytest]
nijam_project_id = 00000000-0000-0000-0000-000000000000
# pyproject.toml
[tool.pytest.ini_options]
nijam_project_id = "00000000-0000-0000-0000-000000000000"
export NIJAM_API_KEY="nij_sk_…"   # from the Nijam dashboard → Secret keys
pytest

Both the project ID and the API key can come from either the ini file or an environment variable; the environment variable wins when both are set.

Options

ini option env var default what it does
nijam_api_key NIJAM_API_KEY Ingest API key (required).
nijam_project_id NIJAM_PROJECT_ID Project UUID (required).
nijam_api_url NIJAM_API_URL https://api.nijam.dev API base URL.
nijam_environment NIJAM_ENVIRONMENT Free-form environment tag (e.g. staging).
nijam_upload_source true Upload each test file's source so the dashboard can show it.
nijam_auto_complete NIJAM_AUTO_COMPLETE true Finalize the run when this process ends. Set false for fan-out.
nijam_silent false Suppress [nijam] log lines.

If nijam_api_key or nijam_project_id is missing, the plugin disables itself with a single warning — your tests run exactly as before.

CI metadata

Run context (commit, branch, PR number, CI provider/run URL, commit author) is detected automatically from GitHub Actions, GitLab CI, CircleCI, Bitbucket Pipelines, or generic GIT_* env vars, falling back to git itself. No configuration needed.

Fan-out across CI jobs

If you split your suite across several CI jobs (e.g. one job per test path) that all feed one Nijam run, set nijam_auto_complete = false (or NIJAM_AUTO_COMPLETE=false) on each job so none of them finalizes early, then complete the run once from a post-matrix step. See the docs.

Guarantees

This plugin never breaks your test run. Every hook is fail-soft: a network error, a bad key, or an unreachable API produces a [nijam] warning and nothing more — your tests still pass or fail on their own merits.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest_nijam-0.1.0.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_nijam-0.1.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file pytest_nijam-0.1.0.tar.gz.

File metadata

  • Download URL: pytest_nijam-0.1.0.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pytest_nijam-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f3e1052ce54bfc48cd54fc776d67caeb1a71e76f6a98ce63ebf75df6cc920190
MD5 202dfb8db2e97f01420758d33211ee64
BLAKE2b-256 095013185d13a69e221365207e4c176224ca8e36157d2e5fa0d9b9726b5c5621

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_nijam-0.1.0.tar.gz:

Publisher: publish.yml on getnijam/pytest-reporter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pytest_nijam-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pytest_nijam-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pytest_nijam-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7cc60954f141623ca171f00c1ae359f7d2acc83e1b82b16103fbf6959f5a5300
MD5 e79330a4d41fe7437dc343a0da98577c
BLAKE2b-256 7e22f111cce47e04837926cbce626516a4259b4edb6bfd8b52276707e6164b30

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_nijam-0.1.0-py3-none-any.whl:

Publisher: publish.yml on getnijam/pytest-reporter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page