Repository is archived
No commit activity in last 3 years
No release in over 3 years
Environment setup and step definitions for testing WordPress with Cucumber
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Runtime

 Project Readme

cucumber-wordpress¶ ↑

Environment setup and step definitions for testing WordPress with Cucumber.

Getting started¶ ↑

Install the gem:

gem install cucumber-wordpress --source http://gemcutter.org

Copy the examples/features/ directory into an existing WordPress installation (or plugin/theme):

cd wordpress-plugin
cp -R /usr/lib/ruby/gems/1.8/gems/cucumber-wordpress-1.0/examples/features .

Configure wp-config variables:

vim features/support/config.yml

ABSPATH should be WordPress' ABSPATH constant (the directory where wp-config.php is) relative to the directory you'd run cucumber in (where features/ is).

Run cucumber:

cucumber

Caveats¶ ↑

  • The WordPress installation you're testing must be being served over HTTP somehow (see WEBHOST in config.yml). Eventually I want to be able to start a Web server from within cucumber.

  • wp-config.php gets copied elsewhere and overwritten, so you can't be running this in a production environment.

Patches¶ ↑

  • Send me a pull request via GitHub or via email.

Author¶ ↑

  • Tom Adams <tom@thedextrousweb.com>

Copyright © 2009-2010 The Dextrous Web. See LICENCE for details.