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

@memberjunction/testing-cli

v4.4.0

Published

MemberJunction Testing Framework CLI - Command-line interface for test execution and management

Readme

@memberjunction/testing-cli

Command-line interface for the MemberJunction Testing Framework. Provides commands for running tests, managing suites, viewing history, comparing runs, generating reports, and validating configurations.

Architecture

graph TD
    subgraph "@memberjunction/testing-cli"
        A[CLI Entry Point] --> B[Commands]
        B --> C[run]
        B --> D[suite]
        B --> E[list]
        B --> F[history]
        B --> G[compare]
        B --> H[report]
        B --> I[validate]

        A --> J[Utilities]
        J --> K[Config Loader]
        J --> L[Output Formatter]
        J --> M[Spinner Manager]
        J --> N[Variable Parser]

        A --> O[MJ Provider]
    end

    subgraph "Engine Layer"
        P["@memberjunction/testing-engine<br/>(Execution)"]
        Q["@memberjunction/testing-engine-base<br/>(Metadata)"]
    end

    C --> P
    D --> P
    E --> Q
    F --> Q
    G --> Q
    I --> P

    style A fill:#2d6a9f,stroke:#1a4971,color:#fff
    style C fill:#2d8659,stroke:#1a5c3a,color:#fff
    style D fill:#2d8659,stroke:#1a5c3a,color:#fff
    style E fill:#7c5295,stroke:#563a6b,color:#fff
    style F fill:#7c5295,stroke:#563a6b,color:#fff
    style G fill:#b8762f,stroke:#8a5722,color:#fff
    style H fill:#b8762f,stroke:#8a5722,color:#fff
    style I fill:#7c5295,stroke:#563a6b,color:#fff
    style O fill:#2d6a9f,stroke:#1a4971,color:#fff

Overview

This package provides the CLI layer on top of the MemberJunction Testing Engine. It is designed to be used both standalone and as an integrated part of the mj test command group in the MemberJunction CLI.

Available commands:

| Command | Description | |---------|-------------| | run | Execute a single test by ID or name | | suite | Execute a test suite with parallel/sequential control | | list | List available tests, suites, and types | | history | View execution history for tests or suites | | compare | Compare results across multiple test runs | | report | Generate execution reports | | validate | Validate test or suite configurations without executing |

Installation

npm install @memberjunction/testing-cli

Commands

run -- Execute a Test

# Run by test name
mj test run --name "Agent Summarization Test"

# Run by test ID
mj test run --id "test-guid"

# With variables
mj test run --name "My Test" --var AIConfiguration=gpt-4o --var Temperature=0.3

# Verbose output
mj test run --name "My Test" --verbose

# Dry run (validate only)
mj test run --name "My Test" --dry-run

suite -- Execute a Suite

# Run a suite
mj test suite --name "Regression Suite"

# Parallel execution
mj test suite --name "Suite" --parallel --max-parallel 5

# Stop on first failure
mj test suite --name "Suite" --fail-fast

# Run specific sequence range
mj test suite --name "Suite" --sequence-start 3 --sequence-end 7

list -- List Tests and Suites

# List all tests
mj test list

# List test suites
mj test list --suites

# List test types
mj test list --types

history -- View History

# View test run history
mj test history --name "My Test"

# View suite run history
mj test history --suite "My Suite"

compare -- Compare Runs

# Compare two test runs
mj test compare --run1 "run-id-1" --run2 "run-id-2"

validate -- Validate Configuration

# Validate a test
mj test validate --name "My Test"

# Validate a suite
mj test validate --suite "My Suite"

Configuration

The CLI uses cosmiconfig to load configuration from:

  • .mjtestrc
  • .mjtestrc.json
  • mj.config.cjs (in the testing section)

Configuration includes database connection settings for the MJ Provider.

Utilities

| Utility | Description | |---------|-------------| | ConfigLoader | Loads CLI configuration via cosmiconfig | | OutputFormatter | Formats test results for terminal display with chalk | | SpinnerManager | Manages ora spinners for long-running operations | | VariableParser | Parses --var key=value CLI arguments into typed variables | | MJProvider | Initializes the MemberJunction SQL Server data provider |

Dependencies

| Package | Purpose | |---------|---------| | @memberjunction/testing-engine | Test execution engine | | @memberjunction/testing-engine-base | Metadata and types | | @memberjunction/core | Core MJ functionality | | @memberjunction/core-entities | Entity types | | @memberjunction/sqlserver-dataprovider | Database connectivity | | @oclif/core | CLI framework | | chalk | Terminal styling | | ora-classic | Terminal spinners | | cosmiconfig | Configuration loading |

License

ISC