gatling 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +42 -8
- data/lib/gatling/matchers/look_like_matcher.rb +0 -1
- data/lib/gatling/version.rb +1 -1
- metadata +10 -12
data/README.rdoc
CHANGED
@@ -4,13 +4,25 @@ Gatling Comparison allows one to build an Rspec / Capybara custom matcher compar
|
|
4
4
|
|
5
5
|
-------------------------------------
|
6
6
|
|
7
|
-
|
7
|
+
=== Installation:
|
8
|
+
|
9
|
+
gem install gatling
|
10
|
+
|
11
|
+
In spec_helper.rb :
|
12
|
+
|
13
|
+
#main app
|
14
|
+
require 'gatling'
|
15
|
+
|
16
|
+
#plug and play custom rspec matcher
|
17
|
+
require 'gatling/matchers/look_like_matcher'
|
18
|
+
|
19
|
+
=== Usage:
|
8
20
|
|
9
21
|
Identify an element to match, for example:
|
10
22
|
|
11
23
|
@element = page.find(:css, #button)
|
12
24
|
|
13
|
-
Use Gatling's custom matcher and specify the reference image:
|
25
|
+
Use Gatling's custom matcher (conveniently supplied in the gatling gem) and specify the reference image:
|
14
26
|
|
15
27
|
@element.should look_like('button_ref.png')
|
16
28
|
|
@@ -24,14 +36,33 @@ If no reference image exits, the test will fail, an exception will be raised and
|
|
24
36
|
|
25
37
|
-------------------------------------
|
26
38
|
|
27
|
-
|
39
|
+
=== The path config:
|
40
|
+
|
41
|
+
For Rails application, a default reference images folder will be created at spec/reference_images. This folder is root to all the reference
|
42
|
+
images to be compares.
|
28
43
|
|
29
|
-
|
44
|
+
Also created are subfolders:
|
45
|
+
- /candidate - will hold candidate images which can be used as reference images
|
46
|
+
- /diff - will hold the diff images generated by failed comparison tests
|
47
|
+
- /temp - will only ever hold one screenshot at a time, used to create the cropped element
|
30
48
|
|
31
|
-
|
49
|
+
==== For non-Rails apps or just to change the root reference folder specify in spec_help:
|
32
50
|
|
51
|
+
Gatling::Configuration.reference_image_path = "my custom path"
|
33
52
|
|
34
|
-
|
53
|
+
|
54
|
+
-------------------------------------
|
55
|
+
|
56
|
+
=== Training mode:
|
57
|
+
|
58
|
+
Gatling can be run in training mode which will create reference images where ones do not exist.
|
59
|
+
|
60
|
+
<b>CAUTION: Trainer mode will pass all the test which rely on the Gatling custom matcher, this can mean a false green build.
|
61
|
+
Please make sure you are saving 'clean' references</b>
|
62
|
+
|
63
|
+
Trainer mode will not overwrite existing references. If you are updating, just delete the old reference image.
|
64
|
+
|
65
|
+
To set trainer mode, prefix rspec command line with $GATLING_TRAINER = true
|
35
66
|
|
36
67
|
|
37
68
|
Example:
|
@@ -39,8 +70,11 @@ Example:
|
|
39
70
|
|
40
71
|
-------------------------------------
|
41
72
|
|
42
|
-
Non-gem dependencies:
|
43
|
-
|
73
|
+
==== Non-gem dependencies:
|
74
|
+
|
75
|
+
Imagemagick must be installed:
|
76
|
+
|
77
|
+
$sudo apt-get install imagemagick
|
44
78
|
|
45
79
|
-------------------------------------
|
46
80
|
|
data/lib/gatling/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gatling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-28 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rmagick
|
16
|
-
requirement: &
|
16
|
+
requirement: &70364760127060 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70364760127060
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rspec-core
|
27
|
-
requirement: &
|
27
|
+
requirement: &70364756259500 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70364756259500
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70364756259080 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70364756259080
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: capybara
|
49
|
-
requirement: &
|
49
|
+
requirement: &70364756258660 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70364756258660
|
58
58
|
description: Add visual comparison matchers for rspec
|
59
59
|
email:
|
60
60
|
- grotbart@gmail.com
|
@@ -87,7 +87,6 @@ files:
|
|
87
87
|
- spec/support/assets/smiley-bad.jpg
|
88
88
|
- spec/support/assets/smiley_app.rb
|
89
89
|
- spec/support/assets/views/smiley_site.erb
|
90
|
-
- spec/support/ready_candidate_ref/smiley-faceicon.png
|
91
90
|
homepage: http://github.com/GabrielRotbart/gatling
|
92
91
|
licenses: []
|
93
92
|
post_install_message:
|
@@ -122,4 +121,3 @@ test_files:
|
|
122
121
|
- spec/support/assets/smiley-bad.jpg
|
123
122
|
- spec/support/assets/smiley_app.rb
|
124
123
|
- spec/support/assets/views/smiley_site.erb
|
125
|
-
- spec/support/ready_candidate_ref/smiley-faceicon.png
|