Skip to content

do-see/testing-setup

 
 

Repository files navigation

Workshop Testing Setup

Please make sure that you have a working setup of:

  • PHP 5.4 (or newer)
  • A Git client

Installation

  1. Make sure PHP is installed on your machine. The following link has more information on how to install PHP: http://www.phptherightway.com/#getting\_started On a Debian/Ubuntu-based machine installing PHP is as simple as calling apt-get install php5 php5-cli as root user.

  2. Using your Git client, checkout https://github.com/QafooLabs/testing-setup.git to a directory of your choice. On the shell you can do that using $ git clone https://github.com/QafooLabs/testing-setup.git.

  3. Switch into the directory of the checkout and call $ php composer.phar install --prefer-dist to install all the dependencies.

  4. [PHPUnit] Try to execute PHPUnit using $ vendor/bin/phpunit, the result should be a single successful test run.

  5. [Behat] Try to execute Behat using $ vendor/bin/behat, the result should be at least 3 passed tests.

Links

Vagrant setup (optional)

For those who are interested there is a vagrant setup available (optional). Just follow these steps to get up and running with your own Virtual environment.

  • Install Virtualbox and Vagrant
  • From the root of this git repository run $ vagrant up and wait for the VM to boot and provision
  • SSH into the VM by running $ vagrant ssh and switch to the testing-setup directory using $ cd testing-setup

Once in the virtual machine you can find all files in /home/vagrant/testing-setup, this is actually the folder on your machine (the host) you ran the vagrant up command from, mounted into the Virtual machine. All changes made to files inside this directory on your computer will reflect immediately on the Virtual machine. This allows you to run PHPUnit on the VM through an SSH session while still being able to edit the files on your computer with your favourite editor or IDE.

To test if all is installed correct run $ phpunit from the testing-setup folder in your VM.

About

Qafoo base repository for testing workshops.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 53.6%
  • Shell 18.7%
  • Puppet 15.1%
  • Gherkin 12.6%