Testing Symfony and Symfony Applications

Fabien Potencier » 08 May 2009 » in Open Source Case Studies » 0 Comments

This is an abstract for a chapter from a book on Quality Assurance in PHP Projects.

In this case study, we will talk about how the Symfony framework itself is tested, but also about the tools the framework provides to ease testing the customer applications.

Although developers are well educated now about tests, it is still the most neglected part of a web development process. Most developers still think they cannot afford writing tests because it takes too much time. The Symfony framework tries to ease the creation of both unit tests and functional tests with a unique and simple approach. For instance, functional tests are done by simulating a browser experience, but with the possibility to introspect all internal objects between each request. It is also possible to validate the generated content easily and precisely thanks to CSS3 selectors.

Testing the framework itself also proved to be quite challenging, and we learned it the hard way: from code that is too coupled to be tested thoroughly, to the usage of design patterns like the Singleton. Over the years, the Symfony framework quickly evolved from our testing experience, and now provides a well decoupled, but cohesive set of components. For Symfony 2, the introduction of a Dependency Injection container will be of great help to ease the testing process even more.

Fabien Potencier is the CEO of Sensio and the lead developer of Symfony.

Trackback specific URI for this entry

0 Comments to "Testing Symfony and Symfony Applications"

Display comments as (Linear | Threaded)
  1. No comments

1 Trackback to "Testing Symfony and Symfony Applications"

  1. Quality Assurance in PHP Projects 04/11/2009 at 09:36
    It has been quiet on this website since we posted the last contributed chapter abstract in June and it is time to give you an update. But first, allow me to refresh your memory on the list of contributed chapters:Case Studies on QA Processes in CompaniesQ

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.


Submitted comments will be subject to moderation before being displayed.