I would like to start Behat-ing my application and would like to see nr of queries executed per-page (in case I forgot some Join statement and Doctrine lazy-loads the relation).
How to do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you use the Symfony2 Behat Extension, you should be able to the just the same thing as in Symfony2 functional tests. Profiler is just a service which can easily be retrieved from the container:
Then you’ll need to load the profile for your response:
It is also possible to load the profile from
Symfony\Component\HttpFoundation\Responseobject:However,
$session->getClient()->getResponse()returns aSymfony\Component\BrowserKit\Response.