Towards Test-Driven Development for Mobile Robots @SDIR - ICRA - May 2013 Luc Fabresse, Jannik Laval and Noury Bouraqadi http://car.mines-douai.fr
Outline 1. Test-driven Development (TDD) 2. TDD for Mobile Software Robotics 3. BoTest 4. Report on an Experiment 5. Summary & Future Work !""#$%%&'()*+,-./012'+)3( 2 4'56789:;6<=>?@6/6?A@B
CAIRE Project • Coodinator: Luc Fabresse • Partners: INRIA Lille RMoD, IEMN Telice • 2012-2014 • Nord-Pas de Calais Council funding (France) • Indoor Exploration and Mapping • Agile methodology for Robotic Software !""#$%%&'()*+,-./012'+)3( 3 4'56789:;6<=>?@6/6?A@B
Software Development Software Specifications / Requirements !""#$%%&'()*+,-./012'+)3( 4 4'56789:;6<=>?@6/6?A@B
Software Development Software Specifications / Requirements !""#$%%&'()*+,-./012'+)3( 5 4'56789:;6<=>?@6/6?A@B
Software Development complies with? Software Specifications / Requirements !""#$%%&'()*+,-./012'+)3( 6 4'56789:;6<=>?@6/6?A@B
Test-driven Development Software Specifications / Requirements !""#$%%&'()*+,-./012'+)3( 7 4'56789:;6<=>?@6/6?A@B
Test-driven Development Tests Software Specifications / Requirements !""#$%%&'()*+,-./012'+)3( 8 4'56789:;6<=>?@6/6?A@B
Test-driven Development Tests Software Specifications / Requirements !""#$%%&'()*+,-./012'+)3( 9 4'56789:;6<=>?@6/6?A@B
Test-driven Development complies with? Tests Software Specifications / Requirements !""#$%%&'()*+,-./012'+)3( 10 4'56789:;6<=>?@6/6?A@B
Benefits of TDD • Requirements as executable units: Tests • Ensure Software compliance with Tests • Short development cycles • Detecting regressions • ... !""#$%%&'()*+,-./012'+)3( 11 4'56789:;6<=>?@6/6?A@B
TDD for Mobile Robotics Software Development Tests Control Specifications / Software Requirements !""#$%%&'()*+,-./012'+)3( 12 4'56789:;6<=>?@6/6?A@B
Why TDD for Mobile Robotics Software Tests Control Specifications / Software Requirements !""#$%%&'()*+,-./012'+)3( 13 4'56789:;6<=>?@6/6?A@B
Why TDD for Mobile Robotics Software Tests Control Specifications / Software Requirements for one product line !""#$%%&'()*+,-./012'+)3( 14 4'56789:;6<=>?@6/6?A@B
Why TDD for Mobile Robotics Software Tests Control Specifications / Software Requirements • Quality written once for one Assurance • Maintenance product line !""#$%%&'()*+,-./012'+)3( 15 4'56789:;6<=>?@6/6?A@B
Challenges of TDD for Mobile Software Robotics • Hardware in the loop • `` identical’’ hardware in production lines • Physical constraints • ... !""#$%%&'()*+,-./012'+)3( 16 4'56789:;6<=>?@6/6?A@B
Requirements for Robot Test • Repeatability • Reuse • Safety • Automation !""#$%%&'()*+,-./012'+)3( 17 4'56789:;6<=>?@6/6?A@B
A Tool for Robotics TDD • BoTest ( http://car.mines-douai.fr/software/ ) • Implemented in as an extension of SUnit ( http://www.pharo-project.org ) • Helps to write tests for robots • Support expressing dependencies between tests • Run tests in a specific order !""#$%%&'()*+,-./012'+)3( 18 4'56789:;6<=>?@6/6?A@B
Example the robot should move straight 4m with 3% of error at most Specifications / Requirements !""#$%%&'()*+,-./012'+)3( 19 4'56789:;6<=>?@6/6?A@B
A Motion Test Test !""#$%%&'()*+,-./012'+)3( 20 4'56789:;6<=>?@6/6?A@B
A Motion Test Test name Test !""#$%%&'()*+,-./012'+)3( 21 4'56789:;6<=>?@6/6?A@B
A Motion Test Test Tester action requested to setup the robot name !""#$%%&'()*+,-./012'+)3( 22 4'56789:;6<=>?@6/6?A@B
A Motion Test Test Tested code !""#$%%&'()*+,-./012'+)3( 23 4'56789:;6<=>?@6/6?A@B
A Motion Test Test Assertion verified by the tester !""#$%%&'()*+,-./012'+)3( 24 4'56789:;6<=>?@6/6?A@B
A Motion Test But the robot should not hit walls ! !""#$%%&'()*+,-./012'+)3( 25 4'56789:;6<=>?@6/6?A@B
A Motion Test But the robot should not hit walls ! Add collision detection using Laser !""#$%%&'()*+,-./012'+)3( 26 4'56789:;6<=>?@6/6?A@B
A Motion Test Collision detection using Laser !""#$%%&'()*+,-./012'+)3( 27 4'56789:;6<=>?@6/6?A@B
A Motion Test Add required Tests !""#$%%&'()*+,-./012'+)3( 28 4'56789:;6<=>?@6/6?A@B
A Motion Test !""#$%%&'()*+,-./012'+)3( 29 4'56789:;6<=>?@6/6?A@B
Laser Tests PBLaserTest !""#$%%&'()*+,-./012'+)3( 30 4'56789:;6<=>?@6/6?A@B
Laser Tests !""#$%%&'()*+,-./012'+)3( 31 4'56789:;6<=>?@6/6?A@B
Laser Tests !""#$%%&'()*+,-./012'+)3( 32 4'56789:;6<=>?@6/6?A@B
Laser Tests !""#$%%&'()*+,-./012'+)3( 33 4'56789:;6<=>?@6/6?A@B
Laser Tests !""#$%%&'()*+,-./012'+)3( 34 4'56789:;6<=>?@6/6?A@B
Running a Test the robot testStraightLineMotion should move ... straight 4m with 3% of error Specifications / at most Requirements !""#$%%&'()*+,-./012'+)3( 35 4'56789:;6<=>?@6/6?A@B
Running a Test the robot testStraightLineMotion should move ... straight 4m with 3% of error Specifications / at most Requirements !""#$%%&'()*+,-./012'+)3( 36 4'56789:;6<=>?@6/6?A@B
Running a Test the robot testStraightLineMotion should move ... straight 4m with 3% of error Specifications / at most Requirements 1 run, 1 passes !""#$%%&'()*+,-./012'+)3( 37 4'56789:;6<=>?@6/6?A@B
Running a Test the robot testStraightLineMotion should move ... straight 4m with 3% of error Specifications / at most Requirements 1 run, 0 passes, 1 run, 1 passes 1 requirementFailure !""#$%%&'()*+,-./012'+)3( 38 4'56789:;6<=>?@6/6?A@B
Running a Test the robot testStraightLineMotion should move ... straight 4m with 3% of error Specifications / at most Requirements 1 run, 0 passes, 1 run, 1 passes 1 requirementFailure !""#$%%&'()*+,-./012'+)3( 39 4'56789:;6<=>?@6/6?A@B
Running a Test Requirements are executed first !""#$%%&'()*+,-./012'+)3( 40 4'56789:;6<=>?@6/6?A@B
Running a Test !""#$%%&'()*+,-./012'+)3( 41 4'56789:;6<=>?@6/6?A@B
Running a Test 1 run, 0 passes, 1 requirementFailure !""#$%%&'()*+,-./012'+)3( 42 4'56789:;6<=>?@6/6?A@B
Summary Robotics Software Tool support is development would needed benefit from TDD !""#$%%&'()*+,-./012'+)3( 43 4'56789:;6<=>?@6/6?A@B
Summary Write repeatable and reusable tests Testers in the loop BoTest Support expressing dependencies between tests Run tests based on dependencies !""#$%%&'()*+,-./012'+)3( 43 4'56789:;6<=>?@6/6?A@B
Future Work • Automatic test dependencies extraction • Improve tests automation • Continuous integration for non-interactive tests • Specialized development tools !""#$%%&'()*+,-./012'+)3( 44 4'56789:;6<=>?@6/6?A@B
Towards Test-Driven Development for Mobile Robots @SDIR - ICRA - May 2013 Luc Fabresse, Jannik Laval and Noury Bouraqadi !"#$%&'()*&#$%&'(+',-(#./01&,)2" Looking for a 18 months PostDoc http://car.mines-douai.fr/2013/03/postdoc-position/ More infos: Starting: ~Sept 2013 Keywords: Robotics Software, Agile development, Dynamic Languages, ...
Recommend
More recommend