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 🙏

© 2025 – Pkg Stats / Ryan Hefner

testronaut

v1.3.1

Published

**Testronaut** is an autonomous testing framework powered by **LLMs and Playwright**. It lets you define *mission-based tests* in plain English, then runs them through a real browser to validate UI workflows — all while generating human-readable reports

Readme

🧑‍🚀 Testronaut

Testronaut is an autonomous testing framework powered by LLMs and Playwright.
It lets you define mission-based tests in plain English, then runs them through a real browser to validate UI workflows — all while generating human-readable reports.


🌌 Join the Mission Control Community

Got questions, ideas, or missions to share?
Join the Discord to connect with other Testronauts, get support, and help shape the framework’s future.

Join Discord


🚀 Features

  • Write tests in plain English — no brittle selectors
  • Runs real browser sessions via Playwright
  • Works with multiple LLM providers (OpenAI, Google Gemini, and more coming)
  • Modular tool and DOM-reasoning system
  • Dynamic rate-limit and token-tracking logic
  • Generates JSON + HTML reports automatically

📖 Documentation

Looking for deeper guides, API references, and examples?
Check the official docs:

Read the Docs

Includes:

  • Quickstart and setup
  • Writing advanced missions
  • Configuring providers and models
  • CLI options
  • Mission Control integration
  • Troubleshooting and FAQs

📦 Installation

npm install -g testronaut

Then initialize your project:

npx testronaut --init

Run the sample mission:

npx testronaut welcome.mission.js

📁 Project Structure

missions/
├── login.mission.js
├── logout.mission.js
└── dashboard.mission.js

Each mission exports a string or function and calls runMissions.


✍️ Example Mission

import { runMissions } from 'testronaut';

export const loginMission = `
Visit ${process.env.URL}.
Fill the username field with ${process.env.USERNAME}.
Fill the password field with ${process.env.PASSWORD}.
Click the Login button.
Wait for the dashboard to appear.
Take a screenshot.
Report SUCCESS if the dashboard is loaded, otherwise FAILURE.
`;

export async function executeMission() {
  await runMissions({ mission: loginMission }, "Login Mission");
}

Create a .env file with your credentials and LLM API key (depending on your chosen provider):

# For OpenAI
OPENAI_API_KEY=sk-...

# Or for Gemini
GEMINI_API_KEY=AIza...

URL=https://example.com/login
[email protected]
PASSWORD=********

🧠 LLM Provider Support

Testronaut is provider-agnostic.
Choose your preferred LLM at init or via environment variables.

# During init
npx testronaut --init

# Or override anytime
TESTRONAUT_PROVIDER=gemini TESTRONAUT_MODEL=gemini-2.5-pro npx testronaut

Current supported providers:

| Provider | Example Models | |-----------|----------------| | OpenAI | gpt-4o, gpt-4.1, o3, gpt-5, gpt-5.1, etc. | | Google Gemini | gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-8b |

More providers coming soon (Anthropic, Mistral, etc.).


🏃 Running Missions

Run all missions:

npx testronaut

Run a specific mission:

npx testronaut login.mission.js

Chain missions together:

await runMissions({
  preMission: [loginMission],
  mission: fillContactFormMission,
  postMission: logoutMission,
}, "Contact Form Flow");

📋 Reports

Testronaut generates both JSON and HTML reports automatically under:

missions/mission_reports/

Each includes:

  • Steps executed
  • Token usage
  • Screenshots
  • Pass/Fail summaries

🧪 Under the Hood

  • Playwright for browser automation
  • LLMs for reasoning, DOM parsing, and tool use
  • Token throttling + adaptive cooldowns
  • Extensible architecture for custom tools and workflows

🧭 Mission Control

Mission Control lets you:

  • View all reports in one dashboard
  • Track mission history and success rates
  • Compare results across environments
  • Access screenshots and step details anytime

📄 License

MIT


☕ Support the Mission

🤖 Built with ❤️ by Shane Fast

If Testronaut saves you time, consider fueling the mission:
Donate