当无头运行 Cypress 时,我可以console.log使用DEBUG环境变量查看测试中的前端代码的输出,例如:
DEBUG='cypress:launcher' npx cypress run --browser chrome
Run Code Online (Sandbox Code Playgroud)
但是,我还没有找到任何类似的方法来查看cy.log无头运行时赛普拉斯测试代码的输出。即使DEBUG='cypress:*'我看不到它们 - 它们似乎只在交互界面中可见。感觉必须有某种方法可以cy.log无头查看输出 - 有人可以帮忙吗?
cypress ×1