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

testwise

v1.1.0

Published

A cli tool for facilitating your combinatorial testing coverage. It utilizes the [n-wise](https://en.wikipedia.org/wiki/All-pairs_testing) (or all pairs) testing methodology to generate sets of expected coverage.

Downloads

2

Readme

Testwise

A cli tool for facilitating your combinatorial testing coverage. It utilizes the n-wise (or all pairs) testing methodology to generate sets of expected coverage.

Usage

Testwise can be used to generate the combinatorial n-sets or compare against your actual test coverage. We will cover the latter here.

There are 3 steps to using this tool:

  1. create a manifest file containing your testing parameters
  2. generate a tests file that reports on what you have tested
  3. run the command

Manifest file

The manifest file (.testwise.yml) describes your testing parameters which requires you to model/design the combinatorial scope. Here is an example if you were testing options on a car configurator with 3 parameters:

version: 1.0
suites:
  car:
    description: configuring options in a car
    parameters:
      - name: color
        values:
          - red
          - green
          - blue
      - name: tech-package
        values:
          - tech-package-opt-in
          - tech-package-opt-out
      - name: sound-package
        values:
          - standard-sound-package
          - upgraded-sound-package
    ignores:
      - ['upgraded-sound-system', 'tech-package-opt-out']

Testwise will generate the combinatorial sets. In this example, there is a dependency for the upgraded sound system on the tech package, therefore, opting out of the tech package and opting in the upgraded sound package is not a possible combination. Testwise will remove those combinations in the expected tests.

Test file

Create a tests.yml file with the following format:

red car with standard package:
  - red
  - tech-package-opt-in
  - standard-sound-package
fully decked out car:
  - blue
  - tech-package-opt-in
  - upgraded-sound-package

This file represents the tests for which you have coverage. It may be wise to generate this file as part of your CI after the actual tests are run.

Running the command

npm install -g testwise
testwise

Here is an example output:

┌────────────────────────────────────────────────────────────────────────────────┐
│ * coverage - 6 / 16 (37%)                                                      │
├────────────────────────────────────────────────────────────────────────────────┤
│ Missing Sets:                                                                  │
├────────────────────────────────────────────────────────────────────────────────┤
│ negative-charge|red                                                            │
│ positive-spin|red                                                              │
│ green|positive-charge                                                          │
│ green|negative-charge                                                          │
│ green|positive-spin                                                            │
│ green|negative-spin                                                            │
│ blue|positive-charge                                                           │
│ blue|positive-spin                                                             │
│ positive-charge|positive-spin                                                  │
│ negative-charge|positive-spin                                                  │
└────────────────────────────────────────────────────────────────────────────────┘

Testwise will run with these defaults:

Options:
  -V, --version          output the version number
  -n, --n <number>       the number n for n-wise coverage (default: 2)
  -m, --manifest <path>  manifest file path path (default: ".testwise.yml")
  -t, --tests <path>     tests file path (default: "tests.yml")
  -h, --help             display help for command

Known Limitations

  • parameter values must be unique
  • output of the cli sets should be cleaned up
  • output of the cli should have the test name
  • does not support coverage thresholds with corresponding exit error codes for CI