WWCode MNL PHP Meetup October 30, 2021

πŸ’… πŸ’… πŸ’…Register for FREE here: https://www.meetup.com/Women-Who-Code-Manila/events/281240721/ πŸ’… πŸ’… πŸ’…

Welcome

Hi, welcome back to Women Who Code Manila PHP Meetup. Our topic for today is Laravel's HTTP Tests. We will be exploring how to create confidence in our API responses that makes sure it is working correctly by having automated tests.

About me

My name is Karen Matala. I am currently based in Florida, USA πŸ‡ΊπŸ‡Έ but I am from Pasig, Philippines.πŸ‡΅πŸ‡­ I have been a PHP Developer for more than 6 years now and I still feel there's a lot to learn and that excites me. I like reading technology, product-related and motivational books. DM me your most recommended tech book! We've got a lot of stuff to do and learn today so let us get started.

Introduction

As time goes by, things change, features change and features get added or removed. This, most of the time leads to unknown side effects and breaking the code, resulting in an error on the application or a downtime. This could have been prevented if tests are in place.

I'd like to start with the core reason why it is important to create confidence in what you build. In every application I do, I want to make sure that it runs correctly. And as time goes by, things change, features change and features get added or removed. This, most of the time leads to unknown side effects and breaking the code, resulting in an error on the application or a downtime. This could have been prevented if tests are in place. Tests can be manual or automated. Depending on your company's priorities and the development team's capacity, I would highly recommend having automated tests in place. Applications do not need an entire 100% test coverage but just enough coverage for the team to sleep well at night and be confident that the code change they released will not cause an error. Testing is a part of the so-called "CI/CD" continuous integration and delivery. You can know more about it by joining the #devops-discussion channel

Getting Started

Let's start off with a clean slate of a new Laravel project which we can find on the Laravel documentation at https://laravel.com/docs/8.x/installation

You may check how it can be installed using your operating system.

Essentially for this meetup (and beyond), you will need the following:

  1. PHP : ( this can be installed easily, depending on your OS)

  2. Composer : https://getcomposer.org/download/

  3. Database : we will use MySQL