Testing your assumptions

If I were to list some of the most dangerous habits observed in the way programmers work, I would definitely put making assumptions on this list. Let me explain. Recently, I have been debugging this one unit test that was showing signs of being a false positive. Turns out I was right about that and the reason was really simple – someone made an assumption that turned out to be false.  Let’s face it – we have all been there at least once in our career (even once sounds too good to be true 🙂 ). We assumed that certain situation, outcome or combination of several factors is simply not going to occur only to receive a bug report confirming that this assumption was wrong. This often unconscious practice is really common and causes trouble all over the world.

Continue reading “Testing your assumptions”

Pitfalls of Cucumber adoption

It seems like behavior-driven development (or BDD) and its supporting tools are gaining stronger momentum in Java world than ever. Cucumber, as one of the most popular frameworks used to support and automate BDD, seems like the go-to framework to power user acceptance tests (or UATs) without considering the implications of adoption of such a tool. Since using Cucumber was the requirement of one of the projects I have been working on I would like to share some observations I made and describe some of the pitfalls of such a decision. Continue reading “Pitfalls of Cucumber adoption”

Randomly Generated Input Stream

When writing tests, programmers often need to provide some test files for their code to work. This is typically done by uploading them to their version control systems or exposing them over the network to be downloaded at runtime. However the reasons for a particular test file being used may differ greatly. Usually there are these main reasons to include test files in your automated testing process:

  • Configuration
  • Data transfer
  • Test data

Continue reading “Randomly Generated Input Stream”