|
|
|
|
|
by jeremija
2405 days ago
|
|
I've always found it easier to write the skeleton of a module first (or an interface, depending on the language), and then write the tests to cover the main functionality, then the tests for the edge cases, and then finish the implementation. I usually finish by checking the test coverage and trying to make it reach 100% branch coverage if I have the time. The coverage part is important because it usually makes me realize things could be made simpler, with fever if/else cases. I could never get used to writing only the tests first simply because all the compilation errors get in the way (because the module doesn't exist yet). |
|