【问题标题】:Firefox brower doesn't close when triggering Cypress tests via command line通过命令行触发赛普拉斯测试时,Firefox 浏览器不会关闭
【发布时间】:2020-09-02 15:43:43
【问题描述】:

目前我已经构建了三个简单的 cypress 测试,它们访问域 x 上的给定页面。

当我使用以下命令通过终端窗口触发测试套件时:

 ./node_modules/.bin/cypress run --browser firefox

第一个窗口打开并在 Firefox 浏览器中执行第一个测试,但是由于以下异常,其余测试无法执行:

Error: ffmpeg exited with code 1: pipe:0: Invalid data found when processing input

    at ChildProcess.<anonymous> (C:\Users\qauni\AppData\Local\Cypress\Cache\4.5.0\Cypress\resources\app\packages\server\node_modules\fluent-ffmpeg\lib\processor.js:182:22)
    at ChildProcess.emit (events.js:210:5)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)

进一步调查问题似乎是录音可能导致问题(因为赛普拉斯根据测试执行创建 mp4 文件):

Warning: We failed to record the video.

       This error will not alter the exit code.

            Error: ffmpeg exited with code 1: pipe:0: Invalid data found when processing input

注意:第一个成功的测试执行,但浏览器窗口仍然打开,有什么想法吗?

火狐版本:75.0, 柏树版本:4.5.0

谢谢

【问题讨论】:

    标签: automation automated-tests cypress browser-automation


    【解决方案1】:

    它对我来说工作得很好。如果你能分享你的简单代码 sn-p、cypress.json 配置和你正在做的任何其他东西,那就太好了......我会看看它,如果有任何问题,我会告诉你......

    【讨论】:

    • 感谢@Srnu Kodi 似乎firefox 无法关闭第一个测试实例的浏览器,即使将测试修改为简单打开google.com,目前我正在使用Windows 机器,您是否也在使用Windows 设备?
    • 不;我正在使用 Macbook。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-07
    • 1970-01-01
    • 2021-12-21
    • 1970-01-01
    • 2019-12-22
    • 1970-01-01
    相关资源
    最近更新 更多