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:
- Make a request;
- Test the response;
- Click on a link or submit a form;
- Test the response;
- Rinse and repeat.
While the Ruby on Rails docs describe it like this:
- was the web request successful?
- was the user redirected to the right page?
- was the user successfully authenticated?
- was the correct object stored in the response template?
- 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