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.2.tar.gz (19.7 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.2-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytest_nijam-0.1.2.tar.gz
  • Upload date:
  • Size: 19.7 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.2.tar.gz
Algorithm Hash digest
SHA256 db7214b08abb9f5f804a5810fffbf091e1ad2d93104b33f5e5ac23ee6814fbb8
MD5 330d5773ad7577f7235aef2fd50083f9
BLAKE2b-256 2edec7f626904a9432a86ff28d8777af3d50f010945532999d83b57de4fee7a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_nijam-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: pytest_nijam-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 18.7 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8e413a4c9645788233c4c5c75880b5c210db3ace68f4b1d35e15ae661cbc15dc
MD5 c03dd5873ce66198ea60de8bf9da6a84
BLAKE2b-256 e71cb83dc52cafeb97f3297a14b6ae049c43572154dbeb2135959856e97b11ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_nijam-0.1.2-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