A separate ticket is required to attend this full-day training taking place Oct 22nd (the day before the conference) - https://world.phparch.com/register

Testing software in an automated fashion is one of the best ways to guarantee the quality, reduce bugs, and prevent regressions in our code, and is a prerequisite to operating in a Continuous Integration environment. Unfortunately, the most difficult parts of testing come right at the beginning: scaffolding a test suite and writing our very first tests. For those who are new to automated testing, these hurdles can prove overwhelming.

This training Talk covers the fundamentals of testing, in a beginner-friendly way. We'll discuss how testing makes software better, the various levels of the Automation Pyramid, and discuss the characteristics of great tests. Then, we'll dive into a real application to write tests to support legacy code, practice TDD while developing a new feature, and using tests to help prevent regressions with our bugfixes.

### Prerequisites & Assumptions:

It's assumed that attendees will have access to a computer with the ability to install a Laravel Homestead Vagrant environment (see https://laravel.com/docs/master/homestead).

The application we'll be working on comes bundled with all of the necessary dependencies (including current versions of PHP, Node.js, PostgreSQL, etc.) in the virtual machine, but the host machine should have:

* Git (https://git-scm.com/downloads)
* Composer (https://getcomposer.org/download)
* Vagrant (https://vagrantup.com)
* One or more of the virtualization platforms supported by Laravel Homestead (https://laravel.com/docs/master/homestead#installation-and-setup)

### Learning Objectives:

1. Establish a good understanding of how well-written tests can produce more stable, manageable code
2. Familiarize attendees with the most common features of PHPUnit, along with test organization and execution strategies
3. Provide a real, working application that attendees may use to practice writing tests in common scenarios, including:
- Writing tests around legacy code
- Practicing Test-Driven Development (TDD) in building new features
- Writing regression tests to effectively squash bugs

### Deliverables:

At the end of the course, attendees will be confident in contributing to (or even starting) the automated test suite for a PHP application.

Attendees will understand what, when, where, and how to test in a way that benefits the application without being overly rigid/brittle.

Furthermore, they will leave with a fully-functional copy of our application, bundled with a well-documented, Laravel Homestead-powered development environment.


Comments are closed.

Cecili Reid at 10:09 on 23 Oct 2019

Steve is clearly a great resource for PHP and testing and was able to answer all of my questions. I enjoyed his talk though it was pretty laravel specific at times.

Mekesia Brown at 13:13 on 23 Oct 2019

It was a lot to cover and the nature of live coding is not seamless. I appreciate the instructor pushing through and finishing the workshop.

John Dorner at 14:57 on 23 Oct 2019

Very good. Would have preferred to learn more basic (e.g. not having to use/know frameworks, libraries, and tools) phpunit tools.

Rain at 12:22 on 24 Oct 2019

Very nice hands-on training how to do testing. It didn't really bother me, that some stuff were laravel specific - there are always different tools tom achieve the similar things and for the bigger picture it doesn't really matter if its laravel or some other framework / toolbox that is used.

One thing for future improvement - it was a little hard to keep up with the coding from time-to-time, so I guess committing and pushing the code to repository more often would be very helpful.