如果意图是维护无代码测试,那么 TestCafe Studio 无代码测试和实现页面模型的混合是否相互排斥?

Is the mix of TestCafe Studio codeless tests and implementing a Page Model mutually exclusive if the intent is to maintain codeless tests?

这是一篇 TestCafe Best Practice to "use the Page Model in your tests". The TestCafe Page Model 文章,指导用户使用页面模型模式通过在 .js 文件中使用 JavaScript 编写测试来创建测试。

同时,TestCafe Studio支持创建*.testcafe codeless tests.

在页面模型中使用 JavaScript 似乎意味着在使用“无代码”测试时尝试实现页面模型 目的是将它们保持为无代码 效果不会很好。也就是说,如果记录器用于创建旨在立即转换为 JavaScript 的无代码测试,然后对其进行切片和切块以重新排列以实现页面模型,那就是另一回事了。我假设 Studio 为无代码测试生成 JavaScript 'under the covers',但如果意图是将测试保持为无代码,那么本质上,这个 JavaScript 应该被认为是不可编辑的。

TestCafe Studio 无代码测试和实现页面模型的混合是否相互排斥如果意图是维护无代码测试

TestCafe Studio 可用于在 coded (.js/.ts) and codeless (.testcafe) formats. However, PageModel 中记录测试,作为单独的文件,仅支持编码测试。 对于无代码测试,您可以使用 Define Element Selector steps to store selectors separately from test actions within one test. Copy/paste actions are available for all test steps and can be used in this case to share stored selectors between different test files. Also you can convert 无代码文件来使用 PageModel 方法组织测试。