读书笔记 - How Google Test Software

标签: 读书 笔记 how | 发表时间:2013-05-18 16:42 | 作者:o2o_o2o
出处:http://blog.csdn.net

<How Google Test Software>(《谷歌如何测试软件》)的确为神秘谷歌公司揭开一层面纱,讲到了谷歌的代码文化和测试文化,讲到了角色划分,职责划分,测试种类划分,讲到优秀的不同角色的人应该具有什么样子的,讲到测试的创新和工具,还有大量的人物访谈。

这里的笔记主要包含:个人感兴趣的,值得备忘的,需要后续关注的东西记录。测试和质量都不仅仅是是测试人员的事情,还需要团队,公司的支持。

谷歌内部开发和测试角色和职责范围

The software engineer (SWE) is the traditional developer role. SWEs write functional code that ships to users. They create design documentation, choose data structures and overall architecture, and they spend the vast majority of their time writing and reviewing code. SWEs write a lot of test code, including test-driven design (TDD), unit tests, and, as we explain later in this chapter, participate in the construction of small, medium, and large tests. SWEs own quality for everything they touch whether they wrote it, fixed it, or modified it. That's right, if a SWE has to modify a function and that modification breaks an existing test or requires a new one, they must author that test. SWEs spend close to 100 percent of their time writing code.


The software engineer in test (SET) is also a developer role, except his focus is on testability and general test infrastructure. SETs review designs and look closely at code quality and risk. They refactor code to make it more testable and write unit testing frameworks and automation. They are a partner in the SWE codebase, but are more concerned with increasing quality and test coverage than adding new features or increasing performance. SETs also spend close to 100 percent of their time writing code, but they do so in service of quality rather than coding features a customer might use. 

The test engineer(TE) is related to the SET role, but it has a different focus. It is a role that puts testing on behalf of the user first and developers second. Some Google TEs spend a good deal of their time writing code in the form of automation scripts and code that drives usage scenarios and even mimics the user. They also organize the testing work of SWEs and SETs, interpret test results, and drive test execution, particularly in the late stages of a project as the push toward release intensifies. TEs are product experts, quality advisers, and analyzers of risk. Many of them write a lot of code; many of them write only a little.

测试组织结构和流程

测试尽早参与,各个环节参与,多Review文档,代码,架构。Code Review 是专门有一套Submit的流程。

高度自动化,强调持续集成。


测试分大中小测试,大中小范围、执行人、时间和要求不一样。



测试度(测试成熟度)的等级

Summary of Test Certified Levels
Level 1
Set up test coverage bundles.
Set up a continuous build.
Classify your tests as Small, Medium, and Large.
Identify nondeterministic tests.
Create a smoke test suite.

Level 2
No releases with red tests.
Require a smoke test suite to pass before a submit.
Incremental coverage by all tests >= 50%.
Incremental coverage by small tests >= 10%.
At least one feature tested by an integration test.

Level 3
Require tests for all nontrivial changes.
Incremental coverage by small tests >= 50%.
New significant features are tested by integration tests.

Level 4
Automate running of smoke tests before submitting new code.
Smoke tests should take less than 30 minutes to run.
No nondeterministic tests.
Total test coverage should be at least 40%.
Test coverage from small tests alone should be at least 25%.
All significant features are tested by integration tests.

Level 5
Add a test for each nontrivial bug fix.
Actively use available analysis tools.
Total test coverage should be at least 60%.

面试

面试测试的题目,看似简单,但需要优秀候选人更广泛更完备测试思维(挖掘更深更多方面的条件、情况),敢于反思、质疑问题,敢于多一些建议。



ACC (Attribute, Component, Capability)

可用于风险分析,用例设计,用例指派,探索式测试。个人十分行赏。


Example: Determining Attributes, Components, and apabilities for Google+

ACC can be performed quickly in a document, spreadsheet, or even on a napkin! Here is an abbreviated example of ACC for Google+. 


Google+ Attributes (derived exclusively by watching an executive discuss Google+)

