testcafe 介绍
DevExpress testcafe 是一款基于 Web 的测试框架,它能对 Web 页面 的 用户 界面和通过 html5、css 和 JavaScript 渲染的应用进行测试。?
特点
1. 支持 JavaScript,TypeScript
2.使用便捷性,入门便捷性,相差不大。
3.作为测试框架完备性。 testcafe 本身就是 一个 完整的测试框架了(提供了Cases的管理,运行,失败 自动 重跑, 错误 自动 截图,并发等)
4. testcafe debug模式,通过 代码 配置或运行时设置,可以控制执行过程中失败时进入调试模式
安装
testcafe 只需要全局安装这个库,并不需要安装lite chrome等等。还有一点就是它很具有前瞻性的 支持 了ts和众多es6,es7的特性。??
npm install -g testcafe
使用
import { Selector } from ' testcafe '; // f irs t import testcafe selectors
fixture `Getting Started`// declare the fixture
.page `https://devexpress.github.io/ testcafe /example`; // specify the start page
//then create a test and place your code there
test('My f irs t test',async t => {
await t
.typeText('#developer-name','John Smith')
.click('#submit-button')
// Use the assertion to check if the actual header text is equal to the expected one
.expect(Selector('#article-header').innerText).eql('Thank you,John Smith!');
});
网站地址 : https://devexpress.github.io/testcafe/
GitHub: https://github.com/DevExpress/testcafe
网站描述: Node.JS编写的Web端UI 自动 化测试框架
TestCafe官方网站
官方网站: https://devexpress.github.io/testcafe/
如果觉得 网站内容还不错,欢迎将 网站 推荐给程序员好友。