testability-driver 1.3.2 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tdriver/base/test_object/xml/adapter.rb +12 -3
- data/lib/tdriver/report/report_api.rb +15 -0
- data/lib/tdriver/report/report_creator.rb +4 -1
- data/lib/tdriver/report/report_data_presentation.rb +1 -1
- data/lib/tdriver/report/report_test_run.rb +46 -0
- data/lib/tdriver/verify/verify.rb +3 -3
- data/lib/tdriver/version.rb +1 -1
- data/xml/templates/generic.xml +2 -1
- metadata +5 -5
@@ -48,10 +48,19 @@ module TDriver
|
|
48
48
|
if @partial_match_allowed.include?( [ object_type, key ] )
|
49
49
|
|
50
50
|
# regexp support is needed also here
|
51
|
+
if value.kind_of?( Regexp )
|
52
|
+
|
53
|
+
prefix_value = "regexp_compare(#{ prefix_key },'#{ value.source }',#{ value.options })"
|
54
|
+
attribute_value = "regexp_compare(.,'#{ value.source }',#{ value.options })"
|
55
|
+
|
56
|
+
prefix_key = ""
|
51
57
|
|
52
|
-
|
53
|
-
|
54
|
-
|
58
|
+
else
|
59
|
+
|
60
|
+
prefix_value = "[contains(.,#{ value })]"
|
61
|
+
attribute_value = "contains(.,#{ value })"
|
62
|
+
|
63
|
+
end
|
55
64
|
else
|
56
65
|
|
57
66
|
if value.kind_of?( Regexp )
|
@@ -129,6 +129,21 @@ module TDriverReportAPI
|
|
129
129
|
end
|
130
130
|
end
|
131
131
|
|
132
|
+
# This method logs data to the all_cases.xml
|
133
|
+
#
|
134
|
+
# === params
|
135
|
+
# column_name: name of the column
|
136
|
+
# value: value for the entry
|
137
|
+
# === returns
|
138
|
+
# nil
|
139
|
+
# === raises
|
140
|
+
def tdriver_log_data_in_xml(column_name,value)
|
141
|
+
raise TypeError.new("Argument to method cannot be nil.") if column_name.nil? || value.nil?
|
142
|
+
if $tdriver_reporter!=nil
|
143
|
+
$tdriver_reporter.set_user_xml_data(column_name,value)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
132
147
|
# This method logs data test case details
|
133
148
|
#
|
134
149
|
# === params
|
@@ -186,6 +186,7 @@ module TDriverReportCreator
|
|
186
186
|
)
|
187
187
|
|
188
188
|
|
189
|
+
$tdriver_reporter.test_case_user_xml_data=Hash.new
|
189
190
|
$tdriver_reporter.set_end_time(Time.now)
|
190
191
|
$tdriver_reporter.set_total_run(1)
|
191
192
|
$tdriver_reporter.update_summary_page('inprogress')
|
@@ -231,7 +232,7 @@ module TDriverReportCreator
|
|
231
232
|
chronological_data_rows=$tdriver_reporter.test_case_user_chronological_table_data
|
232
233
|
$new_test_case.set_test_case_chronological_view_data(chronological_data_rows)
|
233
234
|
$tdriver_reporter.set_user_data(nil)
|
234
|
-
$tdriver_reporter.set_user_chronological_table_data(nil)
|
235
|
+
$tdriver_reporter.set_user_chronological_table_data(nil)
|
235
236
|
end
|
236
237
|
end
|
237
238
|
|
@@ -595,6 +596,8 @@ module TDriverReportCreator
|
|
595
596
|
|
596
597
|
update_run($new_test_case.test_case_name.to_s,status,$new_test_case.test_case_reboots,$new_test_case.test_case_crash_files,execution_log)
|
597
598
|
|
599
|
+
|
600
|
+
|
598
601
|
$new_junit_xml_results.add_test_result(status, $new_test_case.test_case_start_time, $new_test_case.test_case_end_time)
|
599
602
|
tdriver_update_sequential_fails( status ) if $parameters[ :runner_sequence_skip, "false" ] == "true"
|
600
603
|
|
@@ -75,7 +75,7 @@ module TDriverReportDataPresentation
|
|
75
75
|
filename = "graph.png" if filename.nil?
|
76
76
|
title = "Application Start Performance" if title.nil?
|
77
77
|
create_graph_image(data, filename, title)
|
78
|
-
html = "\n<img class='graph' src='#{filename}' style='width:#{ width.nil? ? 'auto' : width.to_s + 'px' }'/>\n"
|
78
|
+
html = "\n<img class='graph' src='#{File.basename(filename)}' style='width:#{ width.nil? ? 'auto' : width.to_s + 'px' }'/>\n"
|
79
79
|
end
|
80
80
|
|
81
81
|
## This method will create an html table tag with the data provided
|
@@ -40,6 +40,7 @@ module TDriverReportCreator
|
|
40
40
|
:test_run_behaviour_log,
|
41
41
|
:test_run_user_log,
|
42
42
|
:test_case_user_data,
|
43
|
+
:test_case_user_xml_data,
|
43
44
|
:test_case_user_data_columns,
|
44
45
|
:test_case_user_chronological_table_data,
|
45
46
|
:attached_test_reports,
|
@@ -81,6 +82,7 @@ module TDriverReportCreator
|
|
81
82
|
@test_case_user_data=Array.new
|
82
83
|
@test_case_user_data_columns = Array.new
|
83
84
|
@test_case_user_chronological_table_data = Hash.new
|
85
|
+
@test_case_user_xml_data = Hash.new
|
84
86
|
@attached_test_reports = Array.new
|
85
87
|
@report_pages_ready=Array.new
|
86
88
|
@memory_amount_start='-'
|
@@ -183,6 +185,21 @@ module TDriverReportCreator
|
|
183
185
|
@test_case_user_chronological_table_data[column_name.to_s]=value.to_s
|
184
186
|
end
|
185
187
|
end
|
188
|
+
|
189
|
+
#This method adds user xml data
|
190
|
+
#
|
191
|
+
# === params
|
192
|
+
# column_name: the column name in xml
|
193
|
+
# value: the data
|
194
|
+
# === returns
|
195
|
+
# nil
|
196
|
+
# === raises
|
197
|
+
def set_user_xml_data(column_name,value)
|
198
|
+
if (!column_name.empty? && column_name!=nil)
|
199
|
+
@test_case_user_xml_data[column_name.to_s]=value.to_s
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
186
203
|
#This method sets the test run behaviour log
|
187
204
|
#
|
188
205
|
# === params
|
@@ -850,6 +867,7 @@ module TDriverReportCreator
|
|
850
867
|
total_received=0,
|
851
868
|
user_data_rows=nil,
|
852
869
|
user_data_columns=nil)
|
870
|
+
|
853
871
|
while $result_storage_in_use==true
|
854
872
|
sleep 1
|
855
873
|
end
|
@@ -947,6 +965,17 @@ module TDriverReportCreator
|
|
947
965
|
test<<test_data
|
948
966
|
end
|
949
967
|
|
968
|
+
if @test_case_user_xml_data!=nil
|
969
|
+
test_data = Nokogiri::XML::Node.new("non_display_data",test)
|
970
|
+
#create the table rows
|
971
|
+
@test_case_user_xml_data.each_key do |key|
|
972
|
+
data_value=Nokogiri::XML::Node.new("data",test_data)
|
973
|
+
data_value.set_attribute("id",key.to_s)
|
974
|
+
data_value.content = @test_case_user_xml_data[key].to_s
|
975
|
+
test_data << data_value
|
976
|
+
end
|
977
|
+
test<<test_data
|
978
|
+
end
|
950
979
|
|
951
980
|
xml_data.root.add_child(test)
|
952
981
|
File.open(file, 'wb') {|f| f.write(xml_data) }
|
@@ -1005,6 +1034,23 @@ module TDriverReportCreator
|
|
1005
1034
|
}
|
1006
1035
|
|
1007
1036
|
end
|
1037
|
+
|
1038
|
+
|
1039
|
+
if @test_case_user_xml_data!=nil
|
1040
|
+
|
1041
|
+
xml.non_display_data{
|
1042
|
+
#create the table rows
|
1043
|
+
@test_case_user_xml_data.each_key do |key|
|
1044
|
+
|
1045
|
+
xml.data("id"=>key.to_s){
|
1046
|
+
xml.text @test_case_user_xml_data[key].to_s
|
1047
|
+
}
|
1048
|
+
|
1049
|
+
end
|
1050
|
+
}
|
1051
|
+
|
1052
|
+
end
|
1053
|
+
|
1008
1054
|
}
|
1009
1055
|
}
|
1010
1056
|
end
|
@@ -700,7 +700,7 @@ module TDriverVerify
|
|
700
700
|
elsif $!.kind_of?( MobyBase::VerificationError )
|
701
701
|
|
702
702
|
error_message = "Verification #{ message }at #{ verify_caller } failed: #{ MobyUtil::KernelHelper.find_source( verify_caller ) }"
|
703
|
-
error_message << "The
|
703
|
+
error_message << "The value was not equal to #{ expected_value }. It returned: #{ result.inspect }"
|
704
704
|
|
705
705
|
else
|
706
706
|
|
@@ -837,7 +837,7 @@ module TDriverVerify
|
|
837
837
|
elsif $!.kind_of?( MobyBase::VerificationError )
|
838
838
|
|
839
839
|
error_message = "Verification #{ message }at #{ verify_caller } failed: #{ MobyUtil::KernelHelper.find_source( verify_caller ) }"
|
840
|
-
error_message << "The
|
840
|
+
error_message << "The value was not less than #{ expected_value }. It returned: #{ result.inspect }"
|
841
841
|
|
842
842
|
else
|
843
843
|
|
@@ -974,7 +974,7 @@ module TDriverVerify
|
|
974
974
|
elsif $!.kind_of?( MobyBase::VerificationError )
|
975
975
|
|
976
976
|
error_message = "Verification #{ message }at #{ verify_caller } failed: #{ MobyUtil::KernelHelper.find_source( verify_caller ) }"
|
977
|
-
error_message << "The
|
977
|
+
error_message << "The value vas not greater than #{ expected_value }. It returned: #{ result.inspect }"
|
978
978
|
|
979
979
|
else
|
980
980
|
|
data/lib/tdriver/version.rb
CHANGED
data/xml/templates/generic.xml
CHANGED
@@ -53,9 +53,10 @@
|
|
53
53
|
<!-- default device input type (e.g. key, touch) -->
|
54
54
|
<parameter name="input_type" value="key" />
|
55
55
|
|
56
|
-
<!-- default tcp/ip socket read/write timeouts -->
|
56
|
+
<!-- default tcp/ip socket read/write/connect timeouts -->
|
57
57
|
<parameter name="socket_read_timeout" value="25" />
|
58
58
|
<parameter name="socket_write_timeout" value="25" />
|
59
|
+
<parameter name="socket_connect_timeout" value="25" />
|
59
60
|
|
60
61
|
<!-- default value for send_service_request message deflation rules -->
|
61
62
|
<parameter name="io_deflate_service_requests" value="true" />
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testability-driver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 1.
|
8
|
+
- 4
|
9
|
+
- 0
|
10
|
+
version: 1.4.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Testability Driver team
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin/
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-11-11 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|