squape.squishserver
SquishServer
SquishServer(location=None, host=None, port=None)
Class to configure a running local or remote squishserver
Parameters:
Name | Type | Description | Default |
---|---|---|---|
location |
str
|
The location of the Squish package. If provided, this value will be used. If not provided, it will be taken from the squishserver process. |
None
|
host |
str
|
The host of the squishserver. If provided, this value will be used. If not provided, the value of the squishrunner's "--host" will be used if set. If "--host" was not set, the default value "127.0.0.1" will be used. |
None
|
port |
int
|
The port of the squishserver. If provided, this value will be used. If not provided, the value of the squishrunner's "--port" will be used if set. If "--port" was not set, the default value "4322" will be used. |
None
|
Source code in squape/squishserver.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
|
host
property
host
The host of the squishserver.
location
property
location
The location of the Squish package.
os_name
property
os_name
Name of the Operating System where the squishserver is running.
port
property
port
The port of the squishserver.
remotesys
property
remotesys
RemoteSystem of the squishserver.
addAUT
addAUT(aut, path)
Register an AUT
Parameters:
Name | Type | Description | Default |
---|---|---|---|
aut |
str
|
the name of the executable |
required |
path |
str
|
path to the executable folder |
required |
Source code in squape/squishserver.py
130 131 132 133 134 135 136 137 138 139 140 141 |
|
addAppPath
addAppPath(path)
Register an AUT path
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
the AUT path to register |
required |
Source code in squape/squishserver.py
156 157 158 159 160 161 162 163 |
|
addAttachableAut
addAttachableAut(aut, port, host='127.0.0.1')
Register an attachable AUT
Parameters:
Name | Type | Description | Default |
---|---|---|---|
aut |
str
|
the name of the attachable AUT |
required |
port |
int
|
port of the machine where the attachable AUT is supposed to be running. |
required |
host |
str
|
host of the machine where the attachable AUT is supposed to be running. Defaults to "127.0.0.1". |
'127.0.0.1'
|
Source code in squape/squishserver.py
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
|
attachToApplication
attachToApplication(aut)
Attaches to an application with given name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
aut |
str
|
the name of the attachable AUT |
required |
Returns:
Type | Description |
---|---|
ApplicationContext
|
application context |
Source code in squape/squishserver.py
211 212 213 214 215 216 217 218 219 220 221 222 223 |
|
execute_cmd_async
execute_cmd_async(command, options=None)
Executes the command with optional arguments asynchronously. This convenience function runs a command as is, leveraging the environment settings provided by the squishserver.
For more advanced use cases, such as specifying a custom current working
directory (cwd) or environment variables, please use the
squishserver.remotesys.execute(...)
method directly.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
command |
str
|
The command to execute |
required |
options |
List[str]
|
A list of options for the command |
None
|
Returns:
Type | Description |
---|---|
None
|
None |
Source code in squape/squishserver.py
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
|
execute_cmd_sync
execute_cmd_sync(command, options=None)
Executes the command with optional arguments synchronously. This convenience function runs a command as is, leveraging the environment settings provided by the squishserver.
For more advanced use cases, such as specifying a custom current working
directory (cwd) or environment variables, please use the
squishserver.remotesys.execute(...)
method directly.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
command |
str
|
The command to execute |
required |
options |
List[str]
|
A list of options for the command |
None
|
Returns:
Type | Description |
---|---|
List[str]
|
A list/array with three elements: exitcode, stdout, stderr |
Source code in squape/squishserver.py
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
|
removeAUT
removeAUT(aut, path)
Remove registered AUT
Parameters:
Name | Type | Description | Default |
---|---|---|---|
aut |
str
|
the name of the executable |
required |
path |
str
|
path to the executable folder |
required |
Source code in squape/squishserver.py
143 144 145 146 147 148 149 150 151 152 153 154 |
|
removeAppPath
removeAppPath(path)
Remove a registered AUT path
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
the path to the AUT |
required |
Source code in squape/squishserver.py
165 166 167 168 169 170 171 172 173 174 175 |
|
removeAttachableAut
removeAttachableAut(aut, port, host='127.0.0.1')
Remove registered attachable AUT
Parameters:
Name | Type | Description | Default |
---|---|---|---|
aut |
str
|
the name of the attachable AUT |
required |
port |
int
|
port of the machine where the attachable AUT is supposed to be running. |
required |
host |
str
|
host of the machine where the attachable AUT is supposed to be running. Defaults to "127.0.0.1". |
'127.0.0.1'
|
Source code in squape/squishserver.py
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
|
startApplication
startApplication(aut)
Starts to an application with given name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
aut |
str
|
the name of the mapped AUT |
required |
Returns:
Type | Description |
---|---|
ApplicationContext
|
application context |
Source code in squape/squishserver.py
225 226 227 228 229 230 231 232 233 234 235 236 237 |
|