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

assure-testing

v1.0.2

Published

Assure - A custom testing language (DSL) for browser automation. Test files use .assure extension.

Readme

🧪 Assure - Custom Testing Language

Assure is a custom testing language (DSL) built from scratch with a unique browser automation engine using Chrome DevTools Protocol (CDP).

📚 Complete Tutorial → | 🚀 Quick Start Guide → | 🌐 Documentation Site → | 📦 npm | 🐙 GitHub

✨ Features

  • 🎯 Custom Syntax - Human-readable test commands
  • 🔧 Built from Scratch - No Playwright, no Selenium - pure CDP implementation
  • Lightweight - Minimal dependencies
  • 🚀 Fast - Direct Chrome DevTools Protocol communication
  • 📝 Simple - Easy to learn and write tests

🏗️ Architecture

assure/
│
├── language/
│   ├── parser.ts        # Parses Assure syntax
│   ├── tokenizer.ts     # Tokenizes lines
│
├── engine/
│   ├── browser.ts       # Custom CDP browser engine
│   ├── executor.ts      # Command executor
│
├── commands/
│   ├── open.ts          # OPEN command
│   ├── click.ts         # CLICK command
│   ├── type.ts          # TYPE command
│   ├── expect.ts        # EXPECT command
│
├── runner.ts            # Main test runner
└── *.assure             # Test files

📦 Installation

Install from npm (Recommended)

# Install globally
npm install -g assure-testing

# Or install locally in your project
npm install --save-dev assure-testing

Install from source

git clone https://github.com/upendra-manike/assure.git
cd assure
npm install
npm run build

Requirements:

  • Node.js 18+
  • Chrome or Chromium browser installed

File Extension:

  • All test files must use the .assure extension (e.g., test.assure, login.assure)

🚀 Quick Start

  1. Create a test file with .assure extension (example.assure):
TEST "My First Test"

OPEN "https://example.com"
WAIT 2
EXPECT TITLE CONTAINS "Example"
  1. Install dependencies:
npm install
  1. Run the test:
# If installed globally
assure example.assure

# If installed locally
npx assure example.assure

# Or using npm script
npm test example.assure

📚 Language Syntax

Basic Commands

OPEN

Navigate to a URL:

OPEN "https://example.com"

CLICK

Click an element:

CLICK "#button"
CLICK ".submit-btn"
CLICK "button[type='submit']"

TYPE

Type text into an input:

TYPE "#username" "admin"
TYPE "#password" "secret123"

WAIT

Wait for specified seconds:

WAIT 2
WAIT 5

EXPECT

Assert conditions:

Title:

EXPECT TITLE CONTAINS "Dashboard"
EXPECT TITLE EQUALS "My App"

URL:

EXPECT URL CONTAINS "/dashboard"
EXPECT URL EQUALS "https://example.com/home"

Text:

EXPECT TEXT "#welcome" CONTAINS "Welcome"
EXPECT TEXT ".message" EQUALS "Success"

Visibility:

EXPECT VISIBLE "#modal"

Comments

Lines starting with # are comments:

# This is a comment
OPEN "https://example.com"

Test Labels

TEST "User Login Flow"

🔧 Custom Browser Engine

Assure uses a custom-built browser engine that communicates directly with Chrome via Chrome DevTools Protocol (CDP). This gives you:

  • Full Control - Direct access to browser internals
  • No Heavy Dependencies - Just chrome-remote-interface for CDP
  • Unique Implementation - Built specifically for Assure

How It Works

  1. Launches Chrome with remote debugging enabled
  2. Connects via WebSocket to Chrome DevTools Protocol
  3. Executes commands using CDP methods
  4. Handles element selection, clicking, typing, etc.

📝 Example Test File

Save your tests with the .assure extension (e.g., login.assure, checkout.assure):

TEST "User Login"

OPEN "https://example.com/login"

TYPE "#username" "admin"
TYPE "#password" "password123"
CLICK "#login-button"

WAIT 2

EXPECT URL CONTAINS "/dashboard"
EXPECT TEXT "#welcome" CONTAINS "Welcome"
EXPECT VISIBLE "#user-menu"

🛠️ Configuration

Chrome Path

If Chrome is not in the default location, set the CHROME_PATH environment variable:

export CHROME_PATH="/path/to/chrome"
node runner.js test.assure

Headless Mode

Currently runs in headless mode by default. To run with visible browser, modify runner.ts:

session = await createBrowser(false); // visible browser

🎯 Supported Commands

| Command | Description | Example | |---------|-------------|---------| | OPEN | Navigate to URL | OPEN "https://example.com" | | CLICK | Click element | CLICK "#button" | | TYPE | Type text | TYPE "#input" "text" | | WAIT | Wait seconds | WAIT 2 | | EXPECT TITLE | Assert title | EXPECT TITLE CONTAINS "Page" | | EXPECT URL | Assert URL | EXPECT URL CONTAINS "/home" | | EXPECT TEXT | Assert text | EXPECT TEXT "#el" CONTAINS "text" | | EXPECT VISIBLE | Assert visibility | EXPECT VISIBLE "#modal" | | OTP MANUAL | Enter OTP manually | OTP MANUAL "123456" "#otp-input" | | OTP FROM FILE | Read OTP from file | OTP FROM FILE "otp.txt" "#otp-input" | | OTP FROM CLIPBOARD | Read OTP from clipboard | OTP FROM CLIPBOARD "#otp-input" | | TEST | Test label | TEST "My Test" |

🚧 Future Enhancements

  • [ ] Variables and functions
  • [ ] IF/ELSE conditionals
  • [ ] RETRY mechanisms
  • [ ] Parallel test execution
  • [ ] HTML/JSON reports
  • [ ] Screenshot support
  • [ ] VS Code syntax highlighting
  • [ ] CI/CD integration

📄 License

MIT

🤝 Contributing

This is a custom testing language built from scratch. Feel free to extend it!


Built with ❤️ using Chrome DevTools Protocol