【问题标题】:Failed Cypress test exit in 'bash exited with code 1' in Azure DevOpsAzure DevOps 中的“bash exited with code 1”中的 Cypress 测试退出失败
【发布时间】:2020-01-26 18:26:56
【问题描述】:

我已将赛普拉斯测试设置为在 Azure DevOps 中运行。我通过 yml 文件中的 CMD 命令运行测试,然后得到测试结果。当测试通过时,一切都按预期工作,并且测试结果显示在摘要中。当测试失败时,CMD 步骤失败并出现错误 ##[error]Bash exited with code '1' 并且不会填充测试结果。有没有办法在失败的测试中以 0 退出 bash?

【问题讨论】:

    标签: bash azure-devops cypress


    【解决方案1】:

    你可以让 bash 忽略这样的错误

    my-test-script || true
    

    查看答案Bash ignoring error for a particular command

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-09-25
      • 2021-03-08
      • 1970-01-01
      • 1970-01-01
      • 2020-06-28
      • 2022-08-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多