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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@smartbear/one-report-publisher

v0.8.0

Published

Publish Test Results to SmartBear OneReport

Downloads

580

Readme

Run Tests

OneReport Publisher

This is a tool that publishes test results (test cycles) to SmartBear OneReport. It is intended to be used in Continuous Integration workflows.

The tool supports the following file formats:

  • JUnit XML
  • Cucumber JSON
  • Cucumber Messages
  • Zip files (containing any of the above)

If the publisher is executed on a supported CI server, it will also send the following git metadata along with the test results:

  • Repository URL
  • Commit SHA
  • Current Branch
  • Current Tag (if available)

GitHub Actions

Add a step after all tests have run. The if: ${{ always() }} ensures results are published even if a previous test step failed.

- name: 'Publish to OneReport'
  if: ${{ always() }}
  uses: smartbear/[email protected]
  with:
    # Can be omitted if ONE_REPORT_PROJECT_ID is defined
    project-id: F5222E06-BA05-4C82-949A-2FE537B6F59F
    # Can be omitted if ONE_REPORT_REFRESH_TOKEN is defined
    refresh-token: ${{ secrets.ONE_REPORT_REFRESH_TOKEN }}
    # Can be omitted if ONE_REPORT_URL is defined
    url: ${{ env.ONE_REPORT_URL }}
    reports: ./reports/**/*.{xml,json,ndjson,zip}

See action.yml for a full reference of available input options.

Command Line Reference

The command-line tool can be used in any CI pipeline that has the npx command available (it needs to have Node.js installed).

npx @smartbear/[email protected] --help

Usage: one-report-publisher [options]

Options:
  -u, --url <url>                      OneReport URL. Defaults to $ONE_REPORT_URL
  -p, --project-id <id>                OneReport project id. Defaults to $ONE_REPORT_PROJECT_ID
  -t, --refresh-token <refresh-token>  OneReport refresh-token. Defaults to $ONE_REPORT_REFRESH_TOKEN
  -r, --reports <glob...>              Glob to the files to publish
  -m, --max-time <seconds>             Max time for each request
  -i, --ignore-error                   Exit with 0 even if a timeout or error occurred
  --no-zip                             Do not zip non .zip files
  -h, --help                           display help for command

Example:

npx @smartbear/[email protected] \
  --project-id F5222E06-BA05-4C82-949A-2FE537B6F59F \
  --refresh-token ${ONE_REPORT_REFRESH_TOKEN} \
  --reports ./reports/**/*.{xml,json,ndjson,zip}

CircleCI

Add a step after all tests have run. You have to make sure the command is running in a docker image that has Node.js installed (for example cimg/node).

- run:
    name: Publish test results to OneReport
    command: |
      npx @smartbear/[email protected] \
        --project-id F5222E06-BA05-4C82-949A-2FE537B6F59F \
        --refresh-token ${ONE_REPORT_REFRESH_TOKEN} \
        --reports ./reports/**/*.{xml,json,ndjson,zip}