【问题标题】:Cypress and running just the files specified in testFiles section of cypress.json赛普拉斯并仅运行 cypress.json 的 testFiles 部分中指定的文件
【发布时间】:2021-06-13 22:41:03
【问题描述】:

查看这篇文章 (Cypress - How can I run test files in order),我在 cypress.json 的 testFiles 下指定了几个脚本,但是使用 npm run cypress 打开 Cypress 仍然会显示我的 repo 中的所有脚本并且没有任何反应.

有没有办法/技巧来 (a) 在 UI 中自动运行 cypress.json 中指定的文件,以及 (b) 一种“切换回”到 repo 中所有文件的方法(因为我有一些划痕我用来隔离测试功能和最终将添加到列表中的其他测试的文件)

我的 cypress.json 中的部分看起来像

"testFiles:" :[
    "/venueadmin/events/venueAdminCreateEvent.spec.js",
    "/renter/renterInvalidLogin.spec.js",
    "/renter/renterSignUp.spec.js"
]

等等

【问题讨论】:

    标签: cypress


    【解决方案1】:

    想通了。有一个重复:

    另外,如果脚本名称前面有斜线需要删除

     "testFiles" :[
        "venueadmin/events/venueAdminCreateEvent.spec.js",
        "renter/renterInvalidLogin.spec.js",
        "renter/renterSignUp.spec.js",
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-10-26
      • 1970-01-01
      • 1970-01-01
      • 2022-09-30
      • 1970-01-01
      • 2021-12-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多