testability-driver-qt-sut-plugin 1.0.2 → 1.0.3

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.
@@ -95,6 +95,39 @@ module MobyBehaviour
95
95
  apps
96
96
 
97
97
  end
98
+
99
+ # == description
100
+ # Returns XML list of applications and start times for applications started by qttasserver
101
+ # \n
102
+ # == arguments
103
+ #
104
+ # == returns
105
+ # String
106
+ # description: tasMessage XML
107
+ # example: <tasMessage dateTime="2010.10.26 17:01:53.930" version="0.9.1" ><tasInfo id="1" name="Qt4.7.0" type="qt" ><object id="" name="QApplications" type="applications" ></object></tasInfo></tasMessage>
108
+ #
109
+ # == exceptions
110
+ # RuntimeError
111
+ # description: if getting applications list throws any exception it's converted to RuntimeError with descriptive message
112
+ def list_started_apps
113
+
114
+ apps = nil
115
+
116
+ begin
117
+ # execute the application control service request
118
+ apps = execute_command( MobyCommand::Application.new( :ListStartedApps ) )
119
+ MobyUtil::Logger.instance.log "behaviour", "PASS;Successfully listed applications.;#{ id };sut;{};list_started_apps;"
120
+
121
+ rescue Exception => e
122
+
123
+ MobyUtil::Logger.instance.log "behaviour", "FAIL;Failed to list applications.;#{ id };sut;{};list_started_apps;"
124
+ Kernel::raise RuntimeError.new( "Unable to list started applications: Exception: #{ e.message } (#{ e.class })" )
125
+
126
+ end
127
+
128
+ apps
129
+
130
+ end
98
131
 
99
132
  # == description
100
133
  # Returns list of crashed applications running on SUT known to qttasserver
@@ -73,6 +73,11 @@ module MobyController
73
73
  service_details = {:service => 'listApps', :name => @_application_name, :id => @_application_uid}
74
74
  command_xml = make_xml_message(service_details, 'listApps', nil )
75
75
 
76
+ # list started applications
77
+ elsif @_command == :ListStartedApps
78
+ service_details = {:service => 'startedApps', :name => @_application_name, :id => @_application_uid}
79
+ command_xml = make_xml_message(service_details, 'startedApps', nil )
80
+
76
81
  # list crashed applications
77
82
  elsif @_command == :ListCrashedApps
78
83
  service_details = {:service => 'listCrashedApps', :name => @_application_name, :id => @_application_uid}
data/xml/behaviour/qt.xml CHANGED
@@ -15,6 +15,10 @@
15
15
  <description>Lists all applications known to server running on SUT.</description>
16
16
  <example>list_apps</example>
17
17
  </method>
18
+ <method name="list_started_apps">
19
+ <description>Lists applications and their start time started by qttasserver.</description>
20
+ <example>list_started_apps</example>
21
+ </method>
18
22
  <method name="list_crashed_apps">
19
23
  <description>Returns list of crashed applications running on SUT known to qttasserver.</description>
20
24
  <example>list_crashed_apps</example>
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testability-driver-qt-sut-plugin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 2
10
- version: 1.0.2
9
+ - 3
10
+ version: 1.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - TDriver team
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-21 00:00:00 +02:00
18
+ date: 2011-01-25 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency