Search This Blog

Tuesday, May 20, 2014

Configure & Intstall WebGuy-Codeception

Overview:

Codeception is an opensource BDD Framework developed in PHP.It has been mainly focused to 3 type of user : -

(1)WebGuy - Who writes Acceptance Test
(2)Test Guy- Who writes functional Test
(3)Code Guy-Who writes Unit Test

Configuration & Installation of TestGuy: -

Step-1: Download and Configure Composer

Desc.:- Composer is basically a dependancy management tool for PHP pretty similar to Maven for Java.

It is open source and can be downloaded from here : https://getcomposer.org/download/

And it can be installed following : https://getcomposer.org/doc/00-intro.md#installation-windows

Step-2:Once composer gets installed,As codeception is just a library we would need to download it and all its dependancy.

-Create an folder say : CodeTest
-Create an file -Composer.json and include the below content winthin it.

{
    "require-dev": {
        "codeception/codeception": "*"
    }
}


-Once the file has been created navigate to the same folder from command prompt



-Fire the composer command to download codeception library --> composer install


-Once it completes download of all dependency , a new folder would have been added under our home folder which would be "vendor" and it'll look something like below -



Step-3: Install bootstrap

Once we install bootstrap, it add various hierarchy where we can define our tests.

To install, navigate to the Codecept/vendor/bin folder and fire the command below : -

"codecept bootstrap"



After the bootstrap configuration a new folder "tests" would have been added under "bin" folder as "tests".



If we navigate into "tests" folder and closely look into it, we would be able to see the different kin of roles defines: -



Now we have completely installed and configured codeception, we will have to define our feature based tests under the respective folder. I hope u enjoyed :)

No comments:

Post a Comment