azure - 如何在 Azure Pipeline 中调试 Playwright e2e 测试?
问题描述
到目前为止,我的申请有 3 个阶段:staging
、testing (e2e)
、production
。
- 和阶段是经典的发布管道
staging
。production
- 该
testing
阶段使用与该阶段相同的管道代理staging
,因此在同一台服务器上运行。但它不使用任何工件,它只是在staging
可以访问服务器的公共 url 上运行 e2e 测试。
当我通过 ssh 连接自己并sudo npx playwright test --browser=all
在 e2e 文件夹中手动运行时,它像这样开始,然后在没有任何错误消息的情况下结束:
Using config at /home/user/frontend/tests/e2e/playwright.config.js
Running 3 tests using 1 worker
但是当我在管道中做同样的事情时(1. 转到 e2e 文件夹,2. 使用相同的命令运行测试),我得到一个毫无意义的错误,我不知道该怎么处理它。
2021-09-20T07:33:19.4386925Z ========================== Starting Command Output ===========================
2021-09-20T07:33:19.4423536Z [command]/usr/bin/bash --noprofile --norc /opt/vsts-agent-linux/_work/_temp/d25bd1f8-b4aa-4f03-baa9-632f7181bc85.sh
2021-09-20T07:33:50.0893773Z ##[error]Bash exited with code '1'.
有什么建议么?
解决方案
推荐阅读
- python - tkinter 用 grid() 对齐框架内的按钮
- d3.js - D3 如何进一步传递 Promise.all 数据?
- python - 如何在moviepy中循环播放mp4文件?
- python - python在监听时更改websocket参数
- sql - 使用从另一个表中选择的数据为一个表创建一个新列
- reactjs - 升级到最新版本时的开玩笑错误 - 工作进程未能正常退出
- assembly - 装配体在打印消息时跳过第一个符号
- java - 使用 Java OpenCV 计算对象
- javascript - 执行多重排序的函数不会产生排序的数据
- java - 为什么 Maven Tycho 在 toolchains.xml 中找不到正确的 JDK?