Software Testing

Once upon a time TDD... and me

Once upon a time TDD... and me

Once upon a time, a young woman had plenty of projects and passions and was a bit hyperactive. She doesn’t really enjoy talking about her life and asks herself, very seriously, how she will write this post.

Among her early age dreams were learning many things about science and software engineering. She started with biosciences (by the way, they are fascinating, nothing is more complex and well crafted than the human body) and then she decided to continue with software engineering. However, the software engineering program she completed only lasted one year (6 months of classes and 6 months of internship). Of course, this was only a door to access the world that she wanted to discover so much.

Continue reading
Que faire lorsqu'une méthode privée veut être testée ?

Que faire lorsqu'une méthode privée veut être testée ?

Les tests automatisés servent à vérifier le bon comportement d’un objet (ou d’un ensemble d’objets), indépendamment de la manière dont ce comportement est implémenté. Le comportement d’un objet est décrit par son API publique (constructeurs, constantes et méthodes publiques). Les tests ne devraient donc utiliser que cette API.

Les méthodes privées (et protected) ne faisant pas partie de l’API publique d’un objet, elles ne devraient pas être appelées directement par le code de test.

Cet article a pour objectif de montrer comment réagir lorsqu’il paraît nécessaire de tester une méthode privée.

Continue reading
Testing Spring MVC Controllers

Testing Spring MVC Controllers

Since Spring 3.2 (January 2013), it has been possible to test Spring MVC controllers without an external framework. This article aims to show how to test Spring MVC controllers using only Spring testing capabilities.

Continue reading