The testing pyramid

The test pyramid This post revisit one of my favorite topics: testing. We are going to delve into what are the different types of tests that you should do in your software to have some assurance about your code. Introduction I wrote some time ago a post about the difference between unit and integration testing, and while re-reading it today I was not convinced that it was clear enough. Integration tests is a concept that has been used many times in different environments and at different levels, so I want to give a proper definition of each one of the test types at project and system level. [Read More]

How to write a good unit test

How to write a good unit test This post provides some guidelines about how to write a good unit test. There are some examples in Python with unittest. Introduction In my last post I wrote about software quality not being taken seriously sometimes. Tests are a good part of the software quality so I wanted to write a bit about the testing effort we should be doing in our code. [Read More]

Actual integration tests

Many times we have some piece of code that is tested but is still failing in production. How is that possible? Is that because of bad tests or we have a greater hidden issue? Protect your vital functionality with integration tests Integration tests are the best way make sure that a functionality does not degradate when adding new features. What are integration tests Integration tests are tests that check a full feature of the project. [Read More]

To test or not to test

Introduction Some years ago I did not use any tests. We were cowboys in CodeWest where only fearful and strong people survive. Sometimes we tested some actions and assumed that everything else worked fine. But for the most part, code where developed almost like our sub-conscience dictated us what to type: we were guided by instinct. Of course, users of my applications were not so amused by this when they found software faulted and had to wait to me to repair it. [Read More]