2

I have a question about Selenium V2 (Webdriver) and phpUnit,so what the best between this bundles to use it :

I want to know your opinion about the good and rish one to use it in my project developed with symfony 2.1?

1 Answer 1

5

If you want to use Selenium for functional testing, your best bet is to use Behat and Mink, they are outstanding tools and integrate really well with Symfony thanks to their Symfony2 Extension. They are not really phpUnit libraries, as they rather use a different methodology called BDD (Behaviour Driven Development). But they are really easy to use and once you get the hang of it, you will develop your functional tests with a wonderful ease and you will wonder why you did not learn of this before.

BTW, none of the three tools you mention are "bundles" in the Symfony sense of a bundle, they are just PHP libraries

Sign up to request clarification or add additional context in comments.

4 Comments

You have to install git or, if it is already installed, you need to make sure that it is in your path
ok I have an idea about Behat and Mink,but I have a question what's the advantange to puch me really to use it instead of selenium 2 webdriver??
Behat-Mink introduces many advantages: one is the new philosophy behind BDD, where all your "tests" are turned into "features". It is a different mindset and it specially helps when you are dealing with an outside customer and have to agree on the feature set of the app. Other advantage is that you have a framework with a lot of work already done, with all the mink "steps" that help you create tests really fast.
the third advantage is that mink can control different drivers, not only selenium. Many tests do not require javascript or ajax and can be run in a headless brower which is much, much faster. Even if you need javascripts you can usually run the tests with zombie.js which is also much faster than selenium. And the good thing is you can mix them at will: run some tests with a headless browser, others with zombie.js and others with selenium.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.