Posts marked with “testing”

Sustainable PHP: Database Playback Testing

by · January 8, 2021

0
 

While completing the Deep Analysis we discussed last month, I was faced with the inability to test. That’s because—I discovered–accounting data cannot be erased—even in the sandbox. There’s no way to begin each test with a clean test environment. This month we walk through a relatively convoluted solution. We’ll capture the accounting data as we […]

 

Getting Started With Test-Driven Development

by · July 1, 2020

0
 

As developers, we spend a large portion of our time testing code we’ve just written. In a traditional testing cycle, we write some code and manually test it until it’s error-free, but how do we know it will be error-free a year from now? Embracing Test-Driven Development (TDD) allows us to quickly build a suite […]

 

The Workshop: Specification BDD with Phpspec

by · May 5, 2020

0
 

phpspec is a package which allows us to use Behavior-Driven Development, BDD, which comes from Test-Driven Development, TDD. When applying BDD, we write our tests first and then only enough code to pass our tests and then refactor and verify the tests still pass exactly as we would with TDD. This cycle continues and is […]

 

Education Station: Integration and Functional Testing

by · February 4, 2020

0
 

Previously, we discussed unit testing and why it can be useful. Unit testing can help make sure the public-facing APIs for your classes are easier to understand. It helps map out the dependencies of your classes, and—more importantly—it helps ensure behavior does not change from release to release. Functional, or integration, testing allows you to […]

 

Education Station: Unit Testing Basics

by · January 3, 2020

0
 

Recently, we’ve discussed principles for writing clean code in your php applications. Testing is a valuable technique to help you produce and maintain a codebase, but it can be daunting to learn. In this article, we’ll start with unit testing. Let’s look at how tests help during the design phase and in maintenance, what unit tests are, and how to use PHPUnit for your test suite.

 

Practical Static Analysis

by · October 2, 2019

0
 

All developers know bugs are bad and finding them can be difficult. The good news is tools to help us find and prevent bugs are becoming more powerful. This article shows how to use advanced static analyzers on your current project to help you produce cleaner, bug-free code.

 

Puphpeteer, 25 Years of PHP, and Joe Ferguson

by · September 24, 2019

0
 

In Episode 24 Eric, John, and Oscar discuss some of the articles in the September 2019 issue “Master of Puppets”. Topics History of PHP, celebrating “25 Years of PHP”, and the Impact Awards at php[world] Using Puphpeteer to automate Chromium browser tasks and testing. Code style, and refactoring legacy code. Code editors from VIM (and […]

 

End-to-End Testing Automation With PuPHPeteer

by · September 3, 2019

0
 

In general, we perceive the frontend part of a user-facing application as difficult to test in an automated way, and we often relegate these checks to a manual task. In this article, we examine how to use the Puppeteer tool and its PHP bridge, PuPHPeteer, to ensure deterministic validation of the browser side of a web application.

 

Frontend Fundamentals and Chris Hartjes

by · April 25, 2019

0
 

Eric, John, and Oscar record together again to discuss the April 2019 issue on the new frontend fundamentals, php[tek], and quite a lot more about web browsers than anyone anticipated.

 

Jenkins Automation

by · January 7, 2019

0
 

When you want to guarantee code quality, do continuous deployments, or any other automation you need a robust continuous integration server. While there are many great (hosted) solutions like Travis CI, CircleCI, and others, when it comes to full control or the need for private hosting, Jenkins is the perfect candidate. Jenkins has a reputation […]