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

octane-runner

v1.2.0

Published

Link ALM Octane tests to work items — driven by a git commit hash or a CSV of test names

Downloads

302

Readme

octane-runner

CLI tool to link ALM Octane tests to a work item — driven by a git commit hash (extracts changed test names automatically) or a CSV file of test names.

No Postman required. Pure Node.js, zero runtime dependencies for the core flow.


Installation

npm install -g octane-runner

Or use without installing:

npx octane-runner --commit abc1234 --curl request.curl --config config.json

Setup

You need one required config file and one copied cURL file for auth.

config.json — commit this to git

Copy your Octane workspace URLs and work item ID here once. Never needs to change unless you switch workspaces.

{
  "searchUrl": "https://almoctane-eur.saas.microfocus.com/api/shared_spaces/146003/workspaces/1002/tests?fields=creation_time,id,phase,name,subtype,author%7Bfull_name%7D,owner%7Bfull_name%7D&limit=100&offset=0&order_by=name,id&query=%22(subtype+IN+%27gherkin_test%27,%27test_manual%27,%27test_automated%27)%22",
  "updateUrl": "https://almoctane-eur.saas.microfocus.com/api/shared_spaces/146003/workspaces/1002/tests",
  "workItemId": "1809072",
  "testNameRegex": "^\\+.*\\b(test_[a-zA-Z0-9_]+)\\s*\\("
}

Tip: The searchUrl can be copied directly from any existing search request in DevTools — it contains all the right query filters. Only the text_search param is replaced per test name at runtime.


request.curl — recommended auth source

Copy a request from DevTools as cURL and save it to a file, for example request.curl.

The runner reads cookie, xsrf-header, ptal, and octane-client-version directly from this file at runtime.

How to grab the cURL from Chrome DevTools

  1. Open Octane in Chrome and log in: https://almoctane-eur.saas.microfocus.com
  2. Open DevTools: F12 (or Cmd+Option+I on Mac)
  3. Go to the Network tab
  4. Click any request to the Octane API (any .../tests or .../workspaces/... request)
  5. Right-click the request → Copy → Copy as cURL (bash)
  6. Paste into request.curl

Run with:

octane-runner --commit abc1234 --curl request.curl --config config.json

Usage

Link tests from a git commit (recommended)

Runs git show <hash> --patch in the current directory, extracts test names using config.testNameRegex (or a built-in default for test_* methods), then searches and links each one in Octane.

# Run from inside your Java/Spring repo
cd /path/to/your/repo

octane-runner \
  --commit abc1234 \
  --curl /path/to/request.curl \
  --config  /path/to/config.json

Full commit hash or short hash both work:

octane-runner --commit abc1234def
octane-runner --commit abc1234

Link tests from a CSV

If you have a list of test names already, skip the git step:

octane-runner \
  --data    tests.csv \
  --curl request.curl \
  --config  config.json

CSV format — one testName per row:

testName
test_validateLastName_surnameProvided_returnsSuccess
test_validateFirstName_nameProvided_returnsSuccess
test_processPayment_validCard_returnsSuccess

All options

--curl <file>              Read auth directly from copied cURL (recommended)
--commit <hash>            Git commit hash. Runs git show in CWD.
--data   <file>            CSV with a testName column (alternative to --commit)
--config  <file>           Path to config.json   [default: config.json]
--delay  <ms>              Milliseconds between requests  [default: 300]
--dry-run                  Show what would happen without firing any requests
--help                     Show help

Dry run first

Always a good idea on a large commit:

octane-runner --commit abc1234 --curl request.curl --config config.json --dry-run

Output will show every test name found in the diff and the PUT body that would be sent, without touching Octane.


How it works

git show <hash> --patch
        │
        ▼ (written to OS temp file, deleted after)
  commit.patch
        │
        ▼ (regex: config.testNameRegex || /^\+.*\b(test_[a-zA-Z0-9_]+)\s*\(/gm)
  [ "test_validateLastName_...", "test_processPayment_...", ... ]
        │
        ▼ for each test name:
  GET /tests?text_search={"type":"context","text":"<testName>"}
        │
        ├─ total_count == 0 → WARN "not found", continue
        │
        └─ found → testId = data[0].id
                        │
                        ▼
              PUT /tests  body: { data: [{ covered_content: { data: [{ type: "work_item", id: "<workItemId>", op_code: "add" }] }, id: "<testId>" }] }

x-correlation-id is generated as a fresh UUID per request (same as the browser does).
xsrf-header, cookie, and octane-client-version come from the cURL file (--curl).


Session expired mid-run?

The runner will stop immediately on a 401 and print:

ERROR  401 Unauthorized — authentication has expired. Refresh cURL input and retry.

Refresh your auth input (new copied cURL) and re-run. Tests that were already updated won't be double-linked — Octane's op_code: "add" is idempotent for existing links.