playwright/firefox本镜像为 Moon软件([] Playwright Firefox 浏览器自动化测试镜像,基于 Playwright 的 Firefox 浏览器自动化能力构建,并针对 Moon 软件的集成需求进行了兼容性优化。请注意:本镜像仅适用于 Moon 环境,官方 Playwright 团队镜像请参考:[]
提供在 Moon 软件平台中运行基于 Playwright 的 Firefox 浏览器自动化测试的执行环境,支持 Moon 调度、资源管理及分布式测试能力,用于 Web 应用的 Firefox 兼容性测试、自动化操作及回归验证。
通过 docker run 直接启动容器,执行测试脚本:
bashdocker run -d \ --name moon-playwright-firefox \ -e MOON_SERVER="[***]" \ # Moon 控制节点地址 -e TEST_TIMEOUT="300s" \ # 测试超时时间(可选) -v /local/test/scripts:/tests \ # 挂载本地测试脚本目录至容器内 /tests aerokube/moon-playwright-firefox:latest \ # 镜像名称(示例,需替换为实际镜像标签) npx playwright test /tests # 执行测试命令(根据脚本语言调整)
通过 docker-compose.yml 定义服务,集成至 Moon 测试环境:
yamlversion: '3.8' services: moon-firefox-test: image: aerokube/moon-playwright-firefox:latest # 镜像名称(示例) environment: - MOON_SERVER=[***] # Moon 控制节点地址 - BROWSER_CHANNEL=firefox # 指定浏览器通道(固定为 firefox) - PARALLEL_WORKERS=4 # 并行执行的测试工作进程数(可选) volumes: - ./test-scripts:/tests # 挂载测试脚本目录 - ./test-reports:/reports # 挂载测试报告输出目录 depends_on: - moon-agent # 依赖 Moon Agent 服务(根据 Moon 部署架构调整) command: npx playwright test /tests --reporter=html:/reports # 生成 HTML 报告
| 变量名 | 说明 | 默认值 |
|---|---|---|
MOON_SERVER | Moon 控制节点的访问地址(IP:端口或域名),用于注册容器至 Moon 集群。 | 无(必填) |
TEST_TIMEOUT | 单测试用例超时时间,格式支持 s(秒)、m(分钟),如 120s。 | 300s |
PARALLEL_WORKERS | 容器内并行执行的测试工作进程数,需根据容器资源(CPU/内存)调整。 | 2 |
PLAYWRIGHT_CONFIG | 自定义 Playwright 配置文件路径(容器内路径),如 /tests/playwright.config.ts。 | 无(使用默认配置) |
/tests),确保脚本可被 Playwright 识别。/reports),用于持久化保存测试结果(截图、录屏、HTML 报告等)。--cpus、-m 参数),避免因资源不足导致测试失败。


manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务