brpm_module_selenium 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +15 -0
- data/.gitignore +37 -0
- data/.ruby-version +1 -0
- data/.travis.yml +17 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +7 -0
- data/Rakefile +24 -0
- data/automations/execute_test_run.rb +4 -0
- data/automations/execute_test_run.txt +14 -0
- data/brpm_module_selenium.gemspec +39 -0
- data/config.yml +13 -0
- data/lib/selenium_cli_client.rb +11 -0
- data/tests/execute_test_run_spec.rb +21 -0
- data/tests/spec_helper.rb +41 -0
- metadata +116 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NGZlOThhMDhjYzBmY2E1MWQ1Y2I4ZDYzNTE3YWYwNjFhYTU4ZDM1ZA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NTQ4Y2JjYzI3Y2M2ZjIyYThjNTQ4YzE2YWJjYWZkMjljYWU4NjFiMw==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZDBmMjRlMWViY2RkZjEwY2Q2NDA3ODdjZjZiYWViNDdjN2U5ODc2N2M5NTBk
|
10
|
+
M2E3Y2ZmYmY0MDdlNGFkYjU1MWNlMWQ5NjE4MDQ1MzUyYTAyODRjNTYxZmMy
|
11
|
+
OTlkNzRmYjhmNjQ5MTMzZTZhYjUxZmY5Zjk3YzI3YmZjNjAxOGE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MDM0MzRlMzNkZDIzMmMyMTQyMWYxYmY2ZTI1ZTY2NGZmMTg0N2U5OTQzMDg0
|
14
|
+
ZjEzMWRiYzEyOGI2ZTBhYjc5ZmExZGQ0MTlkMGYwYmQ5MzA0YTYwYzFjYWQ1
|
15
|
+
MWI2OGQ3NGJhYWEyNzQ5MGJhM2ExYTgyYmE1Y2Y0Y2IwYzYyNTI=
|
data/.gitignore
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/test/tmp/
|
9
|
+
/test/version_tmp/
|
10
|
+
/tmp/
|
11
|
+
|
12
|
+
## Specific to RubyMotion:
|
13
|
+
.dat*
|
14
|
+
.repl_history
|
15
|
+
build/
|
16
|
+
|
17
|
+
## Documentation cache and generated files:
|
18
|
+
/.yardoc/
|
19
|
+
/_yardoc/
|
20
|
+
/doc/
|
21
|
+
/rdoc/
|
22
|
+
|
23
|
+
## Environment normalisation:
|
24
|
+
/.bundle/
|
25
|
+
/lib/bundler/man/
|
26
|
+
|
27
|
+
# for a library or gem, you might want to ignore these files since the code is
|
28
|
+
# intended to run in multiple environments; otherwise, check them in:
|
29
|
+
Gemfile.lock
|
30
|
+
.ruby-gemset
|
31
|
+
|
32
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
33
|
+
.rvmrc
|
34
|
+
|
35
|
+
.DS_Store
|
36
|
+
|
37
|
+
.idea
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.9.3-p392
|
data/.travis.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
language: ruby
|
2
|
+
|
3
|
+
before_install:
|
4
|
+
- gem update --system 2.1.9
|
5
|
+
|
6
|
+
bundler_args: '' #remove the --deployment flag that causes the gems to be installed in .../1.9.1/...
|
7
|
+
|
8
|
+
script:
|
9
|
+
- rspec tests --format documentation --color
|
10
|
+
|
11
|
+
notifications:
|
12
|
+
email:
|
13
|
+
- niek.bartholomeus@gmail.com
|
14
|
+
|
15
|
+
branches:
|
16
|
+
except:
|
17
|
+
- /^v[0-9.]*/
|
data/Gemfile
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gemspec
|
4
|
+
|
5
|
+
# gem "brpm_content", path: "#{ENV["BRPM_CONTENT_PATH"]}/gems/brpm_content-latest" #TODO: doesn't work: "Could not find gem 'brpm_content (>= 0) ruby'..."
|
6
|
+
# gem "brpm_content", path: "/Users/niek/src/bmc/brpm_content" # works fine but is specific to my local configuration
|
7
|
+
|
8
|
+
# TODO: not sure how the framework can get hold of this configuration to find out where this modules is located (for now we're using a symlink from the gem path to the source path)
|
9
|
+
# gem "brpm_module_selenium", path: "."
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 BMC
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
# Selenium module for BRPM
|
2
|
+
|
3
|
+
[](https://travis-ci.org/BMC-RLM/brpm_module_selenium)
|
4
|
+
|
5
|
+
[](http://badge.fury.io/rb/brpm_module_selenium)
|
6
|
+
|
7
|
+
This repository represents an external module for BRPM, to be used on top of the [BRPM content repository](https://github.com/BMC-RLM/brpm_content)
|
data/Rakefile
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# Copied from https://github.com/mitchellh/vagrant-aws/blob/master/Rakefile
|
2
|
+
require 'rubygems'
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
|
6
|
+
# Immediately sync all stdout so that tools like buildbot can
|
7
|
+
# immediately load in the output.
|
8
|
+
$stdout.sync = true
|
9
|
+
$stderr.sync = true
|
10
|
+
|
11
|
+
# Change to the directory of this file.
|
12
|
+
Dir.chdir(File.expand_path("../", __FILE__))
|
13
|
+
|
14
|
+
# This installs the tasks that help with gem creation and
|
15
|
+
# publishing.
|
16
|
+
Bundler::GemHelper.install_tasks
|
17
|
+
|
18
|
+
# Install the `spec` task so that we can run tests.
|
19
|
+
RSpec::Core::RakeTask.new do |task|
|
20
|
+
task.pattern = "tests/**/*_spec.rb"
|
21
|
+
end
|
22
|
+
|
23
|
+
# Default task is to run the unit tests
|
24
|
+
task :default => "spec"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
#=== BMC Application Automation Integration Server: Selenium ===#
|
2
|
+
# [integration_id=xxxxxxxx]
|
3
|
+
#=== End ===#
|
4
|
+
|
5
|
+
require "#{params["SS_script_support_path"]}/git_repos/brpm_content/modules/framework/brpm_script_executor.rb"
|
6
|
+
|
7
|
+
params["direct_execute"] = "true"
|
8
|
+
|
9
|
+
params["SS_integration_dns"] = SS_integration_dns
|
10
|
+
params["SS_integration_username"] = SS_integration_username
|
11
|
+
params["SS_integration_password_enc"] = SS_integration_password_enc
|
12
|
+
params["SS_integration_details"] = YAML.load(SS_integration_details)
|
13
|
+
|
14
|
+
BrpmScriptExecutor.execute_automation_script("brpm_module_selenium", "execute_test_run", params)
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require "yaml"
|
2
|
+
|
3
|
+
config = YAML.load_file(File.join(File.dirname(__FILE__), "config.yml"))
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = File.basename(File.expand_path(File.dirname(__FILE__)))
|
7
|
+
spec.version = config["version"]
|
8
|
+
spec.platform = Gem::Platform::RUBY
|
9
|
+
spec.license = "GNU General Public License v2.0"
|
10
|
+
spec.authors = [config["author"]]
|
11
|
+
spec.email = config["email"]
|
12
|
+
spec.homepage = config["homepage"]
|
13
|
+
spec.summary = config["summary"]
|
14
|
+
spec.description = config["description"]
|
15
|
+
|
16
|
+
spec.add_runtime_dependency "brpm_content", ">=0.1.10"
|
17
|
+
|
18
|
+
if config["dependencies"]
|
19
|
+
config["dependencies"].each do |dependency|
|
20
|
+
if dependency.is_a?(Hash)
|
21
|
+
modul = dependency.keys[0]
|
22
|
+
options = dependency.values[0]
|
23
|
+
else
|
24
|
+
modul = dependency
|
25
|
+
options = {}
|
26
|
+
end
|
27
|
+
spec.add_runtime_dependency modul, options["version"] unless ["brpm", "bladelogic", "jira"].include?(modul)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
spec.add_development_dependency "rake"
|
32
|
+
spec.add_development_dependency "rspec"
|
33
|
+
|
34
|
+
spec.files = `git ls-files`.split("\n")
|
35
|
+
spec.require_path = 'lib'
|
36
|
+
|
37
|
+
spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
38
|
+
spec.bindir = "bin"
|
39
|
+
end
|
data/config.yml
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
dependencies:
|
2
|
+
- brpm_module_brpm: { version: "0.1.10" }
|
3
|
+
|
4
|
+
integration_servers:
|
5
|
+
- JIRA
|
6
|
+
|
7
|
+
version: 0.1.9
|
8
|
+
|
9
|
+
author: Niek Bartholomeus
|
10
|
+
email: niek.bartholomeus@gmail.com
|
11
|
+
homepage: https://github.com/BMC-RLM/brpm_module_selenium
|
12
|
+
summary: Selenium automation scripts and libraries to run on top of the BRPM Content framework
|
13
|
+
description: Selenium automation scripts and libraries to run on top of the BRPM Content framework. See https://github.com/BMC-RLM/brpm_content for more information about the BRPM Content framework
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class SeleniumCliClient
|
2
|
+
def initialize(integration_settings = BrpmAuto.integration_settings)
|
3
|
+
@url = integration_settings.dns
|
4
|
+
@username = integration_settings.username
|
5
|
+
@password = integration_settings.password
|
6
|
+
end
|
7
|
+
|
8
|
+
def execute_test_run(application, component)
|
9
|
+
BrpmAuto.execute_shell("pwd") # selenium execute #{application}_#{component}") #TODO: dummy implementation
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require "#{File.dirname(__FILE__)}/spec_helper"
|
2
|
+
|
3
|
+
describe 'execute test run' do
|
4
|
+
before(:all) do
|
5
|
+
setup_brpm_auto
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'run the tests' do
|
9
|
+
params = get_default_params
|
10
|
+
params = params.merge(get_integration_params_for_selenium)
|
11
|
+
|
12
|
+
params["application"] = 'E-Finance'
|
13
|
+
params["application"] = 'EF - java calculation engine'
|
14
|
+
BrpmScriptExecutor.execute_automation_script_from_gem("brpm_module_selenium", "execute_test_run", params)
|
15
|
+
|
16
|
+
#verify the tests: check if the tests were executed succesfully
|
17
|
+
#test_run = @selenium_cli_client.get_test_run(...)
|
18
|
+
#expect(test_run).not_to be_nil
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
require "brpm_script_executor"
|
3
|
+
|
4
|
+
def setup_brpm_auto
|
5
|
+
FileUtils.mkdir_p "/tmp/brpm_content"
|
6
|
+
create_symlink_to_gemset
|
7
|
+
|
8
|
+
BrpmAuto.setup( get_default_params.merge!(get_integration_params_for_selenium) )
|
9
|
+
|
10
|
+
BrpmAuto.require_module_from_gem "brpm_module_selenium"
|
11
|
+
|
12
|
+
@selenium_cli_client = SeleniumCliClient.new
|
13
|
+
end
|
14
|
+
|
15
|
+
def get_default_params
|
16
|
+
params = {}
|
17
|
+
params['also_log_to_console'] = 'true'
|
18
|
+
|
19
|
+
params['brpm_url'] = 'http://brpm-content.pulsar-it.be:8088/brpm'
|
20
|
+
params['brpm_api_token'] = ENV["BRPM_API_TOKEN"]
|
21
|
+
|
22
|
+
params['output_dir'] = "/tmp/brpm_content"
|
23
|
+
|
24
|
+
params
|
25
|
+
end
|
26
|
+
|
27
|
+
def get_integration_params_for_selenium
|
28
|
+
params = {}
|
29
|
+
params["SS_integration_dns"] = 'http://brpm.pulsar-it.be:9090'
|
30
|
+
params["SS_integration_username"] = 'brpm'
|
31
|
+
params["SS_integration_password"] = ENV["SELENIUM_PASSWORD"]
|
32
|
+
|
33
|
+
params
|
34
|
+
end
|
35
|
+
|
36
|
+
def create_symlink_to_gemset
|
37
|
+
module_name = File.basename(File.expand_path("#{File.dirname(__FILE__)}/.."))
|
38
|
+
symlink = "#{ENV["GEM_HOME"]}/gems/#{module_name}-999.0.0"
|
39
|
+
FileUtils.rm(symlink) if File.exists?(symlink)
|
40
|
+
FileUtils.ln_s(File.expand_path("#{File.dirname(__FILE__)}/.."), symlink)
|
41
|
+
end
|
metadata
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: brpm_module_selenium
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.9
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Niek Bartholomeus
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-07-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: brpm_content
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.1.10
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ! '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.1.10
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: brpm_module_brpm
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.1.10
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.1.10
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: Selenium automation scripts and libraries to run on top of the BRPM Content
|
70
|
+
framework. See https://github.com/BMC-RLM/brpm_content for more information about
|
71
|
+
the BRPM Content framework
|
72
|
+
email: niek.bartholomeus@gmail.com
|
73
|
+
executables: []
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- .gitignore
|
78
|
+
- .ruby-version
|
79
|
+
- .travis.yml
|
80
|
+
- Gemfile
|
81
|
+
- LICENSE
|
82
|
+
- README.md
|
83
|
+
- Rakefile
|
84
|
+
- automations/execute_test_run.rb
|
85
|
+
- automations/execute_test_run.txt
|
86
|
+
- brpm_module_selenium.gemspec
|
87
|
+
- config.yml
|
88
|
+
- lib/selenium_cli_client.rb
|
89
|
+
- tests/execute_test_run_spec.rb
|
90
|
+
- tests/spec_helper.rb
|
91
|
+
homepage: https://github.com/BMC-RLM/brpm_module_selenium
|
92
|
+
licenses:
|
93
|
+
- GNU General Public License v2.0
|
94
|
+
metadata: {}
|
95
|
+
post_install_message:
|
96
|
+
rdoc_options: []
|
97
|
+
require_paths:
|
98
|
+
- lib
|
99
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ! '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - ! '>='
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '0'
|
109
|
+
requirements: []
|
110
|
+
rubyforge_project:
|
111
|
+
rubygems_version: 2.1.9
|
112
|
+
signing_key:
|
113
|
+
specification_version: 4
|
114
|
+
summary: Selenium automation scripts and libraries to run on top of the BRPM Content
|
115
|
+
framework
|
116
|
+
test_files: []
|