test-driven development with lego mindstorms ru cindrea @ru_altom maaret pyhäjärvi @maaretp

30
Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Upload: thalia-pyne

Post on 15-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Test-Driven Development with Lego Mindstorms

Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Page 2: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Iteration: Design test –

implement - Test

Structure of the Workshop

What is Test-Driven Development

Iteration: Design test –

implement - Test

Retrospective

Mindstorms & ”IDE”

Lessons and Experiences on TDD

Page 3: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Product Vision

Build the software for a robot that moves to pick up target

objects

Page 4: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Meet Gripp3r - Adapted

• Programmable central unit – without the controller that we’re building

• Two motors for wheels• One motor for claw• IR sensor• Color sensor• Touch sensor

• Commander IDE

Page 5: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Backlog of Identified Needs

• Move around• Take object

This is what we think we can do with it

Page 6: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp
Page 7: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Info: motors, sensors & portsSENSOR PORTTouch 1Nothing 2Color 3Infrared 4

MotorsClaw ALeft wheels BRight wheels C

Page 8: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp
Page 9: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Constraint: Cannot use

this.

We’ve tried it out and

feel it’s too inaccurate to

control

Page 10: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Constraint: Don’t use these.

Page 11: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

SESSION: 1ST TEST

Constraint: No joystick due to inaccuracy

Page 12: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Backlog of Identified Needs

• Move around• Take object

This is what we think we can do with it

Page 13: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Lab Session Setup

Integration Area- Time-limited access

Development Area- Define one (failing) test that

defines a feature- Implement to pass

- Go to Integration Area to test

-Refactor for space in Commander IDE

Page 14: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Rules around the Integration Area

• Setup time + 30 seconds to test• Entry criteria: you need your test on paper

defined. You can only test the test you have defined.

• You’re testing the implementation and the test could also fail

Page 15: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Planning iteration #1

• Feature: move around• Small steps, one test to drive your idea of

what would be the smallest value to show

Page 16: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Retrospective Time!

Page 17: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

SESSION: REAL ITERATIONS WITH CYCLES OF TDD

Start again with focus on smallest possible additions.

Quality of your tests should be your main discussion point in teams.

Page 18: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Lab Session Setup

Integration Area- Time-limited access

- Queue, run previous + new tests for 30 sec and let the

next group in

You can visit the integration area many times in an iteration.

Entry criteria: you need your test on paper defined. Quality of your tests should be your main responsibility. You can only test the tests you have defined.

Page 19: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Backlog of Identified Needs

• Move around• Take object

This is what we think we can do with it

Page 20: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Retrospective Time!

Page 21: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

SESSION: NEED TO REFACTOR

Constraints on Joystick removed

Page 22: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Backlog of Identified Needs

• Move around• Take object

This is what we think we can do with itAfter refactoring, see

that your tests still run or update them

Page 23: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Retrospective Time!

Page 24: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

SESSION: SPIKE TO LEARN ABOUT THE SENSORS

Remember: You will not see the robot when in live environment, only in test environment

New info: White objects are dangerous

to humans

Page 25: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Spike – Learn by Exploring

Spike solution is a very simple program to explore potential

solutions. Their goal is to reduce risk of a

technical problem or increase reliability of a user story’s estimate.

Page 26: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

SESSION: BUILD MVP

Page 27: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Backlog of Identified Needs

• Move around• Take object• Don’t bring back white objects This is

what we think we can do with it

Page 28: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

Final Demo Time!

Page 29: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

GROUP WORK: LESSONS AND EXPERIENCES ON TDD

This exercise vs. real life TDDSIMILARITIES

What can we take from this?

DIFFERENCESWhat can we bring home from other experiences the group has?

Page 30: Test-Driven Development with Lego Mindstorms Ru Cindrea @ru_altom Maaret Pyhäjärvi @maaretp

SpecificationFeedback

RegressionGranularity