命令 运行 两个或多个测试
Command to run two or multiple tests
如何从一个 TestCafe CLI 命令 运行 两个或多个测试。
-t "Test name" 只接受一个测试名称。
要求:
想要 运行 从 .js 文件中可用的 80 个测试中选择 10 个。
是否有可用的特定命令或模式?
你是对的 -t
只会匹配测试名称,但是 -T
(大写)或 --test-grep
will allow you to match a pattern.
如果你想要 运行 的测试被分组在一个夹具中,你也可以 运行 一个 particular fixture with -f
or a set of fixtures 和 -F
来匹配一个模式(类似于 -T
)
您可以 运行 使用以下命令进行多个 TestCafe 测试,例如
// Matching different search patterns
testcafe -e -u chrome testcafe/tests -T 'pattern1|pattern2|pattern3'
// Matching similar search patterns L0 and L1 using regex
testcafe -e -u chrome testcafe/tests -T 'L[01]'
如何从一个 TestCafe CLI 命令 运行 两个或多个测试。
-t "Test name" 只接受一个测试名称。
要求:
想要 运行 从 .js 文件中可用的 80 个测试中选择 10 个。
是否有可用的特定命令或模式?
你是对的 -t
只会匹配测试名称,但是 -T
(大写)或 --test-grep
will allow you to match a pattern.
如果你想要 运行 的测试被分组在一个夹具中,你也可以 运行 一个 particular fixture with -f
or a set of fixtures 和 -F
来匹配一个模式(类似于 -T
)
您可以 运行 使用以下命令进行多个 TestCafe 测试,例如
// Matching different search patterns
testcafe -e -u chrome testcafe/tests -T 'pattern1|pattern2|pattern3'
// Matching similar search patterns L0 and L1 using regex
testcafe -e -u chrome testcafe/tests -T 'L[01]'