How to install Behat on your System

For Behat you need at least PHP 5.3.3 version installed on your system. No matter you install Behat on Window, Mac or Ubuntu, steps will remain same.There are 2 ways to install Behat on Your system:

Install Behat using composer: This is recommended and official way. Advantage of installing Behat using composer is that you can easily update to latest version later. Below are the steps:

Step 1. Create your project directory anywhere on your system

Step 2. Type below command

$ php composer.phar require --dev behat/behat

Step 3. Verify Version and Behat Installation

$ vendor/bin/behat -V

Install Behat using phar: This is easy way of installation but not recommended.

Step 1. Download the latest behat.phar from here Behat Git.

Step 2: Paste it to your project folder

Step 3: Type below command to verify the version and installation

php behat.phar -V