essential skills for tdd part 1

33
Essential TDD Bala Paranj www.rubyplus.com

Upload: bala-paranj

Post on 14-Aug-2015

51 views

Category:

Software


0 download

TRANSCRIPT

Essential TDDBala Paranj

www.rubyplus.com

Objective

Outline1. What? 2. Why? 3. Where do we begin? 4. What is the focus? 5. What are the artifacts? 6. When do you stop? 7. Tips

Problem Domain Analysis

Why?

Where do we begin?

Problem Statement

Sum a list of numbers

Understanding

Artifacts

• Create a diagram • Equation • Table

When do you stop?

Understanding

Tips

• Is there any assumptions • What are the assumptions

Tips

• Do not solve the problem

• Do not describe steps needed to get there

Tips

• Draw diagrams

• Use your own notation

• Express the problem statement as an equation

Problem Domain Analysis1. What? 2. Why? 3. Where do we begin? 4. What is the focus? 5. What are the artifacts? 6. When do you stop? 7. Tips

Solution Domain Analysis

Why?

Previous Phase

Understanding

Artifacts

1. Create a list of all foods 2. Create CSV header 3. Create a row for each food item 4. Save CSV file.

Retrieve list of all foods Create the csv file Create the csv header for each food in the list : create a row save the csv file

Algorithm

foods = Food.all csv = Csv.new(file_name) csv.header(header_values) for each food in foods csv.row(food) end csv.save

When do you stop?

Tips

• Solve the problem

• Describe steps needed to get there

Solution Domain Analysis1. What? 2. Why? 3. Where do we begin? 4. What is the focus? 5. When do you stop? 6. What are the artifacts? 7. Tips

Summary