Skip to content

Sandbox for playing around with Drupal Commerce Kickstart and Behat

Notifications You must be signed in to change notification settings

nlisgo/drupal-kickstart-behat

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

drupal-kickstart-behat

A sandbox proof of concept for a session at Drupalcamp London (http://2013.drupalcamplondon.co.uk/session/zip-bdd-do-dah-zip-bdd-ay).

Uses the Drupal 7 Commerce Kickstart profile (http://drupal.org/project/commerce_kickstart), with Behat/Mink testing using Travis CI (https://travis-ci.org)

Build Status

Installation

# Clone repo
git clone https://github.com/nlisgo/drupal-kickstart-behat.git public_html

# Create Drupal codebase
cd public_html
drush make build-commerce-kickstart.make www

# Create Drupal database
mysql -e 'create database DB_NAME;' -u USERNAME -p PASSWORD

# Install Drupal
cd www
drush si commerce_kickstart --sites-subdir=default --db-url=mysql://USERNAME:[email protected]/DB_NAME --account-name=admin --account-pass=admin [email protected] --site-name="Commerce Kickstart Profile" --yes

# Start webserver - in another terminal window from the Drupal root folder (public_html/www)
drush rs 8888

# Install testing tools - go back to the previous terminal window
cd ../tests/behat
curl -s http://getcomposer.org/installer | php
php composer.phar install
Configure Behat

Copy behat.local.yml.example to behat.local.yml and edit behat.local.yml by setting the drupal_root to the full path of the Drupal root

To run tests

# Run tests
./bin/behat

To run tests with javascript using selenium server

# Download selenium standalone server
curl -O http://selenium.googlecode.com/files/selenium-server-standalone-2.39.0.jar

# Run selenium - in another terminal window from the behat folder (public_html/tests/behat)
java -jar selenium-server-standalone-2.39.0.jar

# Run tests - go back to the previous terminal window
./bin/behat
Setup Travis CI

Fork this project on github to your personal account.

Setup your Travis CI account by logging in to http://travis-ci.org with you github credentials.

Switch on the repository from with in Travis CI.

Travis-CI Setup

To start a Travis CI build either push a change to your github repo or navigate to the service hooks page on your github repo and find the Travis hook and click the 'Test Hook' button.

About

Sandbox for playing around with Drupal Commerce Kickstart and Behat

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 77.9%
  • Shell 22.1%