Social: Empowers users to share information and what they're up to.
Expressive: Users can express themselves through the features.
Easy: Intuitive. Easy to figure out how to do what you want to do. 
Relevant: Shows only information the user cares about.
Extensible: Capable of integrating with Google properties and third-party sites and applications.
Private: Users' data won't be shared. 

Google+ Components (derived from architecture documents)
Profile: Information and preferences for the logged in user.
People: Profiles that the user has connected with.
Stream: Aranked stream of posts, comments, notifications, photos, and so on. 
Circles: Groups to put contacts into "friends," "co-workers," and so on.
Notifications: Indicators for when you are mentioned in a post.
Interests or +1: Indication for user likes.
Posts: Buzz posts from the users and their contacts.
Comments: Comments on posts, photos, videos, and so on.
Photos: Photos uploaded by the users and their contacts.

• Google+ Capabilities:
Profile:
Social: Share profiles and preferences with friends and contacts.
Expressive: Users can create an online version of themselves.
Expressive: Personalize your experience with Google+.
Easy: Easy to enter and update information and have it propagate.
Extensible: Serves profile information to applications with appropriate access.
Private: Enables a user to keep private data private. 
Private: Share data only with approved and appropriate parties.

People:
Social: Users can connect with users' friends, coworkers, and families.
Expressive: Profiles of other users are personalized and easily distinguishable.
Easy: Provides tools to easily manage a user's contacts.
Relevant: Users can filter their contacts based on criteria for relevance.
Extensible: Serves contact data to authorized services and applications.
Private: Keeps data about a user's contacts private to approved parties.

Stream:
Social: Informs the users of updates from their social networks.
Relevant: Filters for updates the user would be interested in.
Extensible: Serves stream updates to services and applications.

Circles:
Social: Groups contacts into circles based on social context.
Expressive: New circles can be created based on the context of the user.
Easy: Facilitates adding, updating, and removing contacts to and from circles.
Easy: Facilitates creating and modifying circles.
Extensible: Serves data about circles for use to services and applications.

Notifications:
Easy: Presents notifications concisely.
Extensible: Posts notifications for use by other services and applications.

Hangouts:
Social: Users can invite their circles to hang out.
Social: Users can open hangouts to the public.
Social: Others are notified of hangouts they access in their streams.
Easy: Hangouts can be created and participated in within a few clicks.
Easy: Video and audio inputs can be disabled with a single click.
Easy: Additional users can be added to an existing hangout.
Expressive: Before joining a hangout, users can preview how they will appear to others.
Extensible: Users can chat through text while in a hangout.
Extensible: Videos from YouTube can be added to a hangout.
Extensible: Devices can be configured and adjusted in Settings.
Extensible: Users without a webcam can participate in hangouts through audio.
Private: Only invited guests can access a hangout.
Private: Only invited guests are notified of a hangout.

Posts:
Expressive: Expresses the thoughts of the user through Buzz.
Private: Posts are restricted to the intended audience.

Comments:
Expressive: Expresses the thoughts of the user through comments.
Extensible: Posts data on comments for use by other services and applications.
Private: Posts are restricted to the intended audience.

Photos:
Social: Users can share their photos with their contacts and friends.
Easy: Users can easily upload new photos.
Easy: Users can easily import photos from other sources.
Extensible: Integration with other photo services.
Private: Photos are restricted so that they're only visible to the intended audience.

谷歌测试工具

谷歌一系列的测试工具,比如,BITE,的确是非常的吸引人,提高测试效率,保持尽量少的中断。有机会可以试试,很多功能已经开源。

Google Test Case Manager (GTCM) - 测试用例管理

Buganizer - 缺陷管理

Google Feedback - 方便报缺陷的系统

Quality Bots Experiment - 对比系统

对比页面变化,在Chrome的浏览器的测试,每个版本浏览器都需要对比N个网页确认没有破坏掉什么功能。
http://code.google.com/p/qualitybots/

BITE

