Testing
Run 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
During my last mission, I optimized a Symfony legacy application's test suite, reducing execution time from over 20 minutes to just 4 minutes. This was achieved through parallelization using Paratest and solving the slow database setup issue
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.
Sometimes, writing tests for a piece of code is difficult but can be simplified by changing the problem we are trying to solve.
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
How fast can you create variables to hold expected and actual values in your test? And how little can you type to write the assertion?
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
Des tests qui tournaient parfaitement en série et qui deviennent flaky lorsqu’ils sont exécutés en parallèle, merci mais non merci.
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
Once we’ve decomposed one unit in smaller part, Property Based Testing can help testing for priorities between each of the subparts.
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
Trying to find better names for test methods
read articleExtra readable tests
Some tricks to make your tests readable
read articleTest for behaviour not for implementation
Avoid coupling between tests and implementation by testing for behaviour
read articleRefactoring VoteValidator with tests
Some lessons learned about testing
read article