Skip to content
Newer
Older
100644 59 lines (35 sloc) 1.4 KB
d5feb38 @mocoso Added README
authored
1 = Cucumber Screenshot
2
3 Cucumber Screenshot adds a new output format to Cucumber that captures
4 screenshots of the pages generated by your Rails application as it runs your
5 Cucumber/Webrat features.
6
7 It uses WebKit to generate the screenshots and so is only available for OS X.
8
9 == Requirements
10
11 A Rails application with some features written in Cucumber/Webrat.
12
13 == Install
14
15 To install the latest release as a gem
16
17 sudo gem install cucumber-screenshot
18
19 == Use
20
21 Add the following line to your ./features/support/env.rb file
22
23 require 'cucumber_screenshot'
24
25 and then run
26
27 cucumber features --format screenshot
28
29 from your Rails application's directory.
30
31 This will create a ./features/screenshots directory in your Rails application
32 with subfolders for each scenario. Each subfolder will contain a screenshot of
33 each page generated and the html source of each of those pages.
34
35 == Capturing a single screenshot
36
37 If you want to capture a single screenshot rather than every page then add the
38 following step to one of your Rails application's step files
39
0af2710 @mocoso Fix typo
authored
40 Then "screenshot" do
d5feb38 @mocoso Added README
authored
41 screenshot.should be_true
42 end
43
44 and then add
45
46 Then screenshot
47
48 to your feature file in the place where you want to capture a screenshot of the
49 page that your application geneerated.
50
51 == TODO
52
53 - Clean out existing snapshots before each run
54 - Add support for tables
55
56 == License
57
58 Copyright (c) 2009 Joel Chippindale.
59 See MIT-LICENSE.txt in this directory.
Something went wrong with that request. Please try again.