wxa-runner README

The project's README from github.com/open-wxa/wxa-runner. As one markdown file: README.md.

wxa-runner

在普通浏览器里,用微信官方基础库运行小程序。用于本地调试和 E2E 自动化测试。

文档 · 在线预览 · English · 中文

npx wxa-runner dev ./dist/dev/mp-weixin   # 原生小程序目录,或 uni-app / Taro 编译产物
# → http://localhost:3000

在线预览:不用安装,在浏览器里打开一个 uni-app 小程序,看它在 web 上的渲染效果。 演示用查看器部署,接口都由 setup 用 mock 数据应答,投票、评论、发帖都能操作,刷新后恢复原样。

在线预览:uni-app 小程序的帖子详情页在浏览器里运行

它不替代开发者工具:预览、上传、真机调试仍然要用开发者工具。

文档

参与开发

从源码构建、运行示例和测试见 CONTRIBUTING.md。欢迎提交 Issue 和 PR。

致谢

许可证

MIT。内置基础库 wxa-baselib 是微信官方代码,版权归腾讯所有,不适用本项目的 MIT 协议。

wxa-runner (open-wxa/wxa-runner)

Searching Database…

What is this?It runs WeChat mini-programs in a regular browser using the official WeChat base library, for local debugging and Playwright E2E tests.
Is it an app or a library, or something else entirely?It is a developer tool. It runs your compiled mini-program output directly with the official base library instead of re-implementing it as H5, so rendering, components and lifecycle behave like on a real device.
How do I get it running?Follow the Quick Start in the docs to install the package, the WeChat base library and the compiler; the exact commands are not in the README excerpt. Then open a page in the browser, using the ?path= parameter to jump straight to it.
What do I need before I start?A mini-program project to run (compiled uni-app or Taro output), and Playwright if you want E2E tests. The README does not list version requirements.
Does it replace WeChat DevTools?No. Preview, upload and real-device debugging still need the official WeChat Developer Tools.
Can I run the tests in CI without installing WeChat DevTools?Yes. In CI it runs headless on Linux, and you do not need WeChat DevTools installed there.
Can I try it without installing anything?Yes. The online preview runs a uni-app mini-program in the browser with mock data; votes, comments and posts work and reset on refresh.
Does it hot-reload when I save?Yes. You can set breakpoints, inspect network requests and the DOM in Chrome DevTools, and changes hot-update after you save.
Can I skip login and mock native APIs in tests?Yes. In setup you can preset the login state, mock native APIs and intercept wx.request, so you do not have to change business code.
Can I share a result without sharing the source code?Yes. The viewer runs a mini-program without its source in the browser and can export it as a static site to send to others.
Creator
open-wxa
Size
2 MB
Stars
945
Age
22d
Commits · 90 Days