Hello dear Reader,

If you are interested learning a popular PHP test automation tool and working with it on windows, than this blog might help you out. In recent blog of mine about Behavior driven Development (BDD). I decided to make a series of Behat which is a BDD framework written in PHP language, which is rapidly increasing in its popularity in PHP, WordPress, Drupal end other communities. It is open source framework working on PHP 5.3+ versions.

Behat:

Allows writing clear and human readable tests as it is written in Gherkin (also mentioned in my previous blog) which is a business-readable domain specific language following defined patterns (usually Given-When-Then pattern of variation). Behat tests are written in plain English (or other 67 supported language) phrases which are then combined into human readable scenarios. The tests are understandable by almost anyone, whether you are person without any programming skills up to a full-time developer. Behat is the core of the framework and it is capable to test various system types such as REST APIs, terminal commands and headless testing, however for testing web pages we require controllers and emulators such as Mink, Goutte, Selenium and various web drivers for desired browsers.

Behat is usually installed through Composer a dependency manager for PHP, it will automatically download latest version of Behat and for constant later updates of libraries.

Mink:

Is an open source browser controller for web applications, written in PHP 5.3. and it is required for Behat to simulate real time testing. Mink functions as the connector between Behat and browser emulators, and provides a consistent testing API.

Goutte:

The most common used emulators are Goutte (doesn’t support JavaScript but fast execution) or Selenium with addition of leading browser drivers (FireFox, Chrome, IE/Edge) which will provide a full-featured browsers for testing (but their execution will run slower than Goutte).

Selenium:

Is a set of different software tools, each with a different approach to supporting test automation. Its diversity gives unique appliance for usage in all leading programming languages and the most used package for automated testing.

Please visit the links for better insight of usage and features of Behat and libraries browsing through their documentation. If you are interesting in PHP automated testing, the texts will be very useful.

This blog post is just in introductory to get ideas what is used in pack for browser or headless testing, please follow the upcoming blogs for installation and testing in Behat. In meantime you can always browse the given links for some extra learning. 🙂

If you have any questions and/or suggestions, please write me in the comment and I will reply as soon as possible.

Thank you for reading the blog and happy learning!

Similar Posts from the author: