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.1.tar.gz (19.3 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.1-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytest_nijam-0.1.1.tar.gz
  • Upload date:
  • Size: 19.3 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.1.tar.gz
Algorithm Hash digest
SHA256 a115339a8b77122a422a8390a372d38480894f4505b1b0582ad2bef39ef913fb
MD5 89de6731e54b84560751df32578a5ebf
BLAKE2b-256 9ed7e14650c13e90a1c79f1bf921a8cb74e6d20585aae414a902beb0b6f65bb8

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pytest_nijam-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8005d9e8a2e03ed8d6c82e391329c93a8d3671a963da07d3eeda21d29956ad26
MD5 154e2490c6efcfeed3d92ff7348d57b0
BLAKE2b-256 1aea69a5b4bb2deb5e29975fd60b9c841f92ad3458574a27dbc0016ef4bd1a7a

See more details on using hashes here.

Provenance

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