Web自动化测试工具调研

背景

Web自动化测试越来越被重视, 因为现在Web已经是工程化的状态。 如何通过工具测试, 保证Web开发的质量,提升开发效率,是Web工具的诞生的来由。

 

Web测试分为以下几个方面:

1、 界面测试 测试界面是否正常,这是前端测试最基础的环节。

2、 功能测试 测试功能操作是否正常,由于涉及交互,这部分测试比界面测试会更复杂

3、 性能测试 页面性能越来越受到关注,并且性能需要在开发过程中持续关注,否则很容易随着业务迭代而下降。

4、 安全性测试 测试Web界面和WebServer的安全性, 这里有专业工具(Nessus WebInspect)。不是本文调研点。

5、 单元测试 这个测试在其它语言领域已经比较成熟, 在Web领域对一些只适应用一些通用性较强的库和框架。

6、 易用性测试 测试Web界面是否容易被用户使用。一般人为参与更加直接有效,不推荐工具。

7、 兼容性测试 测试多种浏览器访问的正常性。

 

部分分类来源于:

http://www.open-open.com/lib/view/open1436021333747.html

 

调研

下面结合测试功能点,汇总各种测试需求以及测试工具。

分类工具URL描述
界面测试PhantomCSShttps://github.com/Huddle/PhantomCSS

Visual/CSS regression testing with PhantomJS

CSS regression testing. A CasperJS module for automating visual regression testing with PhantomJS 2 or SlimerJS and Resemble.js.

界面测试

page-monitor

https://github.com/fouber/page-monitor

capture webpage and diff the dom change with phantomjs

功能测试phantomjshttp://phantomjs.org/

PhantomJS is a headless WebKit scriptable with a JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.

对于web测试、界面、网络捕获、页面自动化访问等等方面可以说是信手拈来。百度在此平台上做了不少实践。

功能测试casperjs

http://casperjs.readthedocs.io/en/latest/

http://casperjs.org/

casperjs是对PhantomJS的封装,提供了更加易用的API, 增强了测试等方面的支持。
功能测试

SlimerJS

http://www.slimerjs.org/index.htmlSlimerJS is similar to PhantomJs, except that it runs on top of Gecko, the browser engine of Mozilla Firefox, instead of Webkit, and is not yet truly headless.
功能测试

TestCafe

https://testcafe.devexpress.com/

Functional Web Testing MADE EASY

性能测试Phantomashttps://github.com/macbre/phantomasPhantomJS-based web performance metrics collector and monitoring tool
单元测试

Karma和Jasmine

http://blog.fens.me/nodejs-karma-jasmine/

Nodejs领域: Jasmine做单元测试Karma自动化完成单元测试

https://jasmine.github.io/2.5/introduction

Sinon -- 打桩框架

Mocha -- 测试框架

Chai -- 测试框架

 单元测试 QUnit http://qunitjs.com/ QUnit is a powerful, easy-to-use JavaScript unit testing framework. It's used by the jQuery, jQuery UI and jQuery Mobile projects and is capable of testing any generic JavaScript code, including itself!
兼容性测试seleniumwww.seleniumhq.org

selenium可以自动化的获取多个浏览器下的截图,前端工程师来说还可以借助Node的webdriver (http://webdriver.io/)来轻松开发测试脚本。还可以用:http://nightwatchjs.org/

兼容性测试dalekjshttp://dalekjs.com/
Automated cross browser testing with JavaScript!
Exterminate all the bugs!

自动化测试管理工具(Test Runner): http://karma-runner.github.io/1.0/index.html (google angular出品)

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值