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

bigman

v0.1.2

Published

Bigman is a command-line collection runner for Postman. It is built on Newman with extra features to run collection folders dynamically.

Downloads

2

Readme

What is Bigman

Bigman is a command-line collection runner for Postman. It is built on Newman with extra features to run collection folders dynamically.

With Some assumptions

each collection will consist of two levels of folders:

- Collection
  - First level folder (workflow group)
    - Second level folder (workflow)
    - Second level folder (workflow)
    - Second level folder (workflow)
    - Second level folder (workflow)
  - First level folder (workflow group)
    - Second level folder (workflow)
    - Second level folder (workflow)
    - Second level folder (workflow)
    - Second level folder (workflow)

Installation

To run bigman, make sure that you have installed Node.js >= v12.

To install bigman you need to have NPM so if you installed Node.js you probably have NPM also installed with it.

npm install bigman

then set the environment variable POSTMANKEY that hold that value for Postman API key in .env file.

Using Bigman

You can use bigman as Node.js module in your node project, like the example below:

const bigman = require('bigman');
const options = {
collectionName:"Project API",
wfGroups: ["Web Application","Mobile Application"],
workflows: ["Login","profile"],
environment: "production",
variables: {},
};
bigman.runTest(options)

In this example the bigman will run collection Project API but only API requests in workflows Login & profile on selected workflow groups Web Application & Mobile Application, here below the collection structure:

- Collection name: Project API
  - First level folder name: Web Application (workflow group)
    - Second level folder name: Login (workflow)
    - Second level folder name: Dashbaord
    - Second level folder name: profile
  - First level folder name: Mobile Application (workflow group)
    - Second level folder name: Login (workflow)
    - Second level folder name: profile
    - Second level folder name: Home page

Note:

  • folders' names are case sensitive so "login" and "Login" are different in Bigman.
  • First level folders' names should be unique, otherwise, some functions will not work as expected.

Bigman API Reference

  1. runTest function accept an object of these properties:

    • collectionName : The postman collection name which is mandatory/required.
    • wfGroups: The first level folder name or an array of first level folders names, it is optional and default value is [] that means bigman will run over all first level folders.
    • workflows: The second level folder name or an array of second-level folders names, it is optional and the default value is [] that means Bigman will run over all second-level folders for a selected wfGroup/wfGroups based on the wfGroups passed parameter,
    • environment: The name of environment to run Bigman over, it is optional and default value dev if this environment name doesn't exists Bigman will throw an error with the message "The environment name is not valid/exists"
    • variables: It is an object of different variables that you can pass to set in environment variables to run your test. if it contained already exists variables that will overwrite the existing ones or it will add new variables if not exists, you can pass the variable as simple property key: value or complex variable as object property like key: Object, by the end of test these variables will be persisted in the selected environment. It is optoinal & the default value is {}.
  2. listCollections function returns an array of objects each object represents a collection data which are id, name, owner,uid for that collection.

  3. listEnvironments function returns an array of objects each object represents an environment data which are id, name, owner,uid for that collection.

  4. getEnvironmentUID function returns an UID for the passed envirnment name if it is exists or it will throw an error with the message "The environment name is not valid/exists"

  5. setEnvironmentVars function it takes two parameters the first is the environment name the second is the Object of variables. You can use this function adding/overwrite variables values in the selected environment that passed as the first parameter.The return from this function is environment data that has been passed to it. Here below an example how to call this function:

    const { setEnvironmentVars } = require("bigman");
    const newVariables = {
      simpleVar: "simpleValue",
      complexVar: { key1: "value1", key2: "value2" },
    };
    
    setEnvironmentVars("dev", newVariables);
  6. listWFGroups function it takes the collection name as parameter and return an array of first level folders names (workflow Groups) for that collection.

  7. listWorkflows function it takes the workflow group name as a parameter and iterates overall collections and for the first collection that has this workflow group name(first level folder name), it goes through it and returns an object of two properties collectionID with value of the UID for the found collction and array of second-level folders names (workflows) for that collection.

[EOF]