test-driven development with lego mindstorms ru cindrea @ru_altom maaret pyhäjärvi @maaretp
TRANSCRIPT
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
Product Vision
Build the software for a robot that moves to pick up target
objects
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
Backlog of Identified Needs
• Move around• Take object
This is what we think we can do with it
Info: motors, sensors & portsSENSOR PORTTouch 1Nothing 2Color 3Infrared 4
MotorsClaw ALeft wheels BRight wheels C
Constraint: Cannot use
this.
We’ve tried it out and
feel it’s too inaccurate to
control
Constraint: Don’t use these.
SESSION: 1ST TEST
Constraint: No joystick due to inaccuracy
Backlog of Identified Needs
• Move around• Take object
This is what we think we can do with it
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
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
Planning iteration #1
• Feature: move around• Small steps, one test to drive your idea of
what would be the smallest value to show
Retrospective Time!
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.
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.
Backlog of Identified Needs
• Move around• Take object
This is what we think we can do with it
Retrospective Time!
SESSION: NEED TO REFACTOR
Constraints on Joystick removed
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
Retrospective Time!
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
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.
SESSION: BUILD MVP
Backlog of Identified Needs
• Move around• Take object• Don’t bring back white objects This is
what we think we can do with it
Final Demo Time!
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?
SpecificationFeedback
RegressionGranularity