lundi 23 février 2015

Confusion over Symfony testing practices: functional vs integration testing

The Symfony testing documentation doesn't really mention a distinction between functional tests and integration tests, but my understanding is that they are indeed very different.


The Symfony docs describe functional testing like this:



  1. Make a request;

  2. Test the response;

  3. Click on a link or submit a form;

  4. Test the response;

  5. Rinse and repeat.


While the Ruby on Rails docs describe it like this:



  1. was the web request successful?

  2. was the user redirected to the right page?

  3. was the user successfully authenticated?

  4. was the correct object stored in the response template?

  5. was the appropriate message displayed to the user in the view?


The Symfony docs seem to be describing something more akin to integration testing, don't they? Clicking links, filling out forms, submitting them, etc. You're testing that all these different components are interacting properly. In their example test case, they basically test all actions of a controller by traversing the web pages.


I am confused why Symfony does not make a distinction between functional and integration testing, and if this should really be a concern of mine?


Aucun commentaire:

Enregistrer un commentaire