gatling-rake 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/src/Gatling.rb +18 -0
- data/lib/src/GatlingCommand.rb +19 -0
- data/lib/src/GatlingParameterBuilder.rb +19 -0
- data/lib/src/RemoveDirectoryCommand.rb +11 -0
- data/lib/src/Shell.rb +8 -0
- data/lib/src/ShellCommand.rb +9 -0
- metadata +7 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDhhZmYxZTNjNGUzNDBjMzc5MDU3MGY1NTViOGZmYjZhN2MxNGUxNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDE1ZDRmZjE3NjA5ZGNjNjc5ZWU2OWYyYjMzMTllYTM1MWIxMDQwYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MWY3YThjYTI3ZWJiZGVhOTliNjQ1ZGRjYjBjYzUxM2JmMDRmNjFiMjkxZmEy
|
10
|
+
NmU4ZmZhZTA4MGEzNTBlMjQ0YjJkOTU2ZmNmMjllODgyNmE0NjI5MDcxMDQz
|
11
|
+
MjZkNmQyNjY1NGIyY2JjY2MwNmQ3ZjM3OTJhNzQzNDQ3MGUxMDA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGRkMmRkNGZiYjY5YjA3MmQwOWQ3ZDJjNDI5MDgzNmRhYzdhZWFmYWMyOWU1
|
14
|
+
NmZlMmJmYTI3ZWIwZTkxZmVhYjQxYWViZjg3Y2IyODExNzFhYWQ0MWRiNDZh
|
15
|
+
MWU2MzA0NGQzOGI2NmJkNzkyNDc1MGU4ZTQyZmViMDQyZjY2MDI=
|
data/lib/src/Gatling.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require_relative 'GatlingCommand'
|
2
|
+
require_relative 'RemoveDirectoryCommand'
|
3
|
+
|
4
|
+
module RakeGatling
|
5
|
+
class Gatling
|
6
|
+
include Commands
|
7
|
+
def initialize(shell)
|
8
|
+
@shell = shell
|
9
|
+
@remove_directory = RemoveDirectoryCommand.new(shell)
|
10
|
+
@run_gatling = GatlingCommand.new(shell)
|
11
|
+
end
|
12
|
+
|
13
|
+
def start(parameters)
|
14
|
+
@remove_directory.execute(parameters[:results_directory])
|
15
|
+
@run_gatling.execute(parameters)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require_relative 'ShellCommand'
|
2
|
+
require_relative 'GatlingParameterBuilder'
|
3
|
+
|
4
|
+
module RakeGatling
|
5
|
+
module Commands
|
6
|
+
class GatlingCommand < ShellCommand
|
7
|
+
def initialize(shell)
|
8
|
+
super
|
9
|
+
@parameter_builder = GatlingParameterBuilder.new
|
10
|
+
end
|
11
|
+
|
12
|
+
def execute(parameters)
|
13
|
+
gatling_parameters = @parameter_builder.buildFrom(parameters)
|
14
|
+
gatling_file_location = parameters[:gatling_file_location]
|
15
|
+
@shell.execute("#{gatling_file_location} #{gatling_parameters}")
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module RakeGatling
|
2
|
+
module Commands
|
3
|
+
class GatlingParameterBuilder
|
4
|
+
def buildFrom(parameters)
|
5
|
+
load_test_root = parameters[:load_test_root]
|
6
|
+
gatling_parameters = {
|
7
|
+
'-bf' => "#{load_test_root}/request-bodies",
|
8
|
+
'-sf' => "#{load_test_root}/simulations",
|
9
|
+
'-df' => "#{load_test_root}/data",
|
10
|
+
'-rf' => parameters[:results_directory],
|
11
|
+
'-s' => parameters[:simulation],
|
12
|
+
'-sd' => "\"#{parameters[:simulation_description]}\""
|
13
|
+
}
|
14
|
+
gatling_parameter_string = gatling_parameters.map{
|
15
|
+
| key , value | "#{key} #{value}"}.join(' ')
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/src/Shell.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gatling-rake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- iainjmitchell
|
@@ -17,6 +17,12 @@ extensions: []
|
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
19
|
- lib/GatlingRake.rb
|
20
|
+
- lib/src/Gatling.rb
|
21
|
+
- lib/src/GatlingCommand.rb
|
22
|
+
- lib/src/GatlingParameterBuilder.rb
|
23
|
+
- lib/src/RemoveDirectoryCommand.rb
|
24
|
+
- lib/src/Shell.rb
|
25
|
+
- lib/src/ShellCommand.rb
|
20
26
|
homepage: https://github.com/code-computerlove/gatling-rake
|
21
27
|
licenses:
|
22
28
|
- MIT
|