Configuration 运行使用配置文件设置的测试用例

Configuration 运行使用配置文件设置的测试用例,configuration,automated-tests,e2e-testing,web-testing,testcafe,Configuration,Automated Tests,E2e Testing,Web Testing,Testcafe,我在命令提示符下运行测试用例(typescripts文件),那里只提供浏览器选择和并发数等设置。但是我想使用TestCafe配置文件TestCafe.js中提到的公共设置。 有人可以帮助我使用示例testcafe配置文件,以及如何执行testcases以使用配置文件中提到的设置吗 const createTestCafe = require('testcafe'); createTestCafe('localhost', 1337,1338) .then(tc=>{ testca

我在命令提示符下运行测试用例(typescripts文件),那里只提供浏览器选择和并发数等设置。但是我想使用TestCafe配置文件TestCafe.js中提到的公共设置。 有人可以帮助我使用示例testcafe配置文件,以及如何执行testcases以使用配置文件中提到的设置吗

const createTestCafe = require('testcafe');

createTestCafe('localhost', 1337,1338)
.then(tc=>{
    testcafe= tc;
    const runner=testcafe.createRunner();
    return runner
      .browsers(['chrome'])
      .concurrency(3)
      .run();
});

在测试脚本所在的同一目录中创建.testcaferc.json配置文件。TestCafe将找到配置文件并自动使用它。您不必在编程接口中指定它

我建议您参考描述其选项的主题。您可以在中找到完整的配置文件示例