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

text-tester-by-stagehand

v1.4.0

Published

Zero-code text-driven UI test runner powered by Stagehand, with CLI init and Vitest integration.

Readme

text-tester-by-stagehand

一个基于 Stagehand 的零代码文本驱动 UI 测试工具,提供 CLI 初始化与 Vitest 集成。

安装

npm i -D text-tester-by-stagehand

或使用 pnpm:

pnpm add -D text-tester-by-stagehand

快速开始

  1. 初始化测试项目结构:
npx text-tester-by-stagehand init
  1. 配置环境变量:
cp test-data/credentials.env.example test-data/credentials.env

编辑 test-data/credentials.env,设置 TEST_BASE_URL、测试账号与模型配置。

  1. 编写测试:在 tests/scenarios/ 目录编写 .txt 场景文件。

  2. 运行测试:

npx text-tester-by-stagehand test
npx text-tester-by-stagehand test:file login.txt
npx text-tester-by-stagehand test:watch
npx text-tester-by-stagehand test:debug tests/scenarios/login.txt

兼容性与路径

  • CLI 命令与原项目保持一致(test、test:file、test:case、test:watch、test:build、test:debug、config:view、config:validate)。
  • 生成的测试模板会从包路径导入运行器:import { TextTestRunner } from "text-tester-by-stagehand"
  • 调试器会优先从你的项目加载 tests/debug/runner-context.js,若不存在则回退到内置默认上下文。

发布与版本管理

  • 预置 prepublishOnly 脚本确保发布前测试通过。
  • 提供 release:* 脚本进行语义化版本升级与发布。
  • 建议在 CI 中设置 NPM_TOKEN 并执行 npm publish

迁移指南

  • 将原 bin/* 功能改为依赖此包。
  • 使用 npx text-tester-by-stagehand init 生成新的 config/*.yamlvitest.config.js 模板。
  • 将原测试场景、凭据示例等复制到新项目结构。

许可证

MIT