jsuperman

1.0.8 • Public • Published

JSuperman cli

project-image

The project is a Node.js library that provides a command-line interface (CLI) for running API test collections using Newman. It allows users to execute multiple collections by specifying JSON file paths or URLs. The library supports optional environment files and generates reports in CLI HTML and Allure formats. Its goal is to simplify API testing provide detailed reports and aid in quality assurance.

🛠️ Installation Steps:

npm:

1. npm install -g jsuperman

yarn:

2. yarn add global jsuperman

🏃🏾‍♂️ How run

Is mandatory to pass the path to a config file (json or yaml) with following format:

jsuperman -f /path/to/config/file

    [
        {
            "collection": "path/to/exported/collection/json/or/a/postman/collection/url",
            "environment": "path/to/environment/json"
        }
    ]
    

* Up allure server with allure results

jsuperman -f /path/to/config/file -s

In quiet mode

jsuperman -f /path/to/config/file -s -q

Specified port

jsuperman -f /path/to/config/file -s -p port

Scheduling tests

To schedule tests with JSuperman we use cron flag with cron expression:

jsuperman -f /path/to/config/file --cron "0 0 0 * * *"

or

jsuperman -f /path/to/config/file -c "0 0 0 * * *"

Send email with results (beta)

jsuperman -f /path/to/config/file -e /path/to/email/config/file/json

structure:

        {
            "smtp": {
                "host": "host",
                "port": port,
                //auth is optional
                "auth": {
                    "user": "user",
                    "pass": "password"
                    }
                },
            "template": "path/to/ejs/template/file",
            "content": "Content of email if doesn't a template",
            "subject": "subject",
            "to": [
                "email1",
                "emailn"
            ],
            "from": {
                "name": "your personal name or team name",
                "email": "email"
            }
}
    

Results endpoint

Result newman executions

GET http://hostname:7777/jsuperman/results

💻 Built with

Technologies used in the project:

  • Typescript
  • NodeJS

🛡️ License:

This project is licensed under the MIT

Contributing

Opened for contributions 😅

Package Sidebar

Install

npm i jsuperman

Weekly Downloads

0

Version

1.0.8

License

MIT

Unpacked Size

67.8 kB

Total Files

48

Last publish

Collaborators

  • dumijdev