watir_testlink_framework 0.0.3 → 0.0.4
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/CHANGELOG.md +6 -0
- data/lib/watir_testlink_framework.rb +66 -13
- data/lib/watir_testlink_framework/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b5efc70001d005a4a3913f9d56dc48663286dd1
|
4
|
+
data.tar.gz: 3cad3bb62b09a36d2151a033ab779c8c140c8242
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7adaa57f852cc4d06cbdd1810dcbd9849ddb1a8cca84e7eea1652866f2d9a869e1f16746fa90fa49728958563f7fa2f67bfa2003affa417764bb9e10131f5b67
|
7
|
+
data.tar.gz: 7210f6985708434e81dacc2e2305ce6b6fcfe7f373184cddc2a12bd3c7de43f70322fa57f013560770ffa8e84bab4fb32879d1b7ce71852384de968c1c85ac42
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# CHANGLOG
|
2
2
|
|
3
|
+
# v0.0.4 - 2015-01-23
|
4
|
+
* add multi-environment functionality:one test plan multiple agains
|
5
|
+
multiple urls
|
6
|
+
* add semicolon seperated plans: one call run different plans. for
|
7
|
+
environments serving multiple url's at once
|
8
|
+
|
3
9
|
# v0.0.3 - 2015-01-21
|
4
10
|
* restore ci and production preset tasks
|
5
11
|
|
@@ -13,29 +13,53 @@ raise "Fatal: config.yml is missing." unless File.exists?('config.yml')
|
|
13
13
|
|
14
14
|
$config = YAML.load_file('config.yml')
|
15
15
|
|
16
|
+
#TODO TL BuildPrefixName
|
17
|
+
#TODO report back
|
18
|
+
#TODO exit 1 when failing
|
16
19
|
module WatirTestlinkFramework
|
17
20
|
class TestLinkPlan
|
18
21
|
|
19
|
-
def self.
|
20
|
-
#TODO TL BuildPrefixName
|
21
|
-
#TODO report back
|
22
|
+
def self.testlinkplanconnection
|
22
23
|
server = $config['testlink']['xmlrpc_url']
|
23
24
|
dev_key = $config['testlink']['apikey']
|
24
|
-
|
25
|
+
return TestLinker.new(server, dev_key)
|
26
|
+
end
|
25
27
|
|
26
|
-
|
28
|
+
def self.casesbyplan(tl,plan)
|
29
|
+
plan_id = tl.test_plan_by_name($config['testlink']['project'], plan)
|
30
|
+
return tl.test_cases_for_test_plan(plan_id[0][:id])
|
31
|
+
end
|
27
32
|
|
28
|
-
|
29
|
-
|
33
|
+
#plans_string comma seperated string with plans
|
34
|
+
def self.run_plan_cases(plans_string, spectask='spec', dryrun=false)
|
35
|
+
|
36
|
+
tl = self.testlinkplanconnection
|
37
|
+
|
38
|
+
plans = plans_string.split(';')
|
39
|
+
|
40
|
+
plans.each do | plan |
|
41
|
+
test_cases = self.casesbyplan(tl,plan.strip)
|
42
|
+
if $config['testlink'].has_key?("multi_env") && $config['testlink']['multi_env'] != 0
|
43
|
+
$config['testlink']['testplans'][plan.strip].each do | envname, envarr |
|
44
|
+
envstr = make_env_string(envarr)
|
45
|
+
self.execute_cases(tl, envstr,spectask,test_cases,dryrun)
|
46
|
+
end
|
47
|
+
else
|
48
|
+
envstr = make_env_string($config['testlink']['testplans'][plan.strip])
|
49
|
+
self.execute_cases(tl, envstr,spectask, test_cases,dryrun)
|
50
|
+
end
|
30
51
|
|
31
|
-
envstr=''
|
32
|
-
$config['testlink']['testplans'][plan].each do | varname, varvalue |
|
33
|
-
envstr+= "#{varname.upcase}='#{varvalue}' "
|
34
52
|
end
|
35
53
|
|
36
|
-
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.execute_cases(tl, envstr,spectask, test_cases,dryrun)
|
37
57
|
test_cases.each do |tc|
|
38
|
-
|
58
|
+
|
59
|
+
tc_customfield = tl.test_case_custom_field_design_value(tl.project_id($config['testlink']['project']),
|
60
|
+
tc[1][0]['full_external_id'],
|
61
|
+
tc[1][0]['version'].to_i,
|
62
|
+
'RSPEC CASE ID',{:details=>''})
|
39
63
|
|
40
64
|
exec_string = "#{envstr}bundle exec rake testlink:#{spectask} SPEC_OPTS=\"-e #{tc_customfield}\""
|
41
65
|
if dryrun
|
@@ -43,8 +67,37 @@ module WatirTestlinkFramework
|
|
43
67
|
else
|
44
68
|
system exec_string
|
45
69
|
end
|
46
|
-
#TODO exit 1 when failing
|
47
70
|
end
|
48
71
|
end
|
72
|
+
|
73
|
+
def self.make_env_string(envarr)
|
74
|
+
envstr=''
|
75
|
+
envarr.each do | varname,varvalue|
|
76
|
+
envstr+= "#{varname.upcase}='#{varvalue}' "
|
77
|
+
end
|
78
|
+
return envstr
|
79
|
+
end
|
80
|
+
|
49
81
|
end
|
50
82
|
end
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
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.4
|
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-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|