DEV Community

Discussion on: Book Club: "Test Driven Development: By Example" #4

 
ruthmoog profile image
ruthmoog

The scroll tool is fun!
I'm not familiar with testing something like that, I wonder if something like Selenium WebDriver would enable TDD for such a project? and maybe building in some acceptance testing with Automated Visual Testing post-hoc. You could use BDD-style specifications to know the implemented animation is meeting your acceptance criteria (eg. yep the rotate button rotates 360° while its on the display, and, yep it spins on a horizontal pivot etc etc or whatever you want to happen) - this is probably happening already? Just not in a formal way.

What I would say though, is that exploring the behaviour in the browser is totally research! Spiking code too. It's your prerogative wether to scrap the working-out and test-drive the codebase, or, keep that code in your project :D