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'; // first 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 first 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/
小编说
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。