I am currently implementing a SLAM algorithm. It contains many sub-algorithms like tracking, mapping, and loop closure. It never archives an exact result, therefore directly comparing the result against an oracle does not work. Some SLAMs are better than others. Some parts of one SLAM perform than some parts of others. I even can mix different parts of existing SLAM into a new one. And then, I didn't even start with configuring the system, which can make a lot of difference. I suggest, therefore, besides TDD on the micro-level, MDD - Metric Driven Development - on the macro-level. The scheme is related. I come up with metrics and build a harness for them. This means that I think about how to test the system before I start. Then I record sample inputs for the SLAM. The first result is as bad as it can be: it did nothing. From here, I start to develop. This is done for every part of the whole and the whole itself. Every metric has to show something meaningful.