首页 > 解决方案 > 如何在 Azure Pipeline 中调试 Playwright e2e 测试?

问题描述

到目前为止,我的申请有 3 个阶段:stagingtesting (e2e)production

在此处输入图像描述

当我通过 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'.

有什么建议么?

标签: azureazure-devopsazure-pipelinese2e-testingplaywright

解决方案


推荐阅读