Skip to content

Instantly share code, notes, and snippets.

View yfractal's full-sized avatar
🎯
Focusing

Mike Yang yfractal

🎯
Focusing
View GitHub Profile
@yfractal
yfractal / test-introduction.md
Last active June 2, 2016 03:10
Testing Introduction

Test introduction

If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization. -- Gerald Weinberg, Weinberg’s Second Law

自动化测试的目的、意义

Test automation

  1. 节省时间 -- 回归测试
  2. 可重复
  3. 更精确
  4. 更好的维护性
# coding: utf-8
class Board
def initialize(c, r)
@column = c
@row = r
@board = c.times.map { Array.new(r,false)}
end
def fill!(c, r)
@board[c][r] = true;