Members
getSimState
Get the boot status of an iOS simulator via its UDID
Methods
appcRun(args, matcher)
Build a specified application for a given platform. Also allows users to
specify their own arguments
Parameters:
| Name | Type | Description |
|---|---|---|
args |
String | Arguments to be run after calling appc |
matcher |
function | A function that can be used to resolve |
appcSetup(conf, args)
Configure the environment with the required SDK and CLI for the Test run
Parameters:
| Name | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
conf |
Object | Object for Appc setup
Properties
|
||||||||||||||||||
args |
Object | Arguments
Properties
|
banner(message)
Creates a banner and a green info tag around a message.
Parameters:
| Name | Type | Description |
|---|---|---|
message |
String | String to be enclosed by the banner |
buildApp(dir, platform, args)
Build a specified application for a given platform. Also allows users to
specify their own arguments.
Parameters:
| Name | Type | Description |
|---|---|---|
dir |
String | The path to the application root |
platform |
String | The mobile OS the app is being built for |
args |
Array | Any additional arguments to be passed to the command |
createAppPath(sdk)
Generate a path to the built application based upon platform
Parameters:
| Name | Type | Description |
|---|---|---|
sdk |
String | The version or branch of the SDK to validate |
debug(message)
Outputs a message when the debug flag is used.
Parameters:
| Name | Type | Description |
|---|---|---|
message |
String | String to be output |
error(message)
Outputs all of a string in red.
Parameters:
| Name | Type | Description |
|---|---|---|
message |
String | String to be output |
finish(done, value)
Writes a green done to the console and resolves the promise if passed.
Parameters:
| Name | Type | Description |
|---|---|---|
done |
function | Promise callback passed from the function |
value |
Object | An object to be returned with resolve |
getCert(type, search)
Use ioslib to probe the machine for a particular iOS certificate, then
return the certificate object.
Parameters:
| Name | Type | Description |
|---|---|---|
type |
String | The type of operation the cert is defined for |
search |
String | Part of the cert name, used to help locate it |
getProfile(type, search)
Use ioslib to probe the machine for a particular iOS provisioning profile,
then return the provisioning profile object.
Parameters:
| Name | Type | Description |
|---|---|---|
type |
String | The type of operation the pp is defined for |
search |
String | Part of the pp name, used to help locate it |
info(message)
Writes a message with a green info tag (note no new line is passed by
default).
Parameters:
| Name | Type | Description |
|---|---|---|
message |
String | A string to be output after the info tag |
killEmulator(deviceName)
Kill all the Android emulators.
Parameters:
| Name | Type | Description |
|---|---|---|
deviceName |
String | The name of the Android device to kill |
killSimulator()
Kill all the iOS simulators using the killall command
parseSDK(dir, platform, appName)
Takes in an SDK identifier and attempts to resolve it to the applicable SDK
version. Can take a release version, pre-release version, or branch
identifier and attempts to resolve it to an installable identifier.
Parameters:
| Name | Type | Description |
|---|---|---|
dir |
String | The path to the root of the application project |
platform |
String | The relevant mobile OS |
appName |
String | The name of the app to identify the app package |
skip(done, value)
Writes a yellow skip to the console and resolves the promise if passed.
Parameters:
| Name | Type | Description |
|---|---|---|
done |
function | Promise callback passed from the function |
value |
Object | An object to be returned with resolve |
startAppium(modRoot, args)
Launch an Appium server for the mobile testing, as it cannot use the
desktop session.
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
modRoot |
String | The path to the root of the project being tested | |||||||||
args |
Object | Arguments
Properties
|
startClient(capabilities)
Starts a WD session on the device, using the given capability requirements
as Appium configuration.
Parameters:
| Name | Type | Description |
|---|---|---|
capabilities |
Object | Desired capabilities for Appium to run with |
step(message)
Writes a message with a green info tag (note no new line is passed by
default).
Parameters:
| Name | Type | Description |
|---|---|---|
message |
String | A string to be output after the info tag |
stopAppium()
Tells the Appium server to shut down
stopClient()
Stops the WD session, but first it closes and removes the app from the
device in an attempt to save storage space.
test(dir, modRoot, opts)
Launch the Mocha test run on the collected files
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
dir |
String | The directory containing the test files | |||||||||
modRoot |
String | The root of the project being run | |||||||||
opts |
Object | Optional Arguments
Properties
|
warn(message)
Outputs a message when the warn flag is used.
Parameters:
| Name | Type | Description |
|---|---|---|
message |
String | String to be output |