zoukankan      html  css  js  c++  java
  • 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 描述
    界面测试 PhantomCSS https://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

    功能测试 phantomjs http://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.html SlimerJS 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

    性能测试 Phantomas https://github.com/macbre/phantomas PhantomJS-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!
    兼容性测试 selenium www.seleniumhq.org

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

    兼容性测试 dalekjs http://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出品)

  • 相关阅读:
    SV——override
    SV——声明和例化
    SV——automatic
    SV——类型转换$cast
    C++——局部变量、全局变量、静态变量与动态对象的性质(转载)
    C++——动态分配内存
    异步复位,同步释放(转)
    异步复位中的recovery time和removal time(转)
    UVM——virtual sequencer和virtual sequence
    软件工程 实践者的研究方法 第38章答案
  • 原文地址:https://www.cnblogs.com/lightsong/p/6201133.html
Copyright © 2011-2022 走看看