npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

contextqa

v1.2.0

Published

Run a ContextQA test plan from any CI pipeline and gate on the result

Readme

contextqa

Run a ContextQA test plan from any CI pipeline. The contextqa command starts the plan, waits for the result, writes it as JUnit XML for your CI's test report, and fails the build unless the run passed.

CONTEXTQA_TOKEN=… npx contextqa@1 run-plan --plan-id 827 --junit reports/contextqa.xml

Needs Node.js 20.6 or later. No install step: npx contextqa@1 always runs the latest 1.x release. Prefer a container? Use ghcr.io/indivatools/contextqa-cli:1 with the same options.

Using GitHub Actions, GitLab, Jenkins, Azure Pipelines, CircleCI or Bitbucket? There is a ready-made integration for each, built on this command: ContextQA for CI/CD.

Before you start

  1. The test plan ID. Open the plan in ContextQA; the ID is the number in the URL (…/plans/827/… → 827). The plan's CI/CD tab also generates a ready-made snippet.

  2. An API token, from Settings › API tokens, with these permissions:

    | Permission | Needed for | |---|---| | TEST_PLAN_EXECUTE | starting the run, and uploading a mobile build (required) | | TEST_PLAN_RESULTS_READ | waiting for the result (required) | | TEST_CASE_RESULTS_READ | per-test results, device details and result links (recommended) | | TEST_STEP_RESULTS_READ | failed-step screenshots (optional) |

    Store it as a secret in your CI and pass it as the CONTEXTQA_TOKEN environment variable. The token is read from the environment only, never from a flag, so it does not appear in process listings or logs.

Examples

# Run a plan and write a JUnit report for your CI's test tab
npx contextqa@1 run-plan --plan-id 827 --junit reports/contextqa.xml

# Test a mobile build produced earlier in the pipeline (the file is uploaded to your workspace)
npx contextqa@1 run-plan --plan-id 827 --android-build app/build/outputs/apk/release/app-release.apk

# Run against another ContextQA environment, and spell out each failure at the end of the log
npx contextqa@1 run-plan --plan-id 827 --environment Staging --view detailed

# Report the result without failing the build
npx contextqa@1 run-plan --plan-id 827 --fail-on never

Options

Every option can also be set with the environment variable shown.

| Option | Environment variable | Default | Description | |---|---|---|---| | --plan-id <id> | CONTEXTQA_PLAN_ID | required | Test plan to run. | | --environment <name> | CONTEXTQA_ENVIRONMENT | the plan's own | Run against this ContextQA environment instead. | | --android-build <path\|url> | CONTEXTQA_ANDROID_BUILD | | Android build to test: a local file is uploaded, an https:// URL is passed through. | | --ios-build <path\|url> | CONTEXTQA_IOS_BUILD | | The same, for iOS. | | --junit <path> | CONTEXTQA_JUNIT_PATH | | Write JUnit XML here, with failed-step screenshots in a contextqa-screenshots folder beside it. | | --json <path> | CONTEXTQA_JSON_PATH | | Write a JSON summary here. | | --view <view> | CONTEXTQA_VIEW | standard | How much the end of the log shows: compact, standard, detailed or full. See Summary and log views. | | --timeout <seconds> | CONTEXTQA_TIMEOUT | 3600 | How long to wait for the run. | | --poll-interval <seconds> | CONTEXTQA_POLL_INTERVAL | 15 | Seconds between status checks. | | --fail-on <failure\|never> | CONTEXTQA_FAIL_ON | failure | never reports the result without failing. | | --no-wait | CONTEXTQA_WAIT=false | | Start the run and exit without waiting. | | --api-url <url> | CONTEXTQA_API_URL | https://server.contextqa.com | Change only for a dedicated or on-premises ContextQA. |

contextqa --help prints the same list.

Exit codes

The build passes only when the test plan's result is SUCCESS. A run that is aborted or stopped is not a pass, even if no test case failed.

| Exit code | Meaning | What to do | |---|---|---| | 0 | The run passed. | | | 1 | The run finished but did not pass. | Open the report link printed in the log. | | 2 | Configuration or token problem. | Check the plan ID, the token and its permissions. Retrying will not help. | | 3 | ContextQA could not be reached, or the run did not finish within the timeout. | The log links the run, which keeps going in ContextQA. Retry, or raise the timeout. |

More

License

MIT