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 didn’t enjoy talking about her life and wondered how she would write this post.

Among her early dreams were learning many things about science and software engineering. She started with biosciences (which, by the way, are fascinating — nothing is more complex and well-crafted than the human body) and then 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 simply a doorway to the world she was eager to discover.

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 become possible to test Spring MVC controllers without an external framework. This article demonstrates how to test Spring MVC controllers using only Spring’s built-in testing capabilities.

Continue reading