testability-driver 1.3.0 → 1.3.1
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.
- data/ext/native_extensions.c +53 -25
- data/lib/matti.rb +0 -5
- data/lib/tdriver/base/behaviour/behaviours/object_behaviour_description.rb +4 -4
- data/lib/tdriver/base/behaviour/factory.rb +120 -7
- data/lib/tdriver/base/errors.rb +1 -1
- data/lib/tdriver/base/state_object.rb +3 -2
- data/lib/tdriver/base/sut/controller.rb +2 -2
- data/lib/tdriver/base/sut/factory.rb +207 -201
- data/lib/tdriver/base/sut/generic/behaviours/application.rb +3 -6
- data/lib/tdriver/base/sut/generic/behaviours/find.rb +1 -1
- data/lib/tdriver/base/sut/generic/behaviours/flash_behaviour.rb +14 -14
- data/lib/tdriver/base/sut/generic/behaviours/sut.rb +5 -5
- data/lib/tdriver/base/sut/generic/behaviours/switchbox_behaviour.rb +14 -14
- data/lib/tdriver/base/sut/generic/behaviours/verification.rb +3 -18
- data/lib/tdriver/base/sut/generic/commands/key_sequence.rb +6 -6
- data/lib/tdriver/base/sut/generic/plugin.rb +4 -9
- data/lib/tdriver/base/sut/sut.rb +2 -6
- data/lib/tdriver/base/test_object/abstract.rb +1 -1
- data/lib/tdriver/base/test_object/adapter.rb +5 -5
- data/lib/tdriver/base/test_object/behaviours/syncronization.rb +7 -6
- data/lib/tdriver/base/test_object/behaviours/test_object.rb +18 -18
- data/lib/tdriver/base/test_object/factory.rb +147 -96
- data/lib/tdriver/base/test_object/verification.rb +6 -9
- data/lib/tdriver/base/test_object/xml/adapter.rb +5 -5
- data/lib/tdriver/matti.rb +1 -1
- data/lib/tdriver/report/error_recovery/tdriver_error_recovery.rb +17 -8
- data/lib/tdriver/report/error_recovery/tdriver_error_recovery_settings.rb +7 -7
- data/lib/tdriver/report/report_api.rb +172 -79
- data/lib/tdriver/report/report_crash_file_capture.rb +4 -7
- data/lib/tdriver/report/report_creator.rb +16 -20
- data/lib/tdriver/report/report_file_capture.rb +3 -3
- data/lib/tdriver/report/report_javascript.rb +3 -3
- data/lib/tdriver/report/report_test_case_run.rb +20 -10
- data/lib/tdriver/report/report_test_run.rb +11 -10
- data/lib/tdriver/report/report_writer.rb +13 -11
- data/lib/tdriver/tdriver.rb +6 -6
- data/lib/tdriver/util/common/array.rb +2 -2
- data/lib/tdriver/util/common/file.rb +9 -11
- data/lib/tdriver/util/common/gem.rb +1 -1
- data/lib/tdriver/util/common/kernel.rb +4 -4
- data/lib/tdriver/util/common/retryable.rb +2 -2
- data/lib/tdriver/util/common/string.rb +2 -3
- data/lib/tdriver/util/hooking/hooking.rb +2 -2
- data/lib/tdriver/util/localisation/localisation.rb +12 -12
- data/lib/tdriver/util/logger/logger.rb +7 -25
- data/lib/tdriver/util/operator_data/operator_data.rb +5 -5
- data/lib/tdriver/util/parameter/parameter.rb +2 -2
- data/lib/tdriver/util/plugin/abstract.rb +4 -3
- data/lib/tdriver/util/plugin/service.rb +31 -4
- data/lib/tdriver/util/recorder/recorder.rb +4 -4
- data/lib/tdriver/util/user_data/user_data.rb +5 -5
- data/lib/tdriver/util/video/camera_windows.rb +1 -1
- data/lib/tdriver/util/xml/builder.rb +3 -1
- data/lib/tdriver/util/xml/parsers/libxml/libxml.rb +1 -1
- data/lib/tdriver/util/xml/xml.rb +5 -5
- data/lib/tdriver/verify/verify.rb +26 -26
- data/lib/tdriver/version.rb +1 -1
- data/xml/behaviours/generic.xml +1 -2
- metadata +2 -3
- data/lib/tdriver/verify/verify.rb_org +0 -630
@@ -83,8 +83,9 @@ module TDriver
|
|
83
83
|
if @@rcv_raise_errors == 'true' || @@reporter_attached == 'false'
|
84
84
|
|
85
85
|
raise MobyBase::ContinuousVerificationError.new(
|
86
|
-
"Verification failed as an exception was thrown when the verification block was executed.
|
86
|
+
"Verification failed as an exception was thrown when the verification block was executed. #{ verify.source }\nDetails: #{ ( verify.message || "none" ) }\nNested exception:\n#{ e.inspect }"
|
87
87
|
)
|
88
|
+
|
88
89
|
elsif @@reporter_attached == 'true' && @@rcv_raise_errors == 'false'
|
89
90
|
|
90
91
|
TDriverReportAPI::tdriver_report_set_test_case_status('failed') if @@rcv_fail_test_case == 'true'
|
@@ -99,7 +100,7 @@ module TDriver
|
|
99
100
|
|
100
101
|
end
|
101
102
|
|
102
|
-
TDriverReportAPI::tdriver_report_log("Verification failed as an exception was thrown when the verification block was executed.
|
103
|
+
TDriverReportAPI::tdriver_report_log("Verification failed as an exception was thrown when the verification block was executed. #{ verify.source }\nDetails: #{ ( verify.message || "none" ) }\nNested exception:\n#{ e.inspect }")
|
103
104
|
|
104
105
|
TDriverReportAPI::tdriver_report_log("<hr />")
|
105
106
|
|
@@ -115,9 +116,7 @@ module TDriver
|
|
115
116
|
if @@rcv_raise_errors == 'true' || @@reporter_attached == 'false'
|
116
117
|
|
117
118
|
raise MobyBase::ContinuousVerificationError.new(
|
118
|
-
"Verification failed.
|
119
|
-
verify.source, ( verify.message || "none" ), verify.expected.inspect, result.inspect
|
120
|
-
]
|
119
|
+
"Verification failed. #{ verify.source }\nDetails: #{ ( verify.message || "none" ) }\nThe block did not return #{ verify.expected.inspect }. It returned: #{ result.inspect }"
|
121
120
|
)
|
122
121
|
|
123
122
|
elsif @@reporter_attached == 'true' && @@rcv_raise_errors == 'false'
|
@@ -135,9 +134,7 @@ module TDriver
|
|
135
134
|
end
|
136
135
|
|
137
136
|
TDriverReportAPI::tdriver_report_log(
|
138
|
-
"Verification failed.
|
139
|
-
verify.source, ( verify.message || "none" ), verify.expected.inspect, result.inspect
|
140
|
-
]
|
137
|
+
"Verification failed. #{ verify.source }\nDetails: #{ ( verify.message || "none" ) }\nThe block did not return #{ verify.expected.inspect }. It returned: #{ result.inspect } "
|
141
138
|
)
|
142
139
|
|
143
140
|
TDriverReportAPI::tdriver_report_log("<hr />")
|
@@ -158,7 +155,7 @@ module TDriver
|
|
158
155
|
|
159
156
|
@@inside_verify = false
|
160
157
|
|
161
|
-
|
158
|
+
raise e
|
162
159
|
|
163
160
|
end
|
164
161
|
|
@@ -355,7 +355,7 @@ module TDriver
|
|
355
355
|
else
|
356
356
|
|
357
357
|
# raise exception if layout direction it not supported
|
358
|
-
|
358
|
+
raise ArgumentError, "Unsupported layout direction #{ layout_direction.inspect }"
|
359
359
|
|
360
360
|
end
|
361
361
|
|
@@ -402,7 +402,7 @@ module TDriver
|
|
402
402
|
if default.empty?
|
403
403
|
|
404
404
|
# raise exception if no such attribute found
|
405
|
-
|
405
|
+
raise MobyBase::AttributeNotFoundError, "Could not find test object element attribute #{ attribute_name.inspect }"
|
406
406
|
|
407
407
|
else
|
408
408
|
|
@@ -447,7 +447,7 @@ module TDriver
|
|
447
447
|
if default.empty?
|
448
448
|
|
449
449
|
# raise exception if no such attribute found
|
450
|
-
|
450
|
+
raise MobyBase::AttributeNotFoundError, "Could not find attribute #{ attribute_name.inspect }" # for test object of type #{ type.to_s }"
|
451
451
|
|
452
452
|
else
|
453
453
|
|
@@ -462,7 +462,7 @@ module TDriver
|
|
462
462
|
|
463
463
|
# attribute(s) found
|
464
464
|
# Need to disable this for now
|
465
|
-
#
|
465
|
+
# raise MobyBase::MultipleAttributesFoundError.new( "Multiple attributes found with name '#{ name }'" ) if nodeset.count > 1
|
466
466
|
|
467
467
|
# return found attribute
|
468
468
|
nodeset.first.content
|
@@ -622,7 +622,7 @@ module TDriver
|
|
622
622
|
nodeset = test_object.instance_variable_get( :@sut ).xml_data.xpath( test_object.instance_variable_get( :@x_path ) )
|
623
623
|
|
624
624
|
# raise exception if no test objects found
|
625
|
-
|
625
|
+
raise MobyBase::TestObjectNotFoundError if nodeset.empty?
|
626
626
|
|
627
627
|
# return first test object from the nodeset
|
628
628
|
nodeset.first
|
data/lib/tdriver/matti.rb
CHANGED
@@ -26,7 +26,7 @@ class MATTI
|
|
26
26
|
|
27
27
|
file, line = caller.first.split(":")
|
28
28
|
|
29
|
-
$stderr.puts "
|
29
|
+
$stderr.puts "#{ file }:#{ line } warning: deprecated class #{ self.name }, use TDriver##{ method_id.to_s } instead"
|
30
30
|
|
31
31
|
TDriver.respond_to?( method_id ) ? TDriver.method( method_id ).call( *args ) : super
|
32
32
|
|
@@ -32,8 +32,9 @@ module TDriverErrorRecovery
|
|
32
32
|
extend DL::Importable
|
33
33
|
dlload "callbackif"
|
34
34
|
extern "void restartDatagateway(const char*)"
|
35
|
-
extern "
|
35
|
+
extern "void restartHardware(const char*)"
|
36
36
|
extern "int getBootTimeout(const char*)"
|
37
|
+
extern "int error()"
|
37
38
|
end')
|
38
39
|
end
|
39
40
|
|
@@ -73,11 +74,19 @@ module TDriverErrorRecovery
|
|
73
74
|
b_error_recovery_succesful=false
|
74
75
|
while current_reconnect_attempt.to_i<attempt_reconnects.to_i
|
75
76
|
if @recovery_settings.get_ats4_error_recovery_enabled=='true'
|
76
|
-
MobyUtil::Logger.instance.log "behaviour" , "WARNING;Restarting
|
77
|
-
TDriver_Error_Recovery_ATS4.restartDatagateway(current_sut.id.to_s);
|
77
|
+
MobyUtil::Logger.instance.log "behaviour" , "WARNING;ATS4 Restarting Device #{current_sut.id}"
|
78
|
+
#TDriver_Error_Recovery_ATS4.restartDatagateway(current_sut.id.to_s);
|
79
|
+
current_sut.disconnect
|
80
|
+
TDriver_Error_Recovery_ATS4.restartHardware(current_sut.id.to_s);
|
78
81
|
ats_timeout=TDriver_Error_Recovery_ATS4.getBootTimeout(current_sut.id.to_s);
|
79
|
-
|
80
|
-
|
82
|
+
MobyUtil::Logger.instance.log "behaviour" , "WARNING;Waiting for ATS4 error recovery #{ats_timeout}s"
|
83
|
+
if ats_timeout.to_i > 0
|
84
|
+
sleep ats_timeout.to_i
|
85
|
+
else
|
86
|
+
MobyUtil::Logger.instance.log "behaviour" , "WARNING;Waiting ATS4 boot timeout is 0 using wait_time_for_ats4_error_recovery parameter timeout #{@recovery_settings.wait_time_for_ats4_error_recovery}s"
|
87
|
+
sleep @recovery_settings.wait_time_for_ats4_error_recovery.to_i
|
88
|
+
end
|
89
|
+
MobyUtil::Logger.instance.log "behaviour" , "WARNING;ATS4 Restarted Device #{current_sut.id}"
|
81
90
|
else
|
82
91
|
MobyUtil::Logger.instance.log "behaviour" , "WARNING;Resetting sut: #{current_sut.id.to_s}"
|
83
92
|
current_sut.reset
|
@@ -91,7 +100,7 @@ module TDriverErrorRecovery
|
|
91
100
|
current_reconnect_attempt+=1
|
92
101
|
end
|
93
102
|
end
|
94
|
-
|
103
|
+
raise MobyBase::BehaviourError.new("Error Recovery", "Error recovery failed after #{attempt_reconnects} recovery attempts") if b_error_recovery_succesful==false
|
95
104
|
end
|
96
105
|
|
97
106
|
# Reconnects the devices without ping
|
@@ -100,7 +109,7 @@ module TDriverErrorRecovery
|
|
100
109
|
# === raises
|
101
110
|
def reconnect_devices()
|
102
111
|
|
103
|
-
|
112
|
+
TDriver::SUTFactory.connected_suts.each do |sut_id, sut_attributes|
|
104
113
|
suts=@recovery_settings.get_monitored_sut
|
105
114
|
suts.each do |monitored_sut|
|
106
115
|
if sut_id.to_s==monitored_sut.to_s
|
@@ -142,7 +151,7 @@ module TDriverErrorRecovery
|
|
142
151
|
# === raises
|
143
152
|
def ping_devices_and_reconnect()
|
144
153
|
resetted=false
|
145
|
-
|
154
|
+
TDriver::SUTFactory.connected_suts.each do |sut_id, sut_attributes|
|
146
155
|
suts=@recovery_settings.get_monitored_sut
|
147
156
|
suts.each do |monitored_sut|
|
148
157
|
if sut_id.to_s==monitored_sut.to_s
|
@@ -48,25 +48,25 @@ class TDriverErrorRecoverySettings
|
|
48
48
|
# === raises
|
49
49
|
def read_settings()
|
50
50
|
@error_recovery_enabled= $parameters[ :error_recovery_enabled ]
|
51
|
-
|
51
|
+
raise MobyBase::BehaviourError.new("error recovery", "error recovery enabled parameter not defined in tdriver_parameters.xml") if @error_recovery_enabled == nil
|
52
52
|
|
53
53
|
@ats4_error_recovery_enabled= $parameters[ :ats4_error_recovery_enabled ]
|
54
|
-
|
54
|
+
raise MobyBase::BehaviourError.new("error recovery", "ats4 error recovery enabled parameter not defined in tdriver_parameters.xml") if @ats4_error_recovery_enabled == nil
|
55
55
|
|
56
56
|
@wait_time_for_ats4_error_recovery= $parameters[ :wait_time_for_ats4_error_recovery ]
|
57
|
-
|
57
|
+
raise MobyBase::BehaviourError.new("error recovery", "ats4 error recovery wait time parameter not defined in tdriver_parameters.xml") if @wait_time_for_ats4_error_recovery == nil
|
58
58
|
|
59
59
|
@ping_connection= $parameters[ :ping_connection ]
|
60
|
-
|
60
|
+
raise MobyBase::BehaviourError.new("error recovery", "ping connection parameter not defined in tdriver_parameters.xml") if @ping_connection == nil
|
61
61
|
|
62
62
|
@reconnect_device= $parameters[ :reconnect_device ]
|
63
|
-
|
63
|
+
raise MobyBase::BehaviourError.new("error recovery", "reconnect device patameter not defined in tdriver_parameters.xml") if @reconnect_device == nil
|
64
64
|
|
65
65
|
@reconnect_attempts= $parameters[ :reconnect_attempts ]
|
66
|
-
|
66
|
+
raise MobyBase::BehaviourError.new("error recovery", "reconnect attempts patameter not defined in tdriver_parameters.xml") if @reconnect_attempts == nil
|
67
67
|
|
68
68
|
str_parameter= $parameters[ :error_recovery_monitored_sut_ids ]
|
69
|
-
|
69
|
+
raise MobyBase::BehaviourError.new("error recovery", "error_recovery_monitored_sut_ids patameter not defined in tdriver_parameters.xml") if str_parameter == nil
|
70
70
|
@monitored_suts=str_parameter.split('|')
|
71
71
|
|
72
72
|
|
@@ -20,8 +20,15 @@
|
|
20
20
|
|
21
21
|
module TDriverReportAPI
|
22
22
|
|
23
|
+
# This method returns all the current executed test by status
|
24
|
+
#
|
25
|
+
# === params
|
26
|
+
# status_type: tests status
|
27
|
+
# === returns
|
28
|
+
# Array
|
29
|
+
# === raises
|
23
30
|
def tdriver_get_current_by_status( status_type )
|
24
|
-
|
31
|
+
raise TypeError.new("Argument to method cannot be nil.") if status_type.nil?
|
25
32
|
ret = []
|
26
33
|
if $tdriver_reporter!=nil
|
27
34
|
ret = $tdriver_reporter.parse_results_for_current_test(status_type)
|
@@ -29,8 +36,15 @@ module TDriverReportAPI
|
|
29
36
|
return ret
|
30
37
|
end
|
31
38
|
|
39
|
+
# This method returns all the tests
|
40
|
+
#
|
41
|
+
# === params
|
42
|
+
# status_type: tests status
|
43
|
+
# === returns
|
44
|
+
# Array
|
45
|
+
# === raises
|
32
46
|
def tdriver_get_status(status_type)
|
33
|
-
|
47
|
+
raise TypeError.new("Argument to method cannot be nil.") if status_type.nil?
|
34
48
|
ret = []
|
35
49
|
if $tdriver_reporter!=nil
|
36
50
|
ret = $tdriver_reporter.read_result_storage(status_type)
|
@@ -38,54 +52,118 @@ module TDriverReportAPI
|
|
38
52
|
return ret
|
39
53
|
end
|
40
54
|
|
55
|
+
# This method returns all the sequential fails
|
56
|
+
#
|
57
|
+
# === params
|
58
|
+
# nil
|
59
|
+
# === returns
|
60
|
+
# String
|
61
|
+
# === raises
|
41
62
|
def tdriver_get_sequential_fails
|
42
63
|
return $tdriver_reporter.get_sequential_fails if $tdriver_reporter
|
43
64
|
end
|
44
65
|
|
45
|
-
|
66
|
+
# This method updates the sequential fail status
|
67
|
+
#
|
68
|
+
# === params
|
69
|
+
# status: fail status
|
70
|
+
# === returns
|
71
|
+
# nil
|
72
|
+
# === raises
|
46
73
|
def tdriver_update_sequential_fails( status )
|
47
74
|
$tdriver_reporter.update_sequential_fails( status ) if $tdriver_reporter
|
48
75
|
end
|
49
|
-
|
76
|
+
|
77
|
+
# This method logs data to the test case
|
78
|
+
#
|
79
|
+
# === params
|
80
|
+
# data: the data to be logged
|
81
|
+
# === returns
|
82
|
+
# nil
|
83
|
+
# === raises
|
50
84
|
def tdriver_log_data(data)
|
51
|
-
|
85
|
+
raise TypeError.new("Argument to method cannot be nil.") if data.nil?
|
52
86
|
if $tdriver_reporter!=nil
|
53
87
|
$tdriver_reporter.set_user_data(data)
|
54
88
|
end
|
55
89
|
end
|
56
90
|
|
91
|
+
# This method captures sut state to test case
|
92
|
+
#
|
93
|
+
# === params
|
94
|
+
# capture_screen_shot: include screenshot to the capture
|
95
|
+
# === returns
|
96
|
+
# nil
|
97
|
+
# === raises
|
57
98
|
def tdriver_capture_state(capture_screen_shot=true)
|
58
99
|
if $tdriver_reporter
|
59
100
|
$new_test_case.capture_dump(capture_screen_shot) if $new_test_case
|
60
101
|
end
|
61
102
|
end
|
62
103
|
|
104
|
+
# This method captures sut state to test case with comments
|
105
|
+
#
|
106
|
+
# === params
|
107
|
+
# arguments: optional aguments
|
108
|
+
# === returns
|
109
|
+
# nil
|
110
|
+
# === raises
|
63
111
|
def tdriver_capture_screen(arguments=Hash.new)
|
64
112
|
if $tdriver_reporter
|
65
113
|
$new_test_case.capture_dump(true,arguments) if $new_test_case
|
66
114
|
end
|
67
115
|
end
|
68
116
|
|
117
|
+
# This method logs data to the total run table
|
118
|
+
#
|
119
|
+
# === params
|
120
|
+
# column_name: name of the column
|
121
|
+
# value: value for the entry
|
122
|
+
# === returns
|
123
|
+
# nil
|
124
|
+
# === raises
|
69
125
|
def tdriver_log_data_in_total_run_table(column_name,value)
|
70
|
-
|
126
|
+
raise TypeError.new("Argument to method cannot be nil.") if column_name.nil? || value.nil?
|
71
127
|
if $tdriver_reporter!=nil
|
72
128
|
$tdriver_reporter.set_user_table_data(column_name,value)
|
73
129
|
end
|
74
130
|
end
|
75
131
|
|
132
|
+
# This method logs data test case details
|
133
|
+
#
|
134
|
+
# === params
|
135
|
+
# message: message to be logged in to details(Supports html for formatting the entry)
|
136
|
+
# === returns
|
137
|
+
# nil
|
138
|
+
# === raises
|
76
139
|
def tdriver_report_log(message)
|
77
|
-
|
140
|
+
raise TypeError.new("Argument message was not a String.") unless message.nil? or message.kind_of?(String)
|
78
141
|
if $tdriver_reporter
|
79
142
|
$new_test_case.set_test_case_execution_log(message) if $new_test_case
|
80
143
|
end
|
81
144
|
end
|
82
145
|
|
146
|
+
# This method changes the test case result
|
147
|
+
#
|
148
|
+
# === params
|
149
|
+
# status: new test case status
|
150
|
+
# === returns
|
151
|
+
# nil
|
152
|
+
# === raises
|
83
153
|
def tdriver_report_set_test_case_status(status)
|
84
|
-
|
154
|
+
raise TypeError.new("Argument status was not a String.") unless status.nil? or status.kind_of?(String)
|
85
155
|
if $tdriver_reporter!=nil
|
86
156
|
$tdriver_reporter.set_test_case_user_defined_status(status)
|
87
157
|
end
|
88
158
|
end
|
159
|
+
|
160
|
+
# This method returns how many tests has been executed
|
161
|
+
#
|
162
|
+
# === params
|
163
|
+
# nil
|
164
|
+
# === returns
|
165
|
+
# Integer
|
166
|
+
# === raises
|
89
167
|
def tdriver_report_total_tests_run()
|
90
168
|
total=0
|
91
169
|
if $tdriver_reporter!=nil
|
@@ -93,6 +171,14 @@ module TDriverReportAPI
|
|
93
171
|
end
|
94
172
|
return total.to_i
|
95
173
|
end
|
174
|
+
|
175
|
+
# This method returns how many tests has passed
|
176
|
+
#
|
177
|
+
# === params
|
178
|
+
# nil
|
179
|
+
# === returns
|
180
|
+
# Integer
|
181
|
+
# === raises
|
96
182
|
def tdriver_report_total_passed_tests()
|
97
183
|
total=0
|
98
184
|
if $tdriver_reporter!=nil
|
@@ -100,6 +186,14 @@ module TDriverReportAPI
|
|
100
186
|
end
|
101
187
|
return total.to_i
|
102
188
|
end
|
189
|
+
|
190
|
+
# This method returns how many tests has failed
|
191
|
+
#
|
192
|
+
# === params
|
193
|
+
# nil
|
194
|
+
# === returns
|
195
|
+
# Integer
|
196
|
+
# === raises
|
103
197
|
def tdriver_report_total_failed_tests()
|
104
198
|
total=0
|
105
199
|
if $tdriver_reporter!=nil
|
@@ -107,6 +201,14 @@ module TDriverReportAPI
|
|
107
201
|
end
|
108
202
|
return total.to_i
|
109
203
|
end
|
204
|
+
|
205
|
+
# This method returns how many tests were not run
|
206
|
+
#
|
207
|
+
# === params
|
208
|
+
# nil
|
209
|
+
# === returns
|
210
|
+
# Integer
|
211
|
+
# === raises
|
110
212
|
def tdriver_report_total_not_run_tests()
|
111
213
|
total=0
|
112
214
|
if $tdriver_reporter!=nil
|
@@ -114,6 +216,14 @@ module TDriverReportAPI
|
|
114
216
|
end
|
115
217
|
return total.to_i
|
116
218
|
end
|
219
|
+
|
220
|
+
# This method returns current report folder
|
221
|
+
#
|
222
|
+
# === params
|
223
|
+
# nil
|
224
|
+
# === returns
|
225
|
+
# String
|
226
|
+
# === raises
|
117
227
|
def tdriver_report_folder()
|
118
228
|
folder=nil
|
119
229
|
if $tdriver_reporter!=nil
|
@@ -121,6 +231,14 @@ module TDriverReportAPI
|
|
121
231
|
end
|
122
232
|
return folder.to_s
|
123
233
|
end
|
234
|
+
|
235
|
+
# This method returns test case start time
|
236
|
+
#
|
237
|
+
# === params
|
238
|
+
# nil
|
239
|
+
# === returns
|
240
|
+
# String
|
241
|
+
# === raises
|
124
242
|
def tdriver_report_start_time()
|
125
243
|
start_time=nil
|
126
244
|
if $tdriver_reporter!=nil
|
@@ -128,6 +246,14 @@ module TDriverReportAPI
|
|
128
246
|
end
|
129
247
|
return start_time.to_s
|
130
248
|
end
|
249
|
+
|
250
|
+
# This method current execution time
|
251
|
+
#
|
252
|
+
# === params
|
253
|
+
# nil
|
254
|
+
# === returns
|
255
|
+
# String
|
256
|
+
# === raises
|
131
257
|
def tdriver_report_run_time()
|
132
258
|
run_time=nil
|
133
259
|
if $tdriver_reporter!=nil
|
@@ -135,6 +261,14 @@ module TDriverReportAPI
|
|
135
261
|
end
|
136
262
|
return run_time.to_s
|
137
263
|
end
|
264
|
+
|
265
|
+
# This method returns the amount of crash files
|
266
|
+
#
|
267
|
+
# === params
|
268
|
+
# nil
|
269
|
+
# === returns
|
270
|
+
# Integer
|
271
|
+
# === raises
|
138
272
|
def tdriver_report_total_crash_files()
|
139
273
|
crash_files=0
|
140
274
|
if $tdriver_reporter!=nil
|
@@ -142,6 +276,14 @@ module TDriverReportAPI
|
|
142
276
|
end
|
143
277
|
return crash_files.to_i
|
144
278
|
end
|
279
|
+
|
280
|
+
# This method returns the amount of device resets
|
281
|
+
#
|
282
|
+
# === params
|
283
|
+
# nil
|
284
|
+
# === returns
|
285
|
+
# Integer
|
286
|
+
# === raises
|
145
287
|
def tdriver_report_total_device_resets()
|
146
288
|
device_resets=0
|
147
289
|
if $tdriver_reporter!=nil
|
@@ -149,6 +291,14 @@ module TDriverReportAPI
|
|
149
291
|
end
|
150
292
|
return device_resets.to_i
|
151
293
|
end
|
294
|
+
|
295
|
+
# This method can combine previous results to the current execution
|
296
|
+
#
|
297
|
+
# === params
|
298
|
+
# nil
|
299
|
+
# === returns
|
300
|
+
# Integer
|
301
|
+
# === raises
|
152
302
|
def tdriver_report_combine_reports(reports)
|
153
303
|
if $tdriver_reporter!=nil
|
154
304
|
$tdriver_reporter.combine_results(reports)
|
@@ -160,81 +310,24 @@ module TDriverReportAPI
|
|
160
310
|
end
|
161
311
|
end
|
162
312
|
|
163
|
-
#
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
def
|
171
|
-
|
172
|
-
$
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
file, line = caller.first.split(":")
|
177
|
-
$stderr.puts "%s:%s warning: method deprecated" % [ file, line]
|
178
|
-
tdriver_report_set_test_case_status(status)
|
179
|
-
end
|
180
|
-
def matti_report_total_tests_run()
|
181
|
-
file, line = caller.first.split(":")
|
182
|
-
$stderr.puts "%s:%s warning: method deprecated" % [ file, line]
|
183
|
-
tdriver_report_total_tests_run()
|
184
|
-
end
|
185
|
-
def matti_report_total_passed_tests()
|
186
|
-
file, line = caller.first.split(":")
|
187
|
-
$stderr.puts "%s:%s warning: method deprecated" % [ file, line]
|
188
|
-
tdriver_report_total_passed_tests()
|
189
|
-
end
|
190
|
-
def matti_report_total_failed_tests()
|
191
|
-
file, line = caller.first.split(":")
|
192
|
-
$stderr.puts "%s:%s warning: method deprecated" % [ file, line]
|
193
|
-
tdriver_report_total_failed_tests()
|
194
|
-
end
|
195
|
-
def matti_report_total_not_run_tests()
|
196
|
-
file, line = caller.first.split(":")
|
197
|
-
$stderr.puts "%s:%s warning: method deprecated" % [ file, line]
|
198
|
-
tdriver_report_total_not_run_tests()
|
199
|
-
end
|
200
|
-
def matti_report_folder()
|
201
|
-
file, line = caller.first.split(":")
|
202
|
-
$stderr.puts "%s:%s warning: method deprecated" % [ file, line]
|
203
|
-
tdriver_report_folder()
|
204
|
-
end
|
205
|
-
def matti_report_start_time()
|
206
|
-
file, line = caller.first.split(":")
|
207
|
-
$stderr.puts "%s:%s warning: method deprecated" % [ file, line]
|
208
|
-
tdriver_report_start_time()
|
209
|
-
end
|
210
|
-
def matti_report_run_time()
|
211
|
-
file, line = caller.first.split(":")
|
212
|
-
$stderr.puts "%s:%s warning: method deprecated" % [ file, line]
|
213
|
-
tdriver_report_run_time()
|
214
|
-
end
|
215
|
-
def matti_report_total_crash_files()
|
216
|
-
file, line = caller.first.split(":")
|
217
|
-
$stderr.puts "%s:%s warning: method deprecated" % [ file, line]
|
218
|
-
tdriver_report_total_crash_files()
|
219
|
-
end
|
220
|
-
def matti_report_total_device_resets()
|
221
|
-
file, line = caller.first.split(":")
|
222
|
-
$stderr.puts "%s:%s warning: method deprecated" % [ file, line]
|
223
|
-
tdriver_report_total_device_resets()
|
224
|
-
end
|
225
|
-
def matti_report_combine_reports(reports)
|
226
|
-
file, line = caller.first.split(":")
|
227
|
-
$stderr.puts "%s:%s warning: method deprecated" % [ file, line]
|
228
|
-
tdriver_report_combine_reports(reports)
|
313
|
+
# This method returns the amount of device resets
|
314
|
+
#
|
315
|
+
# === params
|
316
|
+
# nil
|
317
|
+
# === returns
|
318
|
+
# Integer
|
319
|
+
# === raises
|
320
|
+
def tdriver_report_current_test_case_dir()
|
321
|
+
test_case_path=''
|
322
|
+
if $new_test_case!=nil
|
323
|
+
test_case_path=$new_test_case.test_case_folder
|
324
|
+
end
|
325
|
+
return test_case_path.to_s
|
229
326
|
end
|
230
|
-
|
327
|
+
|
231
328
|
|
232
329
|
end #TDriverReportAPI
|
233
330
|
|
234
|
-
module MattiReportAPI
|
235
|
-
|
236
|
-
include TDriverReportAPI
|
237
331
|
|
238
|
-
end
|
239
332
|
|
240
333
|
|