Wednesday, July 24, 2013

Tests and Immersion in Code: The relationship

There is a relationship between how slow tests are and how much we interact with the tests while we are developing software.

  • If the tests run instantaneously, I'll run them constantly.
  • If the tests run in 30 seconds, I will run them 3 times in any 5 minute window of coding.
  • If they run in 1 minute, I will run them 3-4 times per hour.
  • If they run in 10 minutes, I will run them maybe 3 times a day.
  • If they run in an hour, I'll run them 5 times a week at most.
  • If they run for a day, I will almost never run them.

If the build/test cycle is not incredibly fast, I will not participate in the code as fully and richly, instead falling back to rely on my IQ and memory and good intentions more.

This is why tools like Infinitest for Java, sniffer for Python, autotest for ruby, and the like matter so much.

It is also why there have to be build servers and test servers for any significant project.

It is also why manual testing is not a replacement for automated testing via scripts and tools.

It is also why it is better to test below the user interface; it is too slow to stand up a live version of the application with all its services, resources, and infrastructure and test through the UI.

I am happiest and most productive when I'm interoperating fully and richly with my application environment. Waiting or batching work are practices that take me out of the environment.

No comments:

Post a Comment