在我的TestCafe的测试文件夹下,只有一个文件被执行。

问题描述 投票:0回答:1

我有多个 test_*.js 文件下 /testcafe/tests/文件夹。 当从命令行或通过Visual Studio执行TestCafe时,只有一个文件被执行......为什么会这样?

  • 测试(文件夹)
    • test_somefilename.js,somefilename.js
    • test_someOtherfilename.js。
    • test_onlyfileexecuted.js。
    • test_anotherfilename.js

当运行下面的命令时,只有1个文件被执行。曾经 执行。

testcafe <pathToTestFolder>/tests/*.js

这将是 只是 执行过 test_onlyfileexecuted.js

为什么? 我可以手动输入命令执行每一个文件,TestCafe工作得很完美,但是当做glob模式时,发现只有这些测试被执行了......很困惑。

testing automation automated-tests e2e-testing testcafe
1个回答
4
投票

只要运行 testcafe {browser} <pathToTestFolder>/tests/ (没有*.js),Testcafe会自动获取该目录下的所有测试。

© www.soinside.com 2019 - 2024. All rights reserved.