Bookmarks tagged with #testing.
Show all
Show all
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
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