Bookmarks tagged with #testing.
Show all
Show all
PSR-20 Clocks: Testable Time in PHP
Learn how a ClockInterface helps you decouple time and write stable, testable code.
Saved
on: 2025-09-23
A Builder's Guide to Evals for LLM-based Applications
Evals for classification, summarization, translation, copyright regurgitation, and toxicity.
Saved
on: 2024-12-10
I recently started a new project, tried maxxed out PHPStan, and faced the same pain points. Does any
Saved
on: 2024-12-03
Adding PHPStan to a legacy project | BackEndTea
Learn how to integrate PHPStan, a powerful static analysis tool, into your PHP projects to enhance code quality and reduce errors, in a legacy project.
Saved
on: 2024-06-29
Introducing Type Perfect for extra Safety
When dealing with legacy, we first focus on safety by knowing the important types. Code must have reliable type declarations to be refactored safely.
Over time, we've been adding our custom rules to address PHPStan blind spots first. Today, we're proud to publish them in one solid package.
Saved
on: 2024-06-20
How to Measure Your Type Coverage | Tomas Votruba
When we come to a new code base, we look for a code quality metric that will tell us how healthy the code base is. We can have CI tools like PHPStan and PHPUnit. PHPStan reports missing or invalid types, and PHPUnit reports failing tests.
But how do we know if 10 passing or 100 passing tests is enough? What if there are over 10 000 cases we should test?
Saved
on: 2024-03-12
Narrowing types for static analysis | Jordi's Ramblings
Lessons learned migrating big old codebases to strict PHPStan configs
Saved
on: 2024-02-24
How analyzing your codebase can save you time and money
Saved
on: 2024-02-15
Is something bugging you?
At first glance, Antithesis couldn’t be more different from FoundationDB (our last company), but it’s a continuation of that story in a funny sort of way.
Saved
on: 2024-02-13
Tips for optimizing integration tests
While unit tests are known for their speed compared to integration tests, the latter offer heightened confidence in the system’s functionality. Thus, avoiding integration tests is not advisable; instead, it’s crucial to strike a balance by writing tests at an appropriate level to ensure high confidence in the codebase. Achieving this equilibrium between time efficiency and confidence is paramount. Rapid feedback is essential for a smooth workflow, and today, I’ll share concise tips to enhance the efficiency of your integration tests. The effort invested is worthwhile, as swift feedback is indispensable for seamless operations, and each minute of improvement is magnified by the frequency of executions and the number of developers in the company.
Saved
on: 2024-01-26
About time - how to unit test code that depends on time
Suppose that the logic of your program depends on time. That is, you need to keep track of when something in the past happened, and what tim...
Saved
on: 2023-12-20
8 Code Quality Tools To Use In Your Long-Term PHP Applications | Davor Minc
Saved
on: 2023-08-07
Testing without mocking frameworks.
Over the years, my coding practices have changed a lot. From hacking away until
it works to TDD/BDD/DDD and everything in between. One of the biggest changes in
my developer career has been when, why, and how I test my code. In particular,
my view on mocking frameworks has changed a lot. A couple of years ago I was
convinced I could not live without them, now I wish I could do just that.
I've come to the point where I generally advise against the use of mocking
frameworks. After a couple intera
Saved
on: 2023-03-28
Introducing Bladestan - PHPStan analysis of Blade templates
This Tuesday, I was a guest in [2nd podcast of PHP Portugal](https://twitter.com/VotrubaT/status/1639241043248836610) folks. It was fun as always, and apart from GPT questions, I got asked about the Laravel open-source packages like [Punchcard](https://github.com/tomasVotruba/punchcard).
I promised to put the 2nd package this week, so here it is.
Saved
on: 2023-03-24
Everything You Can Test In Your Laravel Application
A common challenge in testing is not only HOW to test something, but WHAT you can test. That's why I have made a list of all the things I like to test in my applications.
Saved
on: 2023-03-24
Organizing test code in PHP
If you are working on a PHP application or package, how can you best organize your test code?
Saved
on: 2023-03-06
How I upgraded eight PHP katas
I recently upgrade eight PHP Katas from a minimum PHP 7.3 to a minimum of PHP 8.0. I used Rector, Easy Coding Standard (ECS) and PhpStan to help me. This is how I approached the upgrade and used these tools.
Saved
on: 2023-01-23
sarven/unit-testing-tips: Unit testing tips by examples in PHP
Unit testing tips by examples in PHP
Saved
on: 2022-12-21
Quick Testing Tips: Self-Contained Tests — Matthias Noback - Blog
Whenever I read a test method I want to understand it without having to jump around in the test class (or worse, in dependencies). If I want to know more, I should be able to “click” on one of the method calls and find out more.
I’ll explain later why I want this, but first I’ll show you how to get to this point.
As an example, here is a test I encountered recently:
Tags:
#testing
Saved
on: 2021-09-01
Do not mock what you do not own | The PHP Consulting Company
Saved
on: 2021-04-26
Practical Refactoring Tips For Developers That Love Legacy Applications - N
Speaker: Davi Marcondes Moreira @devdropsMany times in our career we have (or we’ll have) to deal with legacy applications, and refactoring is an art specially designed for this scenario. In this lightning talk, I’ll give a few tips that I’ve learned that helped me a lot to find love when dealing with refactoring legacy applications.
Saved
on: 2020-11-24
Automated testing: a step back
The goal of this article is to define basic concepts related to testing, trying not to take anything for granted.
Why do we test??
Why is it important to write automated tests? I asked myself and I did some research because the answer to this question was not obvious to me. I knew it was important but I didn’t know why. So, I decided to try to explain it starting from a point of view as impartial as possible.
Tags:
#testing
Saved
on: 2020-10-23
How to run over 30k tests in under 5 minutes | by Daan van Marsbergen | Sep
At Mollie we’re building a new generation of financial products and a new way of supporting you through them. A product-first approach that our customer can truly benefit from.
Saved
on: 2020-10-09
How to run over 30k tests in under 5 minutes | by Daan van Marsbergen | Sep
At Mollie we’re building a new generation of financial products and a new way of supporting you through them. A product-first approach that our customer can truly benefit from.
Saved
on: 2020-09-04
Enhancements to PHP code coverage in 2020 - doug.codes
In 2003, with the release of Xdebug 1.2, Derick Rethans introduced the ability to collect code coverage data to the PHP ecosystem for the first time. In 2004...
Saved
on: 2020-08-01
TeamCity UI: How Do We Test It? | The TeamCity Blog
Developing a working piece of software is difficult. Just like building an airplane, it requires talented people, working components, and a testing framework. No plane leaves the hangar before everyth
Saved
on: 2020-06-26
3 steps to add tests on existing code when you have short deadlines | Understand Legacy Code
Here's a recipe you can follow when you want to add tests on Legacy Code, but you don't have much time to do so.
Tags:
#testing
Saved
on: 2020-03-27
How to Turn Mocks from Nightmare to Solid Kiss Tests | Tomas Votruba
[Martin Hlaváč](http://mhlavac.net) had a very nice talk about testing in [Berlin PHP Meetup](http://www.bephpug.de/2018/06/05/june.html) last week (while I hosted with [Rector](https://github.com/rectorphp/rector)), and one of the topic was mocking.
I often see developers fighting with this, in places they don't have to, just because this topic is so widespread all over the internet and unit tools.
Did you know there is easier and more clear way to do "mocking"?
Tags:
#testing
Saved
on: 2020-02-14
Lessons Learned from Testing and Refactoring Legacy
I remember when I first discovered automated testing. I immediately wanted to apply it to all the projects that I was working on, but it didn't work as well as I expected. In fact, it was a disaster,
Saved
on: 2019-12-05
How to write testable code
How to refactor code to make it more testable (and as a bonus SOLID)
Tags:
#testing
Saved
on: 2019-07-16
The Three Types of Performance Testing – CSS Wizardry – CSS Architecture, W
How can we make it easier for businesses to understand when and what to measure?
Saved
on: 2019-07-15
Keeping (large) data providers organized in PHPUnit - DEV Community ????
It's easy to lose track of what exact data is in your data providers in a PHPUnit test, especially if there are many test cases, or many parameters for your test case. Fortunately, it's also easy to prevent that from happening.
Saved
on: 2019-02-18
Unit Test Your First Vue.js Component | frontstuff
In Build Your First Vue.js Component we made a star rating component. We’ve covered many fundamental concepts to help you create more complex Vue.js componen...
Saved
on: 2018-10-10
Page Object Model (POM) | Design Pattern - tajawal - Medium
Page Object Model is a design pattern which has become popular in test automation for enhancing test maintenance and reducing code duplication. A page object is an object-oriented class that serves…
Tags:
#testing
Saved
on: 2018-06-02
Regaining trust in your test suite with Docker.
Docker, and containerised services in general, have brought a lot to the world
of software development. While not everybody is (or ever should be) using docker
as their deployment method, it's usefulness far exceeds being just a platform to
run services on in production.
--------------------------------------------------------------------------------
Testing PHP integrations.
For Flysystem [https://flysystem.thephpleague.com], an open source PHP package
to deal with filesystems, I needed a wa
Saved
on: 2018-01-20
How to gradually upgrade toward PHPUnit 6 with namespaced classes
In the latest months I wrote multiple times, in different projects, code migrating PHPUnit toward major version 6. This upgrade is harder than the previous one, since in this version it was introduced a big breaking change: all classes got (finally!) namespaced.
This means that any usage of those classes in your project needs to be updated. It may seem a simple find & replace job, but since you need to introduce at least one use PHPUnit\Framework\TestCase line at the top of each one of your test classes, it’s a boring and a little more than trivial task; also, upgrading it in a single big jump may not be feasible or prudent, especially in the case of open source or distributed libraries, where backward compatibility and support for old PHP versions must be ensured.
Saved
on: 2017-09-12
Ghost Inspector
Catch bugs before they cost you with Ghost Inspector's automated browser testing. No coding required. Free 14 Day Trial.
Saved
on: 2017-04-13
Mutation Testing – Check the quality of your unit tests | Blog Eleven Labs
It is well established : unit tests are mandatory when developing an application. They allow to highlight possible regressions when code is modified, so the developer gets a certain confidence when shipping his code to production : If tests do pass, everything works correctly.
Saved
on: 2016-10-22
Testing Strategies in a Microservice Architecture
The microservice architectural style presents challenges for
organizing effective testing, this deck outlines the kinds of
tests you need and how to mix them.
Saved
on: 2016-08-30
Suggestions on unit testing legacy code : r/PHP
Saved
on: 2016-07-04
Introduction to Travis.CI • Conetix
Modern application development is a pretty demanding job, mainly because of the complexity of modern applications, and the sheer number of moving parts which
Saved
on: 2016-04-06
Stress-free refactoring with Scientist | Shameer C
Saved
on: 2016-03-09
Minimum Viable Tests by Chris Hartjes [Leanpub PDF/iPad/Kindle]
Saved
on: 2016-02-18
goad/README.md at master · goadapp/goad
Goad is an AWS Lambda powered, highly distributed, load testing tool - goadapp/goad
Saved
on: 2016-01-28
Slevomat Coding Standard — Medium
Every developer team should have a good infrastructure providing and enforcing consistent output of each team member at their fingertips. Coding standard is one of many things holding a project…
Saved
on: 2015-12-21
Visual Regression Testing with PhantomCSS | CSS-Tricks
The following is a guest post by Jon Bellah, a Lead Front End Engineer at 10up. Jon reached out to us about writing on the idea of visual regression testing,
Saved
on: 2015-11-18
umpirsky/centipede: :sparkler: The Simplest automated testing tool on Earth.
:sparkler: The Simplest automated testing tool on Earth. - umpirsky/centipede
Saved
on: 2015-08-30
base-php-challenges/challenges at master · wearebase/base-php-challenges
A few small PHP coding challenges
Saved
on: 2015-07-08
arkency/reactjs_koans: Learn basics of React.js making the tests pass
Learn basics of React.js making the tests pass
Saved
on: 2015-06-29
Setting up a PHP project with PHPUnit, Travis and Codeclimate
A tutorial on setting up a PHP library project with continuous integration, testing, code coverage generation and Packagist.
Saved
on: 2015-05-26
assert/README.md at master · beberlei/assert
Thin assertion library for use in libraries and business-model - beberlei/assert
Saved
on: 2015-02-03
Reqres - A hosted REST-API ready to respond to your AJAX requests
Saved
on: 2014-11-10
state/README.md at master · sebastianbergmann/state
The State design pattern. Implemented in PHP and with style. - sebastianbergmann/state
Saved
on: 2014-10-29
Vectorface/dunit: Test code against multiple versions of PHP with the help of docker
Test code against multiple versions of PHP with the help of docker - Vectorface/dunit
Saved
on: 2014-10-24
http://phptest.club/t/roboci-run-travisci-builds-locally/170
Saved
on: 2014-09-26
When to Mock
Test doubles come in a ton of different flavors. Dummies, fakes, mocks, stubs, spies, oh my!
But I don't think it needs to be this complicated.
Saved
on: 2014-09-23
Black Box Driven Development in JavaScript - Mozilla Hacks - the Web developer blog
Sooner or later every developer finds the beauty of the design patterns. Also, sooner or later the developer finds that most of the patterns are not applicable in their pure ...
Saved
on: 2014-08-27
http://www.xenframework.com/blog/installing-phpunit-and-configuring-phpstorm/
Saved
on: 2014-06-01