watir_testlink_framework 0.0.1 → 0.0.2
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 +4 -4
- data/lib/tasks/testlink.rake +32 -10
- data/lib/watir_testlink_framework/version.rb +1 -1
- data/lib/watir_testlink_framework.rb +14 -5
- data/watir_testlink_framework.gemspec +2 -2
- metadata +3 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e456a0dedd58c4f4093f00d8bc3b7610a078bea2
|
4
|
+
data.tar.gz: 2881308fa14c2e8a04a87aad807e71397ca341e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfa94f96df4800b4b04782cc60fcd3315dd324ce91f34439d2edea089b062f7c4134959318b0cdbb03c37334d2f365a6a203683eab21362e555dd9c6a43e2c61
|
7
|
+
data.tar.gz: a76f2df0f1f270f5175ff85df95b41d761e0d23c1f161a2dfb1ef5ed3912240fd71835cb521e8c4999e2205a74dc9a5c9f77b87f8ef7ef528d91f7d986db123c
|
data/lib/tasks/testlink.rake
CHANGED
@@ -1,17 +1,33 @@
|
|
1
|
+
task default: %w[testlink:run_default_plan]
|
1
2
|
namespace :testlink do
|
2
|
-
desc 'run
|
3
|
-
task :
|
4
|
-
|
5
|
-
|
3
|
+
desc 'run default testplan'
|
4
|
+
task :run_default_plan do
|
5
|
+
|
6
|
+
if $config['testlink']['testplans'].keys[0].nil?
|
7
|
+
raise "No valid testplan defined in config.yml"
|
8
|
+
end
|
6
9
|
|
7
|
-
|
8
|
-
task :plan_production do
|
9
|
-
WatirTestlinkFramework::TestLinkPlan::run_plan_cases $config['testlink']['testplan_production']
|
10
|
+
WatirTestlinkFramework::TestLinkPlan::run_plan_cases $config['testlink']['testplans'].keys[0]
|
10
11
|
end
|
11
12
|
|
12
13
|
desc 'run plan by testplan name'
|
13
|
-
task :
|
14
|
-
WatirTestlinkFramework::TestLinkPlan::run_plan_cases args[:testplan]
|
14
|
+
task :run_plan,[:testplan] do |t, args|
|
15
|
+
WatirTestlinkFramework::TestLinkPlan::run_plan_cases args[:testplan], 'spec'
|
16
|
+
end
|
17
|
+
|
18
|
+
desc 'dry run plan by testplan name, show cli cmd'
|
19
|
+
task :dry_run_plan,[:testplan] do |t, args|
|
20
|
+
WatirTestlinkFramework::TestLinkPlan::run_plan_cases args[:testplan], 'spec', true
|
21
|
+
end
|
22
|
+
|
23
|
+
desc 'run plan by testplan name, format junit'
|
24
|
+
task :run_plan_junit,[:testplan] do |t, args|
|
25
|
+
WatirTestlinkFramework::TestLinkPlan::run_plan_cases args[:testplan], 'junit'
|
26
|
+
end
|
27
|
+
|
28
|
+
desc 'dry run plan by testplan name, show cli cmd, format junit'
|
29
|
+
task :dry_run_plan_junit,[:testplan] do |t, args|
|
30
|
+
WatirTestlinkFramework::TestLinkPlan::run_plan_cases args[:testplan], 'junit', true
|
15
31
|
end
|
16
32
|
|
17
33
|
desc 'Creates a spec file with all cases from TestLink requirements export'
|
@@ -35,8 +51,14 @@ namespace :testlink do
|
|
35
51
|
print "\nwrote output to tc-testlink.xml\n\n"
|
36
52
|
end
|
37
53
|
|
38
|
-
desc 'Run spec(s) with
|
54
|
+
desc 'Run spec(s) with doc output'
|
39
55
|
RSpec::Core::RakeTask.new(:spec) do |t|
|
56
|
+
t.rspec_opts = "--format documentation"
|
57
|
+
t.pattern = '**/*_spec.rb'
|
58
|
+
end
|
59
|
+
|
60
|
+
desc 'Run spec(s) with junit output'
|
61
|
+
RSpec::Core::RakeTask.new(:junit) do |t|
|
40
62
|
|
41
63
|
d = DateTime.now
|
42
64
|
newTarget = d.strftime("%Y%m%dT%H%M%S")
|
@@ -16,10 +16,9 @@ $config = YAML.load_file('config.yml')
|
|
16
16
|
module WatirTestlinkFramework
|
17
17
|
class TestLinkPlan
|
18
18
|
|
19
|
-
def self.run_plan_cases(plan)
|
20
|
-
#TL
|
21
|
-
#
|
22
|
-
# report back
|
19
|
+
def self.run_plan_cases(plan, spectask='spec', dryrun=false)
|
20
|
+
#TODO TL BuildPrefixName
|
21
|
+
#TODO report back
|
23
22
|
server = $config['testlink']['xmlrpc_url']
|
24
23
|
dev_key = $config['testlink']['apikey']
|
25
24
|
tl_project = $config['testlink']['project']
|
@@ -29,12 +28,22 @@ module WatirTestlinkFramework
|
|
29
28
|
project_id = tl.project_id tl_project
|
30
29
|
plan_id = tl.test_plan_by_name(tl_project, plan)
|
31
30
|
|
31
|
+
envstr=''
|
32
|
+
$config['testlink']['testplans'][plan].each do | varname, varvalue |
|
33
|
+
envstr+= "#{varname.upcase}='#{varvalue}' "
|
34
|
+
end
|
35
|
+
|
32
36
|
test_cases = tl.test_cases_for_test_plan(plan_id[0][:id])
|
33
37
|
test_cases.each do |tc|
|
34
38
|
tc_customfield = tl.test_case_custom_field_design_value(project_id, tc[1][0]['full_external_id'], tc[1][0]['version'].to_i, 'RSPEC CASE ID',{:details=>''})
|
35
39
|
|
40
|
+
exec_string = "#{envstr}bundle exec rake testlink:#{spectask} SPEC_OPTS=\"-e #{tc_customfield}\""
|
41
|
+
if dryrun
|
42
|
+
puts exec_string
|
43
|
+
else
|
44
|
+
system exec_string
|
45
|
+
end
|
36
46
|
#TODO exit 1 when failing
|
37
|
-
system("bundle exec rake testlink:spec SPEC_OPTS=\"-e #{tc_customfield}\"")
|
38
47
|
end
|
39
48
|
end
|
40
49
|
end
|
@@ -24,6 +24,6 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_runtime_dependency "rspec", "~> 3.1"
|
25
25
|
spec.add_runtime_dependency "rspec_testlink_formatters", "~> 0"
|
26
26
|
spec.add_runtime_dependency "testlink_rspec_utils", "~> 0"
|
27
|
-
spec.add_runtime_dependency "watir", "~> 5.0"
|
28
|
-
spec.add_runtime_dependency "headless", "~> 1.0"
|
27
|
+
# spec.add_runtime_dependency "watir", "~> 5.0"
|
28
|
+
# spec.add_runtime_dependency "headless", "~> 1.0"
|
29
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: watir_testlink_framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pim Snel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,34 +80,6 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: watir
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '5.0'
|
90
|
-
type: :runtime
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '5.0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: headless
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '1.0'
|
104
|
-
type: :runtime
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '1.0'
|
111
83
|
description: Watir TestLink Framework combines a lot of fine software like Watir,
|
112
84
|
TestLink, Rspec, Rake, Junit to make it easy to run large sets of watir test cases
|
113
85
|
on different stages of sites.
|
@@ -149,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
121
|
version: '0'
|
150
122
|
requirements: []
|
151
123
|
rubyforge_project:
|
152
|
-
rubygems_version: 2.4.
|
124
|
+
rubygems_version: 2.4.5
|
153
125
|
signing_key:
|
154
126
|
specification_version: 4
|
155
127
|
summary: Framework for testing website with Watir & TestLink
|