Testing
Test Migration: From Mocks to Real Database with Test Switcher
Master test migration from ORM mocks to real databases using the Test Switcher pattern for gradual, risk-free refactoring without breaking CI.
read articleTesting Rule of Thumb: if it looks too much like the real implementation, doubt it
If a test looks like it’s doing calculation or is using the same code as the implementation code it might not be helping you as much as you think.
read articleHow test frameworks work : Cleaning after a failure, the birth of TearDown and SetUp
Understand how test frameworks evolved to handle cleanup after failures, leading to the creation of TearDown and SetUp methods for reliable test execution.
read articleRun Laravel Artisan Tests directly in PhpStorm test view
Learn how to run Laravel tests directly in PhpStorm with a custom workaround for artisan test and PHPUnit.
read articleTags, the Forgotten Feature of Test Runners
Some examples of using tags that will change your view of testing.
read articleHow I divided a PhpUnit test suite execution by 5
Learn how I reduced PHPUnit test execution from 20 to 4 minutes using Paratest parallelization and database optimization in a Symfony legacy application.
read articleTester les extraits de code dans un livre
Comment mettre en place un filet de sécurité avec des tests pour un système produisant des résultats aléatoires ? Voici 3 techniques !
read article3 techniques pour gérer l'aléatoire en Approval Testing
Comment mettre en place un filet de sécurité avec des tests pour un système produisant des résultats aléatoires ? Voici 3 techniques !
read articleTesting that generated PDFs are visually the same
A cool trick to test that your PHP app correctly generates the PDFs you expect
read articleChange the problem to write simpler tests.
Learn how to simplify difficult test scenarios by reframing the problem you're solving. Transform time-dependent, hard-to-test code into easily testable solutions through strategic problem redefinition.
read articleHow test frameworks work: Expecting that an exception is thrown and the Arrange-Act-Assert pattern.
Let’s expand our mental model of the way test frameworks work and see how the expecting that an exception is thrown is done. This will explain why we can’t follow Arrange-Act-Assert pattern for that purpose.
read articleHow test frameworks work: A basic mental model
Understanding how test frameworks work help writing better test. Here is the start of a simple mental model.
read articleExpected, actual, and super fast assertion creation
Boost test-writing productivity with PhpStorm live templates and postfix templates. Learn to create expected/actual variables instantly and generate assertions with minimal keystrokes using custom IDE automation.
read article3 hacks for a magical code kata in PHP
How can we hide code, make test report they take minutes when they actually run in seconds and be share fake libraries when creating a code kata in PHP? I’ll show you how!
read articleApproval testing: 3 technics to deal with randomness
What can we do to build a safety net on top of a system with random result ? Here are 3 technics to help.
read articleCoder ses tests sans les mains grâce aux Live Templates de PhpStorm
Faciliter l’écriture des tests avec les Live Templates des IDE Jetbrains
read articleLe tags, la fonctionnalité oubliée des lanceurs de tests
Quelques exemples d’utilisation des tags qui vont changer votre vision des tests.
read articleDes solutions pour les conflits au niveau de la base de données pour les tests exécutés en parallèle
Découvrez 3 stratégies efficaces pour résoudre les conflits de base de données lors de l'exécution de tests en parallèle et améliorer la fiabilité de vos tests.
read articleDes tests super lisibles
Quelques astuces pour fortement améliorer la lisibilité des tests
read articleLe dummy, un indice pas si con à propos de votre design...
Un dummy dans un test est une bonne indication qu’il faut se poser des questions à propos du design du système sous test.
read articleComment tester une méthode privée ?
On ne la teste pas. Ça, c’est la réponse courte. La réponse longue demande un peu plus d’effort.
read articleTest suite guidelines
When looking at a test harness, it’s sometimes hard to decide which type of test to write, what it should cover, how we should write it. I believe we would stop losing time and remove frustration by adding guidelines for our test suites.
read articleUsing Property Based Testing to test priorities
Learn how to use Property Based Testing to validate message priorities in complex conditional systems. Transform a difficult-to-test switch statement into testable components using the Composite pattern and Fast-Check framework.
read articleBuilding an event-sourced game with Phoenix Liveview: Unit testing patterns
This article is an overview of some useful patterns when testing event-sourced application.
read articleIt should not throw an exception
Discover why 'should not throw exception' is a poor test method name and learn proven strategies for writing descriptive, maintainable test names.
read articleExtra readable tests
Learn proven techniques to write highly readable tests using snake-case naming, builders, helper methods, and the Arrange-Act-Assert pattern. Transform complex test code into clear, maintainable documentation.
read articleTest for behaviour not for implementation
Discover how to write maintainable tests by focusing on behavior instead of implementation details, reducing coupling and improving test reliability.
read articleRefactoring VoteValidator with tests
Some lessons learned about testing
read article