最近一个爱尔兰的同事介绍了我们agile模式下的automation的工作机制,提到了测试金字塔的概念。值得推敲。

其中主要的思想就是,针对automation工作我们更多的focus点应该是Unit test,对于所有的UI Automation工作所在的级别比较高,但是我们更应该的注意的是所有的UI Cover的点其实都应该在Unit Test中Cover到的,如何UI 测试中出现了任何问题其实都可以追究到Unit Testing没有Cover到。体现了Unit Testing的重要性。

Unit Test应该做的比UI Automation和Service Automation做的更多。

如下是他的讲解:(http://martinfowler.com/bliki/TestPyramid.html)其实很值得一提。有种醍醐灌顶的感觉。。。

The test pyramid is a concept developed by Mike Cohn, described in his book Succeeding with Agile. Its essential point is that you should have many more low-level unit tests than high level end-to-end tests running through a GUI.

For much of my career test automation meant tests that drove an application through its user-interface. Such tools would often provide the facility to record an interaction with the application and then allow you to play back that interaction, checking that the application returned the same results. Such an approach works well initially. It's easy to record tests, and the tests can be recorded by people with no knowledge of programming.

But this kind of approach quickly runs into trouble, becoming an ice-cream cone. Testing through the UI like this is slow, increasing build times. Often it requires installed licences for the test automation software, which means it can only be done on particular machines. Usually these cannot easily be run in a "headless" mode, monitored by scripts to put in a proper deployment pipeline.

Most importantly such tests are very brittle. An enhancement to the system can easily end up breaking lots of such tests, which then have to be re-recorded. You can reduce this problem by abandoning record-playback tools, but that makes the tests harder to write. [1] Even with good practices on writing them, end-to-end tests are more prone tonon-determinism problems, which can undermine trust in them. In short, tests that run end-to-end through the UI are: brittle, expensive to write, and time consuming to run. So the pyramid argues that you should do much more automated testing through unit tests than you should through traditional GUI based testing.

The pyramid also argues for an intermediate layer of tests that act through a service layer of an application, what I refer to asSubcutaneousTests. These can provide many of the advantages of end-to-end tests but avoid many of the complexities of dealing with UI frameworks. In web applications this would correspond to testing through an API layer while the top UI part of the pyramid would correspond to tests using something like Selenium or Sahi..

The test pyramid comes up a lot in Agile testing circles and while its core message is sound, there is much more to say about building a well-balanced test portfolio. In particular a common problem is that teams conflate the concepts of end-to-end tests, UI tests, and customer facing tests. These are all orthogonal characteristics. For example a rich javascript UI should have most of its UI behavior tested with javascript unit tests using something like Jasmine. A complex set of business rules could have tests captured in a customer-facing form, but run just on the relevant module much as unit tests are.

In particular I always argue that high-level tests are there as a second line of test defense. If you get a failure in a high level test, not just do you have a bug in your functional code, you also have a missing unit test. Thus whenever you fix a failing end-to-end test, you should be adding unit tests too.

敏捷开发中的测试金字塔(转)相关推荐

  1. 如何在敏捷环境中使用测试指标

    目录 翻译内容 What Is Agile Testing and an Agile Test Plan? 什么是敏捷测试和敏捷测试计划? Agile Testing Metrics 敏捷测试指标 B ...

  2. 独立测试团队在敏捷开发中的几个特别实践

    [原文发表在https://hespr.blogspot.jp/2009/03/blog-post.html 写在2009年3月 最近发现被人盗版了多处, 重新发布在CSDN] 最近读了<我和敏 ...

  3. 敏捷开发中的可用性测试

    陈 序明, 资深研发工程师及售前工程师, IBM 王 建芳, 资深软件测试工程师, IBM 李 雨恭, 软件工程师, IBM 简介: 近年来有两个词语在软件行业迅速"走红",一个是 ...

  4. 研发流程在敏捷开发中的详解

    在传统的软件研发模型中,从提出需求到最后交付,时间周期较长.瀑布模型遵循需求分析.设计.编码.集成.测试.维护六个步骤进行.一旦需求发生变化,不仅浪费前期投入,还不易于调整. 1. 敏捷开发是什么 在 ...

  5. 敏捷开发中的Code Review

    敏捷开发中的Code Review 一些敏捷团队在实施敏捷开发中忙于编码.忙于Unit Test.忙于沟通.忙于Build等,虽然也有编码审核阶段,但大都浮于表面,流于形式,效果不佳.本文结合实践,介 ...

  6. [转]敏捷开发中编写高质量Java代码

    本文转自:http://dev.yesky.com/103/11164603.shtml 敏捷开发的理念已经流行了很长的时间,在敏捷开发中的开发迭代阶段中,我们可以通过五个步骤,来有效的提高整个项目的 ...

  7. [转]敏捷开发之Scrum扫盲,及敏捷开发中XP与SCRUM的区别

    敏捷开发之Scrum扫盲篇 现在敏捷开发是越来越火了,人人都在谈敏捷,人人都在学习Scrum和XP- 为了不落后他人,于是我也开始学习Scrum,今天主要是对我最近阅读的相关资料,根据自己的理解,用自 ...

  8. 敏捷开发中史诗故事与用户故事的颗粒度

    作者:陈勇 出处:blog.csdn.net/cheny_com 用户故事的颗粒度一直是一个谈论已久的话题,但参加了很多研讨会,搜索了很多网络资源后发现一直没有定论,只好在这里原创一下. 前言:为何需 ...

  9. 敏捷开发中,团队成员认领的是任务还是用户故事?

    一次敏捷workshop上,有同学问:"敏捷软件开发中,团队成员自己主动认领的,是用户故事还是被分解成的任务?"同学们一时讨论热烈. 稍具敏捷开发实践经验的同学都应该知道,答案是- ...

最新文章

  1. 三十三、分治算法---汉诺塔问题
  2. mongo 3t 处理时间
  3. LVM的创建与快照和SSM存储管理器的使用
  4. Oracle CPU使用率过高问题处理
  5. .Net Core使用Ocelot网关(一) -负载,限流,熔断,Header转换
  6. 老师“鬼话”全曝光!哈哈哈哈哈哈全国的老师都这样吗?
  7. markdown编辑数学公式
  8. Java安全之数字证书
  9. 主数据——共享数据的核心,数据资产的灵魂
  10. js 生成二维码(qrcodejs)
  11. kvaser CANking怎么使用?如何使用 Kvaser 虚拟通道 ?
  12. lorawan和lora_用于物联网的LoRa和LoRaWAN
  13. wireshark TCP协议首选项配置详解
  14. 前端控制台返回406错误解决方法
  15. 高通骁龙845与骁龙710处理器参数对比分析
  16. 蝙蝠侠最新截图----光影的典型例证
  17. Timer定时器详解
  18. 土地经济学笔记第一部分
  19. 微信跳转外部浏览器下载app
  20. 名词解释---权益类资产

热门文章

  1. HTTP---Cookie
  2. Java数组去重的多种方法,[Java教程]JavaScript常见的五种数组去重的方式
  3. 摄像头拍摄后对图片进行图像处理-python(空域增强)
  4. 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器(及Windows 10无法找到SQL server配置管理器的解决方法)
  5. 舵机控制激光头(51单片机)
  6. 辗转相除求最大公约数最小公倍数 扩展欧几里得算法
  7. freebsd运行php,FreeBSD学习笔记16-FreeBSD下安装PHP
  8. jquery.js和jquery-1.4.2.min.js的区别
  9. mysql 语句账号注入_mysql中SQL语句的注入问题
  10. element-UI ,Table组件实现拖拽效果