FREELessons: 13Length: 1.3 hours

Next lesson playing in 5 seconds

  • Overview
  • Transcript

1.3 What Is Testing and Why Is It Important?

Understanding what testing is and why it is important is crucial as a beginning web developer, as it helps with wrapping your head around the concept of testing. Let's take a look at some basic PHP testing in action and then learn why it is so important.

1.3 What Is Testing and Why Is It Important?

The topic of this lesson is what's PHP testing and why is it important to us as web developers. Now many beginning web developers do not test their web applications. This stems from them thinking that testing takes too long or that it's hard to write tests, or that they feel like they can put it off until the end of the project, before writing any tests. But, most of this is baloney. So, let's start with the first topic of, what is testing? Testing is basically, the process of trying to locate and fix any errors that your PHP web application may contain. And then to ensure that it keeps running as expected. So you want to be confident that your web applications are working to their full potential. You don't want to put out a buggy web app, or turn in a project to a client with a lot of different errors, and potentially cause a security issue, should the site go live. So now, why is testing important to us as PHP developers? Well, let's take a look at an example. You may get hired to build a small web application for a local business. This business would give you specific features and requirements that they need for their web application. So, by writing tests, you can make sure that those requirements are met and that the features that are needed work. Your tests give you peace of mind, help you in the process of locating bugs, and can ease in code maintenance. Now this usually means that you'll write some other test PHP code in order to validate that your application PHP code works as intended. And this is where some developers think that testing takes too much time. When in fact, testing is saving you time in the end by helping you spot potential bugs. Now, writing these tests can be done by creating your own PHP scripts. We'll be learning about a few different testing methodologies that you can apply to your tests, and then you can choose which works best for you in the next section of the course. Now we'll also see a variety of testing libraries and frameworks that can help you out. For example, one of the most popular PHP testing frameworks is PHPUnit, which we'll be looking at later on in the course. And then once we get into writing our tests, we'll learn that there are several different types of tests that you can write. In this course, we'll be learning about unit, functional and acceptance testing, and seeing all of those in action later on. Okay, so now that we know a little bit more about PHP testing and why it's important, let's move onto our next section of the course where we'll learn about testing methodologies. I'll see you there.

Back to the top