BITE stands for Browser Integrated Test Environment. The Browser Integrated Testing Environment, or BITE, is an open source Chrome extension (http://code.google.com/chrome/extensions/index.html)

  • Report a bug
  • Viewing bugs
  • Record / Playback
  • Executing Manual and Exploratory Tests with BITE

Google Test Analytics - Risk Analysis

Support ACC - Link test case / bugs
we're open sourcing Test Analytics (http://code.google.com/p/test-analytics/), a tool built at Google to make generating an ACC simple.

Record/Playback Framework

Record/Playback Framework (RPF) works in the Browser Integrated Test Environment (BITE) (http://googletesting.blogspot.com/2011/10/takebite-out-of-bugs-and-redundant.html).


SETs 和 TEs的区别

SETs' roles and TEs' roles are related but different in fundamental ways. I've been both and managed both. Look at the lists that follow and find which description most fits you—maybe you should switch roles.

You might be an SET if

  • You can take a specification, a clean whiteboard, and code up a solid and efficient solution. 
  • When you code, you guiltily think of all the unit tests you should be writing. Then, you end up thinking of all the ways to generate the test code and validation instead of hand crafting each unit test. 
  • You think an end user is someone making an API call.
  • You get cranky if you look at a poorly written API documentation, but sometimes forget why the API is interesting in the first place. 
  • You find yourself geeking out with people about optimizations in code or about looking for race conditions.
  • You prefer to communicate with other human beings via IRC or comments in check-ins.
  • You prefer a command line to a GUI and rarely touch the mouse.
  • You dream of machines executing your code across thousands of machines, beating up algorithms, and testing algorithms—showing their correctness through sheer numbers of CPU cycles and network packets.
  • You have never noticed or customized your desktop background.
  • Seeing compiler warnings makes you anxious.
  • When asked to test a product, you open up the source code and start thinking about what needs to be mocked out.
  • Your idea of leadership is to build out a great low-level unit test framework that everyone leverages or is highly exercised millions of times a day by a test server.
  • When asked if the product is ready to ship, you might just say, "All tests are passing."

You might be a TE if

  • You can take existing code, look for errors, and immediately understand the likely failure modes of that software, but don't much care about coding it from scratch or making the change. 
  • You prefer reading Slashdot or News.com to reading other people's code all day.
  • You read a spec for a product that is half-baked, you take it upon yourself to fill in all the gaps, and just merge this into the document.
  • You dream of working on a product that makes a huge impact on people's lives, and people recognize the product you work on.
  • You find yourself appalled by some websites' UI and wonder how they could ever have users.
  • You get excited about visualizing data.
  • You find yourself wanting to talk to humans in meat space.
  • You don't understand why you have to type "i" to start typing in a certain text editor.
  • Your idea of leadership is nurturing other engineers' ideas and
  • challenging their ideas with an order of magnitude more scale.
  • When asked if the product is ready to ship, you might say, "I think it's ready."

It is important for testers to figure out who they are. Often, TEs are simply seen as SETs who don't code as much or as well. The reality is that they see things that people with their head in the code all day will never see. SETs should also realize they aren't TEs and let go of any guilt or pressure to find UI issues or think about the system overall or competitive products; focus instead on high quality, testable, and reusable modules and amazing automation. 
It takes a diverse family of testers to raise an amazing product.



作者:o2o_o2o 发表于2013-5-18 16:42:30 原文链接
阅读:0 评论:0 查看评论

相关 [读书 笔记 how] 推荐:

读书笔记 - How Google Test Software

- - CSDN博客研发管理推荐文章
(《谷歌如何测试软件》)的确为神秘谷歌公司揭开一层面纱,讲到了谷歌的代码文化和测试文化,讲到了角色划分,职责划分,测试种类划分,讲到优秀的不同角色的人应该具有什么样子的,讲到测试的创新和工具,还有大量的人物访谈. 这里的笔记主要包含:个人感兴趣的,值得备忘的,需要后续关注的东西记录.

How to configure autoscaling on docker swarm? - Stack Overflow

- -
This will involve a lot of scripting but the idea is to monitor the cluster for CPU / Memory / Network usage (with.

《精力管理》读书笔记-1

- 黎明 - 战隼的学习探索
这本书是我前几天阅读的,这是当时的阅读记录:. #每天一本书#,70天,2011年2月25日,阅读书籍《精力管理》这本书的理念不错,但内容水分很大. 但这个理论正好给自己的时间管理观点和规划做个补充,评价3.5分. 时间管理应该根据自己的精力进行安排和调整,周期性地补充精力,来平衡精力消耗. 需要对你的精力进行海战略性的规划和应用,并把它当成一种习惯.

分享读书笔记 Data Mining Concepts and Techniques

- redhobor - BlogJava-首页技术区
Data Mining涵盖的内容非常多,学着学着就走进乱石阵,看不到大的picture了,Data Mining Concepts and Techniques是本经典的好书,虽然有些细节并不详尽,(如果详尽就变成圣经了)可以用它来把data mining的知识点结成一张网. 它包括数据的预处理,frequent patterns,decision tree, netural network, regression, clustering, time series等等很多方面.

读书笔记:少有人走的路

- zhoujg - 博客园-周金根
       记得好像是五六年前在公司投稿后得到一本书,这本书叫做《少有人走的路》. 当时看了一下,简单翻阅之后发现看不下去了,于是一直搁置着. 后来有同事知道我有这本书,她们想我借阅,并且说是听别人介绍才知道这本书的. 我也不知道她们后来得了之后有什么感受,反正还给我之后我还是放着. 这本书于是就静静的在我这个搁置了好几年.

云计算读书笔记(二)

- Gabriel - 博客园-首页原创精华区
google云计算服务包括:google文件系统GFS,分布式计算编程模形MapReduce,分布式锁服务Chubby,分布式结构化数据表Bigtable,分布式存储系统Megastore以及分布式监控系统Dapper等. GFS提供了海量数据的存储和访问能力. 分为三类角色,client(客户端),Master(主服务器)和Chunk Server(数据块服务器).

《思维导图》读书笔记

- Spectrophobia. - 读书笔记
今天分享的图书《思维导图》英国著名心理学家东尼·博赞在研究大脑的力量和潜能过程中,发现伟大的艺术家达·芬奇在他的笔记中使用了许多图画、代号和连线. 他意识到,这正是达芬奇拥有超级头脑的秘密所在. 在此基础上,博赞于19世纪60年代发明了思维导图这一风靡世界的思维工具. 这本书中过于夸大思维导图的作用而且废话过多,没有必须细读.

《百问知识管理》读书笔记

- - 海涛的成长碎碎念
当时是为了买给妹子买 @秋叶 的大项目售前的那本书的,为了凑单免运费顺手把这本书也扔到了购物车里面,这也算是真爱了,支持大叔的同时还不忘支持下大叔的红颜知己,整本书大概花了两趟地铁的时间加上晚上睡觉前的一个多小时的时间看完的,不是很厚的一本很实用的工具手册. 公司部门在年中开会的时候提到了知识管理这块的一些东西,因为之前我一直在做个人知识管理的一些东西,业界除了一些企业知识管理的内容,所以部门知识管理这块就交给我在负责了,因为对企业知识管理大多了解都是理论上的,实践性的东西还真没怎么做过,还是有点发虚的,读完这本书算是松了口气.

《精益创业》读书笔记

- - CSDN博客推荐文章
        创业的过程是否可以总结、规范、提炼出共性和成功的方法. 《精益创业》无疑是这样的一本书,书中提到的很多创业观点其实平时我也领悟过,但是能以书面、可描述的语言总结出来,这是作者的厉害之处.         精益创业 (Lean Startup) 总结起来就是用3个动词驱动3个名词的轮回迭代过程:IPD -> BML ,即: .

How To Be Successful (如何成功)- Sam Altman

- -
I’ve observed thousands of founders and thought a lot about what it takes to make a huge amount of money or to create something important. Everything here is easier to do once you’ve already reached a baseline degree of success (through privilege or effort) and want to put in the work to turn that into outlier success.