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

carmation-next-framework

v0.0.17

Published

E2E test automation meets puppeteer

Downloads

71

Readme

Using the Carmation-Framework

Install node js

download here https://nodejs.org/en/download/

Install Java 8

download here https://www.java.com/en/download/

download here

Install all dependencies

npm i

Example project To be created

Carmation-next-framework

An E-2-E solution for FE and BE automation using Jest, Puppeteer, Superagent and Chai.

Table of Contents

  • [How does it work?](How does it work?)

How does it work?

Carmation-next-framework uses Puppeteer to interact with Chrome, which can be run headed. It follows the strategie pattern and consists of three principles:

  1. Browser(desktop, mobile, tablet)
  2. Element(WebElement, Locator, WebElementProvider)
  3. Interactions(action)

A basic setup would look like this

  • src/
    • specs(tests)
    • pageObjects(elements)
    • actions(elementInteractions)

Install

$ npm i carmation-next-framework --save-dev

Setup a new project

Create a folder

$ mkdir exampleProject

Start a project

$ npm init  

Open the package.json and update:"

{
  "name": "exampleproject",
  "version": "1.0.0",
  "description": "this is an example project",
  "main": "index.js",
  "scripts": {
    "test": "jest",
    "report:gen": "npx allure generate --clean",
    "report:open": "npx allure open"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@types/jest": "^25.2.1",
    "allure-commandline": "^2.13.0",
    "carmation-next-framework": "^0.0.10",
    "jest": "^26.0.1",
    "jest-allure": "^0.1.3",
    "puppeteer": "^3.3.0",
    "ts-jest": "^26.1.0",
    "ts-node": "^8.10.2",
    "typescript": "^3.9.5"
  },
  "jest": {
    "clearMocks": true,
    "moduleFileExtensions": [
      "js",
      "ts"
    ],
    "preset": "ts-jest",
    "reporters": [
      "default",
      "jest-allure"
    ],
    "rootDir": "./",
    "setupFilesAfterEnv": [
      "jest-allure/dist/setup"
    ],
    "testEnvironment": "node",
    "testRegex": [
      "src/specs/*.*/*.spec.ts"
    ],
    "transformIgnorePatterns": [
      "\\\\node_modules\\\\"
    ],
    "testTimeout": 300000
  },
  "dependencies": {
    "add": "^2.0.6",
    "npx": "^10.2.2"
  }
}

Run NPM install

npm i

Create folder structure

mkdir src
cd src
mkdir specs
mkdir pageObjects
mkdir actions

Creating your first test

Create a test file called {testName}.spec.ts in your specs folder

import { WebBrowser, WebBrowserProvider } from "carmation-next-framework";
import { Strategies } from "carmation-next-framework";
import { Actions } from "../actions/actions";


describe("some testSuite", () => {

    let browser: WebBrowser;
    
    beforeEach(async () => {

    });

    afterEach(async () => {
        await browser.close();
    });

    it("some test", async function () {
        browser = await WebBrowserProvider.Get(Strategies.desktop)
        const actions = new Actions(browser);
        actions.searchWithGoogle();
    });
});

Create a action file called action.ts

import { WebBrowser } from "carmation-next-framework";
import { action } from "carmation-next-framework";
import { GooglePage } from "pageObjects/googlePage";


export class Actions {
    browser: WebBrowser;
    constructor(browser: WebBrowser) {
        this.browser = browser;

    }

    @action('continue the flow trough the product configuration phase')
    public async searchWithGoogle() {
        let googlePage = new GooglePage(this.browser)
        await this.browser.goTo(`https://www.google.com`);
        await (await googlePage.searchField()).type('string');
        await (await googlePage.searchButton()).click();
     }
}

Create a action file called googlePage.ts

import { PageObject } from "carmation-next-framework";
import { WebBrowser } from "carmation-next-framework";
import { WebElement, Locator } from "carmation-next-framework";

export class GooglePage extends PageObject{

    constructor(browser: WebBrowser){
        super(browser);
    }

    public async searchField() : Promise<WebElement> {
        return await super.Element(new Locator(`//*[@name='q']`))
    }
    public async searchButton() : Promise<WebElement> {
        return await super.Element(new Locator(`//*[@name='btnK']`));
    }
}

Run NPM install

npm run test

Reporting

Generate report

report:gen

Start reporting server

report:open